Commit ed5bed41 authored by Mason Carter's avatar Mason Carter Committed by Michael Niedermayer

VC1: Fix intensity compensation performance regression

Fix https://trac.ffmpeg.org/ticket/3204

The problem was that intensity compensation was always used once it was
encountered. This is because v->next_use_ic was never set back to zero.
To fix this, when resetting v->next_luty/uv, also reset v->next_use_ic.

This improved (restored) performance by 85% when decoding
http://bit.ly/bbbwmvSigned-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5410a5dc
......@@ -610,6 +610,10 @@ static void rotate_luts(VC1Context *v)
INIT_LUT(32, 0, v->curr_luty[0], v->curr_lutuv[0], 0);
INIT_LUT(32, 0, v->curr_luty[1], v->curr_lutuv[1], 0);
v->curr_use_ic = 0;
if (v->curr_luty == v->next_luty) {
// If we just initialized next_lut, clear next_use_ic to match.
v->next_use_ic = 0;
}
}
int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
......
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