summaryrefslogtreecommitdiff
path: root/libavcodec/proresdec.c
diff options
context:
space:
mode:
authorChristophe GISQUET <christophe.gisquet@gmail.com>2012-02-21 22:36:15 +0100
committerDiego Biurrun <diego@biurrun.de>2012-02-22 09:21:39 +0100
commitb5696ff2b872b3556a71fe3591c245b4caff08b5 (patch)
tree31f56fc4527fe3711591b33c2a377fd47e51f1dc /libavcodec/proresdec.c
parent0ad522afb3a3b3d22402ecb82dd4609f7655031b (diff)
prores: use natural integer type for the codebook index
The operations that use it require it to be promoted to a larger (natural) type and thus perform sign extension on it. While an optimal compiler may account for this, gcc 4.6 (for x86 Windows) fails. Using the natural integer type provides a 2% speedup for Win64 and 1% for Win32. Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec/proresdec.c')
-rw-r--r--libavcodec/proresdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c
index 207fd9742e..8ca5f3d632 100644
--- a/libavcodec/proresdec.c
+++ b/libavcodec/proresdec.c
@@ -289,7 +289,7 @@ static int decode_picture_header(ProresContext *ctx, const uint8_t *buf,
/**
* Read an unsigned rice/exp golomb codeword.
*/
-static inline int decode_vlc_codeword(GetBitContext *gb, uint8_t codebook)
+static inline int decode_vlc_codeword(GetBitContext *gb, unsigned codebook)
{
unsigned int rice_order, exp_order, switch_bits;
unsigned int buf, code;