comparison vp5.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
85 } 85 }
86 86
87 static void vp5_parse_vector_adjustment(VP56Context *s, VP56mv *vect) 87 static void vp5_parse_vector_adjustment(VP56Context *s, VP56mv *vect)
88 { 88 {
89 VP56RangeCoder *c = &s->c; 89 VP56RangeCoder *c = &s->c;
90 Vp56Model *model = s->modelp; 90 VP56Model *model = s->modelp;
91 int comp, di; 91 int comp, di;
92 92
93 for (comp=0; comp<2; comp++) { 93 for (comp=0; comp<2; comp++) {
94 int delta = 0; 94 int delta = 0;
95 if (vp56_rac_get_prob(c, model->vector_dct[comp])) { 95 if (vp56_rac_get_prob(c, model->vector_dct[comp])) {
109 } 109 }
110 110
111 static void vp5_parse_vector_models(VP56Context *s) 111 static void vp5_parse_vector_models(VP56Context *s)
112 { 112 {
113 VP56RangeCoder *c = &s->c; 113 VP56RangeCoder *c = &s->c;
114 Vp56Model *model = s->modelp; 114 VP56Model *model = s->modelp;
115 int comp, node; 115 int comp, node;
116 116
117 for (comp=0; comp<2; comp++) { 117 for (comp=0; comp<2; comp++) {
118 if (vp56_rac_get_prob(c, vp5_vmc_pct[comp][0])) 118 if (vp56_rac_get_prob(c, vp5_vmc_pct[comp][0]))
119 model->vector_dct[comp] = vp56_rac_gets_nn(c, 7); 119 model->vector_dct[comp] = vp56_rac_gets_nn(c, 7);
132 } 132 }
133 133
134 static void vp5_parse_coeff_models(VP56Context *s) 134 static void vp5_parse_coeff_models(VP56Context *s)
135 { 135 {
136 VP56RangeCoder *c = &s->c; 136 VP56RangeCoder *c = &s->c;
137 Vp56Model *model = s->modelp; 137 VP56Model *model = s->modelp;
138 uint8_t def_prob[11]; 138 uint8_t def_prob[11];
139 int node, cg, ctx; 139 int node, cg, ctx;
140 int ct; /* code type */ 140 int ct; /* code type */
141 int pt; /* plane type (0 for Y, 1 for U or V) */ 141 int pt; /* plane type (0 for Y, 1 for U or V) */
142 142
178 } 178 }
179 179
180 static void vp5_parse_coeff(VP56Context *s) 180 static void vp5_parse_coeff(VP56Context *s)
181 { 181 {
182 VP56RangeCoder *c = &s->c; 182 VP56RangeCoder *c = &s->c;
183 Vp56Model *model = s->modelp; 183 VP56Model *model = s->modelp;
184 uint8_t *permute = s->scantable.permutated; 184 uint8_t *permute = s->scantable.permutated;
185 uint8_t *model1, *model2; 185 uint8_t *model1, *model2;
186 int coeff, sign, coeff_idx; 186 int coeff, sign, coeff_idx;
187 int b, i, cg, idx, ctx, ctx_last; 187 int b, i, cg, idx, ctx, ctx_last;
188 int pt = 0; /* plane type (0 for Y, 1 for U or V) */ 188 int pt = 0; /* plane type (0 for Y, 1 for U or V) */
250 } 250 }
251 } 251 }
252 252
253 static void vp5_default_models_init(VP56Context *s) 253 static void vp5_default_models_init(VP56Context *s)
254 { 254 {
255 Vp56Model *model = s->modelp; 255 VP56Model *model = s->modelp;
256 int i; 256 int i;
257 257
258 for (i=0; i<2; i++) { 258 for (i=0; i<2; i++) {
259 model->vector_sig[i] = 0x80; 259 model->vector_sig[i] = 0x80;
260 model->vector_dct[i] = 0x80; 260 model->vector_dct[i] = 0x80;