Mercurial > libavcodec.hg
comparison vp6.c @ 8304:3cddc18caeca libavcodec
rename Vp56Model to VP56Model for consistency
author | aurel |
---|---|
date | Fri, 12 Dec 2008 00:51:53 +0000 |
parents | 524cb7f5ad2b |
children | 8b6bcfa22aa8 |
comparison
equal
deleted
inserted
replaced
8303:bf6a78c6697b | 8304:3cddc18caeca |
---|---|
162 s->modelp->coeff_index_to_pos[idx++] = pos; | 162 s->modelp->coeff_index_to_pos[idx++] = pos; |
163 } | 163 } |
164 | 164 |
165 static void vp6_default_models_init(VP56Context *s) | 165 static void vp6_default_models_init(VP56Context *s) |
166 { | 166 { |
167 Vp56Model *model = s->modelp; | 167 VP56Model *model = s->modelp; |
168 | 168 |
169 model->vector_dct[0] = 0xA2; | 169 model->vector_dct[0] = 0xA2; |
170 model->vector_dct[1] = 0xA4; | 170 model->vector_dct[1] = 0xA4; |
171 model->vector_sig[0] = 0x80; | 171 model->vector_sig[0] = 0x80; |
172 model->vector_sig[1] = 0x80; | 172 model->vector_sig[1] = 0x80; |
181 } | 181 } |
182 | 182 |
183 static void vp6_parse_vector_models(VP56Context *s) | 183 static void vp6_parse_vector_models(VP56Context *s) |
184 { | 184 { |
185 VP56RangeCoder *c = &s->c; | 185 VP56RangeCoder *c = &s->c; |
186 Vp56Model *model = s->modelp; | 186 VP56Model *model = s->modelp; |
187 int comp, node; | 187 int comp, node; |
188 | 188 |
189 for (comp=0; comp<2; comp++) { | 189 for (comp=0; comp<2; comp++) { |
190 if (vp56_rac_get_prob(c, vp6_sig_dct_pct[comp][0])) | 190 if (vp56_rac_get_prob(c, vp6_sig_dct_pct[comp][0])) |
191 model->vector_dct[comp] = vp56_rac_gets_nn(c, 7); | 191 model->vector_dct[comp] = vp56_rac_gets_nn(c, 7); |
232 } | 232 } |
233 | 233 |
234 static void vp6_parse_coeff_models(VP56Context *s) | 234 static void vp6_parse_coeff_models(VP56Context *s) |
235 { | 235 { |
236 VP56RangeCoder *c = &s->c; | 236 VP56RangeCoder *c = &s->c; |
237 Vp56Model *model = s->modelp; | 237 VP56Model *model = s->modelp; |
238 int def_prob[11]; | 238 int def_prob[11]; |
239 int node, cg, ctx, pos; | 239 int node, cg, ctx, pos; |
240 int ct; /* code type */ | 240 int ct; /* code type */ |
241 int pt; /* plane type (0 for Y, 1 for U or V) */ | 241 int pt; /* plane type (0 for Y, 1 for U or V) */ |
242 | 242 |
297 } | 297 } |
298 | 298 |
299 static void vp6_parse_vector_adjustment(VP56Context *s, VP56mv *vect) | 299 static void vp6_parse_vector_adjustment(VP56Context *s, VP56mv *vect) |
300 { | 300 { |
301 VP56RangeCoder *c = &s->c; | 301 VP56RangeCoder *c = &s->c; |
302 Vp56Model *model = s->modelp; | 302 VP56Model *model = s->modelp; |
303 int comp; | 303 int comp; |
304 | 304 |
305 *vect = (VP56mv) {0,0}; | 305 *vect = (VP56mv) {0,0}; |
306 if (s->vector_candidate_pos < 2) | 306 if (s->vector_candidate_pos < 2) |
307 *vect = s->vector_candidate[0]; | 307 *vect = s->vector_candidate[0]; |
350 return val; | 350 return val; |
351 } | 351 } |
352 | 352 |
353 static void vp6_parse_coeff_huffman(VP56Context *s) | 353 static void vp6_parse_coeff_huffman(VP56Context *s) |
354 { | 354 { |
355 Vp56Model *model = s->modelp; | 355 VP56Model *model = s->modelp; |
356 uint8_t *permute = s->scantable.permutated; | 356 uint8_t *permute = s->scantable.permutated; |
357 VLC *vlc_coeff; | 357 VLC *vlc_coeff; |
358 int coeff, sign, coeff_idx; | 358 int coeff, sign, coeff_idx; |
359 int b, cg, idx; | 359 int b, cg, idx; |
360 int pt = 0; /* plane type (0 for Y, 1 for U or V) */ | 360 int pt = 0; /* plane type (0 for Y, 1 for U or V) */ |
406 } | 406 } |
407 | 407 |
408 static void vp6_parse_coeff(VP56Context *s) | 408 static void vp6_parse_coeff(VP56Context *s) |
409 { | 409 { |
410 VP56RangeCoder *c = s->ccp; | 410 VP56RangeCoder *c = s->ccp; |
411 Vp56Model *model = s->modelp; | 411 VP56Model *model = s->modelp; |
412 uint8_t *permute = s->scantable.permutated; | 412 uint8_t *permute = s->scantable.permutated; |
413 uint8_t *model1, *model2, *model3; | 413 uint8_t *model1, *model2, *model3; |
414 int coeff, sign, coeff_idx; | 414 int coeff, sign, coeff_idx; |
415 int b, i, cg, idx, ctx; | 415 int b, i, cg, idx, ctx; |
416 int pt = 0; /* plane type (0 for Y, 1 for U or V) */ | 416 int pt = 0; /* plane type (0 for Y, 1 for U or V) */ |