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.

62 lines
1.8KB

  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/dsputil.h"
  25. #include "libavcodec/idctdsp.h"
  26. #include "avfilter.h"
  27. #define MAX_LEVEL 6 /* quality levels */
  28. typedef struct {
  29. const AVClass *av_class;
  30. int log2_count;
  31. int qp;
  32. int mode;
  33. int qscale_type;
  34. int temp_linesize;
  35. uint8_t *src;
  36. int16_t *temp;
  37. AVCodecContext *avctx;
  38. DSPContext dsp;
  39. IDCTDSPContext idsp;
  40. int8_t *non_b_qp_table;
  41. int non_b_qp_alloc_size;
  42. int use_bframe_qp;
  43. int hsub, vsub;
  44. void (*store_slice)(uint8_t *dst, const int16_t *src,
  45. int dst_stride, int src_stride,
  46. int width, int height, int log2_scale,
  47. const uint8_t dither[8][8]);
  48. void (*requantize)(int16_t dst[64], const int16_t src[64],
  49. int qp, const uint8_t *permutation);
  50. } SPPContext;
  51. void ff_spp_init_x86(SPPContext *s);
  52. #endif /* AVFILTER_SPP_H */