intrax8.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * This file is part of FFmpeg.
  3. *
  4. * FFmpeg is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (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 GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with FFmpeg; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #ifndef AVCODEC_INTRAX8_H
  19. #define AVCODEC_INTRAX8_H
  20. #include "bitstream.h"
  21. #include "mpegvideo.h"
  22. typedef struct{
  23. VLC * j_ac_vlc[4];//they point to the static j_mb_vlc
  24. VLC * j_orient_vlc;
  25. VLC * j_dc_vlc[3];
  26. int use_quant_matrix;
  27. //set by ff_intrax8_common_init
  28. uint8_t * prediction_table;//2*(mb_w*2)
  29. ScanTable scantable[3];
  30. //set by the caller codec
  31. MpegEncContext * s;
  32. int quant;
  33. int dquant;
  34. int qsum;
  35. //calculated per frame
  36. int quant_dc_chroma;
  37. int divide_quant_dc_luma;
  38. int divide_quant_dc_chroma;
  39. //changed per block
  40. int edges;
  41. int flat_dc;
  42. int predicted_dc;
  43. int raw_orient;
  44. int chroma_orient;
  45. int orient;
  46. int est_run;
  47. } IntraX8Context;
  48. void ff_intrax8_common_init(IntraX8Context * w, MpegEncContext * const s);
  49. void ff_intrax8_common_end(IntraX8Context * w);
  50. int ff_intrax8_decode_picture(IntraX8Context * w, int quant, int halfpq);
  51. #endif /* AVCODEC_INTRAX8_H */