summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMason Carter <void.main.argc.argv@gmail.com>2013-12-21 17:27:18 -0800
committerMichael Niedermayer <michaelni@gmx.at>2013-12-22 14:05:06 +0100
commited5bed4152203aed8cce01a679bed67bbda8903f (patch)
treed1659c636b6b19e4b6028a51a3cbfce8da206c53 /libavcodec
parent5410a5dc660858920d58a5f09daba264f370f81c (diff)
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/bbbwmv Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vc1.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 6557724954..5391e85c09 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -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)