From 67a1f98c2c4b4f60df5150e350ea573cd401c612 Mon Sep 17 00:00:00 2001 From: Scott LaVarnway Date: Mon, 20 Jun 2011 14:44:16 -0400 Subject: Improved vp8dx_decode_bool Relocated the vp8dx_bool_decoder_fill() call, allowing the compiler to produce better assembly code. Tests showed a 1 - 2 % performance boost (x86 using gcc) for the 720p clip used. Change-Id: Ic5a4eefed8777e6eefa007d4f12dfc7e64482732 --- vp8/decoder/dboolhuff.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'vp8/decoder') diff --git a/vp8/decoder/dboolhuff.h b/vp8/decoder/dboolhuff.h index 5f6b211ea..f729837f9 100644 --- a/vp8/decoder/dboolhuff.h +++ b/vp8/decoder/dboolhuff.h @@ -81,11 +81,14 @@ static int vp8dx_decode_bool(BOOL_DECODER *br, int probability) { int count; unsigned int range; + split = 1 + (((br->range - 1) * probability) >> 8); + + if(br->count < 0) + vp8dx_bool_decoder_fill(br); + value = br->value; count = br->count; - range = br->range; - split = 1 + (((range - 1) * probability) >> 8); bigsplit = (VP8_BD_VALUE)split << (VP8_BD_VALUE_SIZE - 8); range = split; @@ -106,8 +109,7 @@ static int vp8dx_decode_bool(BOOL_DECODER *br, int probability) { br->value = value; br->count = count; br->range = range; - if(count < 0) - vp8dx_bool_decoder_fill(br); + return bit; } -- cgit v1.2.3