vf_pullup.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * This file is part of FFmpeg.
  3. *
  4. * FFmpeg is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * FFmpeg is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along
  15. * with FFmpeg; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #ifndef AVFILTER_PULLUP_H
  19. #define AVFILTER_PULLUP_H
  20. #include "avfilter.h"
  21. typedef struct PullupBuffer {
  22. int lock[2];
  23. uint8_t *planes[4];
  24. } PullupBuffer;
  25. typedef struct PullupField {
  26. int parity;
  27. PullupBuffer *buffer;
  28. unsigned flags;
  29. int breaks;
  30. int affinity;
  31. int *diffs;
  32. int *combs;
  33. int *vars;
  34. struct PullupField *prev, *next;
  35. } PullupField;
  36. typedef struct PullupFrame {
  37. int lock;
  38. int length;
  39. int parity;
  40. PullupBuffer *ifields[4], *ofields[2];
  41. PullupBuffer *buffer;
  42. } PullupFrame;
  43. typedef struct PullupContext {
  44. const AVClass *class;
  45. int junk_left, junk_right, junk_top, junk_bottom;
  46. int metric_plane;
  47. int strict_breaks;
  48. int strict_pairs;
  49. int metric_w, metric_h, metric_length;
  50. int metric_offset;
  51. int nb_planes;
  52. int planewidth[4];
  53. int planeheight[4];
  54. PullupField *first, *last, *head;
  55. PullupBuffer buffers[10];
  56. PullupFrame frame;
  57. int (*diff)(const uint8_t *a, const uint8_t *b, ptrdiff_t s);
  58. int (*comb)(const uint8_t *a, const uint8_t *b, ptrdiff_t s);
  59. int (*var )(const uint8_t *a, const uint8_t *b, ptrdiff_t s);
  60. } PullupContext;
  61. void ff_pullup_init_x86(PullupContext *s);
  62. #endif /* AVFILTER_PULLUP_H */