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.

60 lines
1.8KB

  1. /*
  2. * This file is part of Libav.
  3. *
  4. * Libav 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. * Libav 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 Libav; 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/common.h"
  26. #include "libavutil/imgutils.h"
  27. #include "libavutil/opt.h"
  28. #include "avfilter.h"
  29. #include "formats.h"
  30. #include "internal.h"
  31. #include "video.h"
  32. enum ScanMode {
  33. MODE_TFF = 0,
  34. MODE_BFF = 1,
  35. };
  36. enum FieldType {
  37. FIELD_UPPER = 0,
  38. FIELD_LOWER = 1,
  39. };
  40. typedef struct InterlaceContext {
  41. const AVClass *class;
  42. enum ScanMode scan; // top or bottom field first scanning
  43. int lowpass; // enable or disable low pass filtering
  44. AVFrame *cur, *next; // the two frames from which the new one is obtained
  45. int got_output; // signal an output frame is ready to request_frame()
  46. void (*lowpass_line)(uint8_t *dstp, ptrdiff_t linesize, const uint8_t *srcp,
  47. const uint8_t *srcp_above, const uint8_t *srcp_below);
  48. } InterlaceContext;
  49. void ff_interlace_init_x86(InterlaceContext *interlace);
  50. #endif /* AVFILTER_INTERLACE_H */