diff options
author | Christophe GISQUET <christophe.gisquet@gmail.com> | 2012-02-22 01:36:15 +0400 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2012-02-22 12:21:39 +0400 |
commit | b5696ff2b872b3556a71fe3591c245b4caff08b5 (patch) | |
tree | 31f56fc4527fe3711591b33c2a377fd47e51f1dc /libavcodec/proresenc.c | |
parent | 0ad522afb3a3b3d22402ecb82dd4609f7655031b (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/proresenc.c')
-rw-r--r-- | libavcodec/proresenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c index 7e3e066875..aa96b35e75 100644 --- a/libavcodec/proresenc.c +++ b/libavcodec/proresenc.c @@ -229,7 +229,7 @@ static void get_slice_data(ProresContext *ctx, const uint16_t *src, /** * Write an unsigned rice/exp golomb codeword. */ -static inline void encode_vlc_codeword(PutBitContext *pb, uint8_t codebook, int val) +static inline void encode_vlc_codeword(PutBitContext *pb, unsigned codebook, int val) { unsigned int rice_order, exp_order, switch_bits, switch_val; int exponent; @@ -393,7 +393,7 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic, return total_size; } -static inline int estimate_vlc(uint8_t codebook, int val) +static inline int estimate_vlc(unsigned codebook, int val) { unsigned int rice_order, exp_order, switch_bits, switch_val; int exponent; |