You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.2KB

  1. /*
  2. * This file is part of FFmpeg.
  3. *
  4. * FFmpeg is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (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 Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  17. */
  18. #ifndef AVFILTER_YADIF_H
  19. #define AVFILTER_YADIF_H
  20. #include "libavutil/pixdesc.h"
  21. #include "avfilter.h"
  22. enum YADIFMode {
  23. YADIF_MODE_SEND_FRAME = 0, ///< send 1 frame for each frame
  24. YADIF_MODE_SEND_FIELD = 1, ///< send 1 frame for each field
  25. YADIF_MODE_SEND_FRAME_NOSPATIAL = 2, ///< send 1 frame for each frame but skips spatial interlacing check
  26. YADIF_MODE_SEND_FIELD_NOSPATIAL = 3, ///< send 1 frame for each field but skips spatial interlacing check
  27. };
  28. enum YADIFParity {
  29. YADIF_PARITY_TFF = 0, ///< top field first
  30. YADIF_PARITY_BFF = 1, ///< bottom field first
  31. YADIF_PARITY_AUTO = -1, ///< auto detection
  32. };
  33. enum YADIFDeint {
  34. YADIF_DEINT_ALL = 0, ///< deinterlace all frames
  35. YADIF_DEINT_INTERLACED = 1, ///< only deinterlace frames marked as interlaced
  36. };
  37. typedef struct YADIFContext {
  38. const AVClass *class;
  39. enum YADIFMode mode;
  40. enum YADIFParity parity;
  41. enum YADIFDeint deint;
  42. int frame_pending;
  43. AVFilterBufferRef *cur;
  44. AVFilterBufferRef *next;
  45. AVFilterBufferRef *prev;
  46. AVFilterBufferRef *out;
  47. void (*filter_line)(void *dst,
  48. void *prev, void *cur, void *next,
  49. int w, int prefs, int mrefs, int parity, int mode);
  50. const AVPixFmtDescriptor *csp;
  51. int eof;
  52. uint8_t *temp_line;
  53. int temp_line_size;
  54. } YADIFContext;
  55. void ff_yadif_init_x86(YADIFContext *yadif);
  56. #endif /* AVFILTER_YADIF_H */