Mercurial > libavcodec.hg
comparison vp6.c @ 4595:340c876320eb libavcodec
Use pointers to avoid copying AVFrame.
This ensure get_buffer() won't be confused with an AVFrame pointer
which looks like it wasn't released.
author | aurel |
---|---|
date | Sun, 25 Feb 2007 15:33:38 +0000 |
parents | a96d905dcbaa |
children | 143b89ab8187 |
comparison
equal
deleted
inserted
replaced
4594:a96d905dcbaa | 4595:340c876320eb |
---|---|
48 int sub_version; | 48 int sub_version; |
49 int rows, cols; | 49 int rows, cols; |
50 int res = 1; | 50 int res = 1; |
51 int separated_coeff = buf[0] & 1; | 51 int separated_coeff = buf[0] & 1; |
52 | 52 |
53 s->frames[VP56_FRAME_CURRENT].key_frame = !(buf[0] & 0x80); | 53 s->framep[VP56_FRAME_CURRENT]->key_frame = !(buf[0] & 0x80); |
54 vp56_init_dequant(s, (buf[0] >> 1) & 0x3F); | 54 vp56_init_dequant(s, (buf[0] >> 1) & 0x3F); |
55 | 55 |
56 if (s->frames[VP56_FRAME_CURRENT].key_frame) { | 56 if (s->framep[VP56_FRAME_CURRENT]->key_frame) { |
57 sub_version = buf[1] >> 3; | 57 sub_version = buf[1] >> 3; |
58 if (sub_version > 8) | 58 if (sub_version > 8) |
59 return 0; | 59 return 0; |
60 s->filter_header = buf[1] & 0x06; | 60 s->filter_header = buf[1] & 0x06; |
61 if (buf[1] & 1) { | 61 if (buf[1] & 1) { |
203 for (pt=0; pt<2; pt++) | 203 for (pt=0; pt<2; pt++) |
204 for (node=0; node<11; node++) | 204 for (node=0; node<11; node++) |
205 if (vp56_rac_get_prob(c, vp6_dccv_pct[pt][node])) { | 205 if (vp56_rac_get_prob(c, vp6_dccv_pct[pt][node])) { |
206 def_prob[node] = vp56_rac_gets_nn(c, 7); | 206 def_prob[node] = vp56_rac_gets_nn(c, 7); |
207 s->coeff_model_dccv[pt][node] = def_prob[node]; | 207 s->coeff_model_dccv[pt][node] = def_prob[node]; |
208 } else if (s->frames[VP56_FRAME_CURRENT].key_frame) { | 208 } else if (s->framep[VP56_FRAME_CURRENT]->key_frame) { |
209 s->coeff_model_dccv[pt][node] = def_prob[node]; | 209 s->coeff_model_dccv[pt][node] = def_prob[node]; |
210 } | 210 } |
211 | 211 |
212 if (vp56_rac_get(c)) { | 212 if (vp56_rac_get(c)) { |
213 for (pos=1; pos<64; pos++) | 213 for (pos=1; pos<64; pos++) |
226 for (cg=0; cg<6; cg++) | 226 for (cg=0; cg<6; cg++) |
227 for (node=0; node<11; node++) | 227 for (node=0; node<11; node++) |
228 if (vp56_rac_get_prob(c, vp6_ract_pct[ct][pt][cg][node])) { | 228 if (vp56_rac_get_prob(c, vp6_ract_pct[ct][pt][cg][node])) { |
229 def_prob[node] = vp56_rac_gets_nn(c, 7); | 229 def_prob[node] = vp56_rac_gets_nn(c, 7); |
230 s->coeff_model_ract[pt][ct][cg][node] = def_prob[node]; | 230 s->coeff_model_ract[pt][ct][cg][node] = def_prob[node]; |
231 } else if (s->frames[VP56_FRAME_CURRENT].key_frame) { | 231 } else if (s->framep[VP56_FRAME_CURRENT]->key_frame) { |
232 s->coeff_model_ract[pt][ct][cg][node] = def_prob[node]; | 232 s->coeff_model_ract[pt][ct][cg][node] = def_prob[node]; |
233 } | 233 } |
234 | 234 |
235 /* coeff_model_dcct is a linear combination of coeff_model_dccv */ | 235 /* coeff_model_dcct is a linear combination of coeff_model_dccv */ |
236 for (pt=0; pt<2; pt++) | 236 for (pt=0; pt<2; pt++) |