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
1.9KB

  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. /**
  19. * @file
  20. * progressive to interlaced content filter, inspired by heavy debugging of
  21. * tinterlace filter.
  22. */
  23. #ifndef AVFILTER_INTERLACE_H
  24. #define AVFILTER_INTERLACE_H
  25. #include "libavutil/bswap.h"
  26. #include "libavutil/common.h"
  27. #include "libavutil/imgutils.h"
  28. #include "libavutil/opt.h"
  29. #include "libavutil/pixdesc.h"
  30. #include "avfilter.h"
  31. #include "formats.h"
  32. #include "internal.h"
  33. #include "video.h"
  34. enum ScanMode {
  35. MODE_TFF = 0,
  36. MODE_BFF = 1,
  37. };
  38. enum FieldType {
  39. FIELD_UPPER = 0,
  40. FIELD_LOWER = 1,
  41. };
  42. enum VLPFilter {
  43. VLPF_OFF = 0,
  44. VLPF_LIN = 1,
  45. VLPF_CMP = 2,
  46. };
  47. typedef struct InterlaceContext {
  48. const AVClass *class;
  49. enum ScanMode scan; // top or bottom field first scanning
  50. int lowpass; // enable or disable low pass filtering
  51. AVFrame *cur, *next; // the two frames from which the new one is obtained
  52. const AVPixFmtDescriptor *csp;
  53. void (*lowpass_line)(uint8_t *dstp, ptrdiff_t linesize, const uint8_t *srcp,
  54. ptrdiff_t mref, ptrdiff_t pref, int clip_max);
  55. } InterlaceContext;
  56. void ff_interlace_init(InterlaceContext *interlace, int depth);
  57. void ff_interlace_init_x86(InterlaceContext *interlace, int depth);
  58. #endif /* AVFILTER_INTERLACE_H */