From 9f37d89037a69798d89fd984b4bff861d5eba28c Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Mon, 4 Nov 2013 14:56:37 -0800 Subject: [PATCH] optimize decode_bool operation Change-Id: I7fe44633d29046ddd38c88c00e8520d27ac748bf --- vp9/decoder/vp9_dboolhuff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vp9/decoder/vp9_dboolhuff.h b/vp9/decoder/vp9_dboolhuff.h index c86451649..fd8e74ca4 100644 --- a/vp9/decoder/vp9_dboolhuff.h +++ b/vp9/decoder/vp9_dboolhuff.h @@ -44,7 +44,7 @@ static int vp9_read(vp9_reader *br, int probability) { VP9_BD_VALUE bigsplit; int count; unsigned int range; - unsigned int split = 1 + (((br->range - 1) * probability) >> 8); + unsigned int split = ((br->range * probability) + (256 - probability)) >> 8; if (br->count < 0) vp9_reader_fill(br); -- 2.40.0