bwdif.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 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 GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along 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_BWDIF_H
  19. #define AVFILTER_BWDIF_H
  20. #include "libavutil/pixdesc.h"
  21. #include "avfilter.h"
  22. enum BWDIFMode {
  23. BWDIF_MODE_SEND_FRAME = 0, ///< send 1 frame for each frame
  24. BWDIF_MODE_SEND_FIELD = 1, ///< send 1 frame for each field
  25. };
  26. enum BWDIFParity {
  27. BWDIF_PARITY_TFF = 0, ///< top field first
  28. BWDIF_PARITY_BFF = 1, ///< bottom field first
  29. BWDIF_PARITY_AUTO = -1, ///< auto detection
  30. };
  31. enum BWDIFDeint {
  32. BWDIF_DEINT_ALL = 0, ///< deinterlace all frames
  33. BWDIF_DEINT_INTERLACED = 1, ///< only deinterlace frames marked as interlaced
  34. };
  35. typedef struct BWDIFContext {
  36. const AVClass *class;
  37. int mode; ///< BWDIFMode
  38. int parity; ///< BWDIFParity
  39. int deint; ///< BWDIFDeint
  40. int frame_pending;
  41. AVFrame *cur;
  42. AVFrame *next;
  43. AVFrame *prev;
  44. AVFrame *out;
  45. void (*filter_intra)(void *dst1, void *cur1, int w, int prefs, int mrefs,
  46. int prefs3, int mrefs3, int parity, int clip_max);
  47. void (*filter_line)(void *dst, void *prev, void *cur, void *next,
  48. int w, int prefs, int mrefs, int prefs2, int mrefs2,
  49. int prefs3, int mrefs3, int prefs4, int mrefs4,
  50. int parity, int clip_max);
  51. void (*filter_edge)(void *dst, void *prev, void *cur, void *next,
  52. int w, int prefs, int mrefs, int prefs2, int mrefs2,
  53. int parity, int clip_max, int spat);
  54. const AVPixFmtDescriptor *csp;
  55. int inter_field;
  56. int eof;
  57. } BWDIFContext;
  58. void ff_bwdif_init_x86(BWDIFContext *bwdif);
  59. #endif /* AVFILTER_BWDIF_H */