spec: Use %license macro to copy license
[platform/upstream/libtheora.git] / lib / enquant.h
1 #if !defined(_enquant_H)
2 # define _enquant_H (1)
3 # include "quant.h"
4
5 typedef struct oc_iquant oc_iquant;
6
7 #define OC_QUANT_MAX_LOG (OC_Q57(OC_STATIC_ILOG_32(OC_QUANT_MAX)-1))
8
9 /*Used to compute x/d via ((x*m>>16)+x>>l)+(x<0))
10    (i.e., one 16x16->16 mul, 2 shifts, and 2 adds).
11   This is not an approximation; for 16-bit x and d, it is exact.*/
12 struct oc_iquant{
13   ogg_int16_t m;
14   ogg_int16_t l;
15 };
16
17 typedef oc_iquant        oc_iquant_table[64];
18
19
20
21 void oc_quant_params_pack(oggpack_buffer *_opb,const th_quant_info *_qinfo);
22 void oc_enquant_tables_init(ogg_uint16_t *_dequant[64][3][2],
23  oc_iquant *_enquant[64][3][2],const th_quant_info *_qinfo);
24 void oc_enquant_qavg_init(ogg_int64_t _log_qavg[2][64],
25  ogg_uint16_t *_dequant[64][3][2],int _pixel_fmt);
26
27 #endif