summaryrefslogtreecommitdiff
path: root/libavcodec/huffyuvdec.c
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2014-06-04 20:48:59 +0000
committerMichael Niedermayer <michaelni@gmx.at>2014-06-05 01:55:27 +0200
commit0d632b35a04f4a54e7cd228c85cbad82549182ec (patch)
tree45fd86f4b94f55810bdea1030224de2e853d1ba6 /libavcodec/huffyuvdec.c
parent6848325acb80bb9a33d154b787db13c9d53b5a63 (diff)
downloadffmpeg-0d632b35a04f4a54e7cd228c85cbad82549182ec.tar.gz
huffyuvdec: remove superfluous check in BGR code
Before: 154861 decicycles After: 152912 decicycles Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/huffyuvdec.c')
-rw-r--r--libavcodec/huffyuvdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c
index dc803cd931..6c925d35f6 100644
--- a/libavcodec/huffyuvdec.c
+++ b/libavcodec/huffyuvdec.c
@@ -729,10 +729,10 @@ static av_always_inline void decode_bgr_1(HYuvContext *s, int count,
UPDATE_CACHE(re, &s->gb);
index = SHOW_UBITS(re, &s->gb, VLC_BITS);
- code = s->vlc[4].table[index][0];
n = s->vlc[4].table[index][1];
- if (code != -1) {
+ if (n>0) {
+ code = s->vlc[4].table[index][0];
*(uint32_t*)&s->temp[0][4 * i] = s->pix_bgr_map[code];
LAST_SKIP_BITS(re, &s->gb, n);
} else {