aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorLoren Merritt <lorenm@u.washington.edu>2007-05-06 09:17:50 +0000
committerLoren Merritt <lorenm@u.washington.edu>2007-05-06 09:17:50 +0000
commit4b8419aa7ffca23268c0fdd946404d57004c1675 (patch)
tree1adb7e6eb7ec08d4d26daa695606ee1be9edef91 /libavcodec
parent44c560003ad3eb6346485b6db0288c17e0402b91 (diff)
downloadffmpeg-4b8419aa7ffca23268c0fdd946404d57004c1675.tar.gz
simplify
Originally committed as revision 8911 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vp6.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index 6042dbbee1..065b9ff305 100644
--- a/libavcodec/vp6.c
+++ b/libavcodec/vp6.c
@@ -299,11 +299,6 @@ static void vp6_parse_coeff(vp56_context_t *s)
for (coeff_idx=0; coeff_idx<64; ) {
if ((coeff_idx>1 && ct==0) || vp56_rac_get_prob(c, model2[0])) {
/* parse a coeff */
- if (coeff_idx == 0) {
- s->left_block[vp56_b6to4[b]].not_null_dc = 1;
- s->above_blocks[s->above_block_idx[b]].not_null_dc = 1;
- }
-
if (vp56_rac_get_prob(c, model2[2])) {
if (vp56_rac_get_prob(c, model2[3])) {
idx = vp56_rac_get_tree(c, vp56_pc_tree, model);
@@ -331,10 +326,7 @@ static void vp6_parse_coeff(vp56_context_t *s)
} else {
/* parse a run */
ct = 0;
- if (coeff_idx == 0) {
- s->left_block[vp56_b6to4[b]].not_null_dc = 0;
- s->above_blocks[s->above_block_idx[b]].not_null_dc = 0;
- } else {
+ if (coeff_idx > 0) {
if (!vp56_rac_get_prob(c, model2[1]))
break;
@@ -349,6 +341,9 @@ static void vp6_parse_coeff(vp56_context_t *s)
cg = vp6_coeff_groups[coeff_idx+=run];
model = model2 = s->coeff_model_ract[pt][ct][cg];
}
+
+ s->left_block[vp56_b6to4[b]].not_null_dc =
+ s->above_blocks[s->above_block_idx[b]].not_null_dc = !!s->block_coeff[b][0];
}
}