[FFmpeg-devel] [PATCH 4/4] huffyuvdec: remove superfluous check in BGR code
Christophe Gisquet
christophe.gisquet at gmail.com
Wed Jun 4 22:48:59 CEST 2014
Before: 154861 decicycles
After: 152912 decicycles
---
libavcodec/huffyuvdec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c
index dc803cd..6c925d3 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 {
--
1.8.0.msysgit.0
More information about the ffmpeg-devel
mailing list