enquant.h 794 B

123456789101112131415161718192021222324252627
  1. #if !defined(_enquant_H)
  2. # define _enquant_H (1)
  3. # include "quant.h"
  4. typedef struct oc_iquant oc_iquant;
  5. #define OC_QUANT_MAX_LOG (OC_Q57(OC_STATIC_ILOG_32(OC_QUANT_MAX)-1))
  6. /*Used to compute x/d via ((x*m>>16)+x>>l)+(x<0))
  7. (i.e., one 16x16->16 mul, 2 shifts, and 2 adds).
  8. This is not an approximation; for 16-bit x and d, it is exact.*/
  9. struct oc_iquant{
  10. ogg_int16_t m;
  11. ogg_int16_t l;
  12. };
  13. int oc_quant_params_clone(th_quant_info *_dst,const th_quant_info *_src);
  14. void oc_quant_params_pack(oggpack_buffer *_opb,const th_quant_info *_qinfo);
  15. void oc_iquant_init(oc_iquant *_this,ogg_uint16_t _d);
  16. void oc_enquant_qavg_init(ogg_int64_t _log_qavg[2][64],
  17. ogg_int16_t _log_plq[64][3][2],ogg_uint16_t _pl_rd_scale[2][64][2],
  18. ogg_uint16_t *_dequant[64][3][2],int _pixel_fmt);
  19. #endif