tinterlace.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright (c) 2011 Stefano Sabatini
  3. * Copyright (c) 2010 Baptiste Coudurier
  4. * Copyright (c) 2003 Michael Zucchi <notzed@ximian.com>
  5. *
  6. * This file is part of FFmpeg.
  7. *
  8. * FFmpeg is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * FFmpeg is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License along
  19. * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
  20. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  21. */
  22. /**
  23. * @file
  24. * temporal field interlace filter, ported from MPlayer/libmpcodecs
  25. */
  26. #ifndef AVFILTER_TINTERLACE_H
  27. #define AVFILTER_TINTERLACE_H
  28. #include "libavutil/opt.h"
  29. #include "avfilter.h"
  30. enum TInterlaceMode {
  31. MODE_MERGE = 0,
  32. MODE_DROP_EVEN,
  33. MODE_DROP_ODD,
  34. MODE_PAD,
  35. MODE_INTERLEAVE_TOP,
  36. MODE_INTERLEAVE_BOTTOM,
  37. MODE_INTERLACEX2,
  38. MODE_NB,
  39. };
  40. typedef struct {
  41. const AVClass *class;
  42. enum TInterlaceMode mode; ///< interlace mode selected
  43. AVRational preout_time_base;
  44. int flags; ///< flags affecting interlacing algorithm
  45. int frame; ///< number of the output frame
  46. int vsub; ///< chroma vertical subsampling
  47. AVFrame *cur;
  48. AVFrame *next;
  49. uint8_t *black_data[4]; ///< buffer used to fill padded lines
  50. int black_linesize[4];
  51. void (*lowpass_line)(uint8_t *dstp, ptrdiff_t width, const uint8_t *srcp,
  52. const uint8_t *srcp_above, const uint8_t *srcp_below);
  53. } TInterlaceContext;
  54. void ff_tinterlace_init_x86(TInterlaceContext *interlace);
  55. #endif /* AVFILTER_TINTERLACE_H */