vp8.h
Go to the documentation of this file.
1 
25 #ifndef AVCODEC_VP8_H
26 #define AVCODEC_VP8_H
27 
28 #include "vp56.h"
29 #include "vp56data.h"
30 #include "vp8dsp.h"
31 #include "h264pred.h"
32 
33 #define VP8_MAX_QUANT 127
34 
35 enum dct_token {
48 
50 };
51 
52 // used to signal 4x4 intra pred in luma MBs
53 #define MODE_I4x4 4
54 
59 };
60 
67 };
68 
69 typedef struct {
70  uint8_t filter_level;
71  uint8_t inner_limit;
72  uint8_t inner_filter;
74 
75 typedef struct {
76  uint8_t skip;
77  // todo: make it possible to check for at least (i4x4 or split_mv)
78  // in one op. are others needed?
79  uint8_t mode;
80  uint8_t ref_frame;
81  uint8_t partitioning;
83  VP56mv bmv[16];
85 
86 typedef struct {
88  AVFrame *framep[4];
89  AVFrame *next_framep[4];
90  uint8_t *edge_emu_buffer;
91 
92  uint16_t mb_width; /* number of horizontal MB */
93  uint16_t mb_height; /* number of vertical MB */
94  int linesize;
96 
97  uint8_t keyframe;
98  uint8_t deblock_filter;
99  uint8_t mbskip_enabled;
100  uint8_t segment;
102  uint8_t profile;
105 
106  int8_t sign_bias[4];
107  int ref_count[3];
108 
114  struct {
115  uint8_t enabled;
116  uint8_t absolute_vals;
117  uint8_t update_map;
118  int8_t base_quant[4];
119  int8_t filter_level[4];
120  } segmentation;
121 
122  struct {
123  uint8_t simple;
124  uint8_t level;
125  uint8_t sharpness;
126  } filter;
127 
130 
132  uint8_t intra4x4_pred_mode_left[4];
133 
139  struct {
140  // [0] - DC qmul [1] - AC qmul
141  int16_t luma_qmul[2];
142  int16_t luma_dc_qmul[2];
143  int16_t chroma_qmul[2];
144  } qmat[4];
145 
146  struct {
147  uint8_t enabled;
148 
158  int8_t mode[VP8_MVMODE_SPLIT+1];
159 
167  int8_t ref[4];
168  } lf_delta;
169 
174  uint8_t (*top_border)[16+8+8];
175 
182  uint8_t (*top_nnz)[9];
183  DECLARE_ALIGNED(8, uint8_t, left_nnz)[9];
184 
192  DECLARE_ALIGNED(16, uint8_t, non_zero_count_cache)[6][4];
194  DECLARE_ALIGNED(16, DCTELEM, block)[6][4][16];
195  DECLARE_ALIGNED(16, DCTELEM, block_dc)[16];
196  uint8_t intra4x4_pred_mode_mb[16];
197 
204  struct {
205  uint8_t segmentid[3];
206  uint8_t mbskip;
207  uint8_t intra;
208  uint8_t last;
209  uint8_t golden;
210  uint8_t pred16x16[4];
211  uint8_t pred8x8c[3];
212  uint8_t token[4][16][3][NUM_DCT_TOKENS-1];
213  uint8_t mvc[2][19];
214  } prob[2];
215 
221 
227 
233  VP56RangeCoder coeff_partition[8];
237  vp8_mc_func put_pixels_tab[3][3][3];
238  AVFrame frames[5];
239 
246  uint8_t *segmentation_maps[5];
249 } VP8Context;
250 
251 #endif /* AVCODEC_VP8_H */