Commit 7ecae905 authored by Aurelien Jacobs's avatar Aurelien Jacobs
Browse files

simplify

Originally committed as revision 10584 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent d7af6a9d
...@@ -268,6 +268,7 @@ static void vp56_add_predictors_dc(vp56_context_t *s, vp56_frame_t ref_frame) ...@@ -268,6 +268,7 @@ static void vp56_add_predictors_dc(vp56_context_t *s, vp56_frame_t ref_frame)
vp56_ref_dc_t *lb = &s->left_block[vp56_b6to4[b]]; vp56_ref_dc_t *lb = &s->left_block[vp56_b6to4[b]];
int count = 0; int count = 0;
int dc = 0; int dc = 0;
int i;
if (ref_frame == lb->ref_frame) { if (ref_frame == lb->ref_frame) {
dc += lb->dc_coeff; dc += lb->dc_coeff;
...@@ -277,16 +278,12 @@ static void vp56_add_predictors_dc(vp56_context_t *s, vp56_frame_t ref_frame) ...@@ -277,16 +278,12 @@ static void vp56_add_predictors_dc(vp56_context_t *s, vp56_frame_t ref_frame)
dc += ab->dc_coeff; dc += ab->dc_coeff;
count++; count++;
} }
if (s->avctx->codec->id == CODEC_ID_VP5) { if (s->avctx->codec->id == CODEC_ID_VP5)
if (count < 2 && ref_frame == ab[-1].ref_frame) { for (i=0; i<2; i++)
dc += ab[-1].dc_coeff; if (count < 2 && ref_frame == ab[-1+2*i].ref_frame) {
dc += ab[-1+2*i].dc_coeff;
count++; count++;
} }
if (count < 2 && ref_frame == ab[1].ref_frame) {
dc += ab[1].dc_coeff;
count++;
}
}
if (count == 0) if (count == 0)
dc = s->prev_dc[vp56_b2p[b]][ref_frame]; dc = s->prev_dc[vp56_b2p[b]][ref_frame];
else if (count == 2) else if (count == 2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment