[FFmpeg-cvslog] VC1: Fix intensity compensation performance regression
Mason Carter
git at videolan.org
Sun Dec 22 16:10:22 CET 2013
ffmpeg | branch: release/2.1 | Mason Carter <void.main.argc.argv at gmail.com> | Sat Dec 21 17:27:18 2013 -0800| [7eec11463fca6bad344f194acdcebf9e6743cf6d] | committer: Carl Eugen Hoyos
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 at gmx.at>
(cherry picked from commit ed5bed4152203aed8cce01a679bed67bbda8903f)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7eec11463fca6bad344f194acdcebf9e6743cf6d
---
libavcodec/vc1.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index f755811..2b87247 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -621,6 +621,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)
More information about the ffmpeg-cvslog
mailing list