vf_spp.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
  3. * Copyright (c) 2013 Clément Bœsch
  4. *
  5. * This file is part of FFmpeg.
  6. *
  7. * FFmpeg is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * FFmpeg is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License along
  18. * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
  19. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  20. */
  21. #ifndef AVFILTER_SPP_H
  22. #define AVFILTER_SPP_H
  23. #include "libavcodec/avcodec.h"
  24. #include "libavcodec/avdct.h"
  25. #include "avfilter.h"
  26. #define MAX_LEVEL 6 /* quality levels */
  27. typedef struct SPPContext {
  28. const AVClass *av_class;
  29. int log2_count;
  30. int qp;
  31. int mode;
  32. int qscale_type;
  33. int temp_linesize;
  34. uint8_t *src;
  35. uint16_t *temp;
  36. AVCodecContext *avctx;
  37. AVDCT *dct;
  38. int8_t *non_b_qp_table;
  39. int non_b_qp_alloc_size;
  40. int use_bframe_qp;
  41. int hsub, vsub;
  42. void (*store_slice)(uint8_t *dst, const int16_t *src,
  43. int dst_stride, int src_stride,
  44. int width, int height, int log2_scale,
  45. const uint8_t dither[8][8]);
  46. void (*requantize)(int16_t dst[64], const int16_t src[64],
  47. int qp, const uint8_t *permutation);
  48. } SPPContext;
  49. void ff_spp_init_x86(SPPContext *s);
  50. #endif /* AVFILTER_SPP_H */