From e4ea84e12e3ae2a2479615c363cbec93b6d57f7e Mon Sep 17 00:00:00 2001 From: "zhaoxiu.zeng" Date: Fri, 13 Feb 2015 00:05:36 +0800 Subject: avcodec/wmv2: simplify cbp_table_index calculation Signed-off-by: Michael Niedermayer --- libavcodec/wmv2dec.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'libavcodec/wmv2dec.c') diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c index d9cbfd15ed..b1bcd092b0 100644 --- a/libavcodec/wmv2dec.c +++ b/libavcodec/wmv2dec.c @@ -173,16 +173,7 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext *s) parse_mb_skip(w); cbp_index = decode012(&s->gb); - if (s->qscale <= 10) { - int map[3] = { 0, 2, 1 }; - w->cbp_table_index = map[cbp_index]; - } else if (s->qscale <= 20) { - int map[3] = { 1, 0, 2 }; - w->cbp_table_index = map[cbp_index]; - } else { - int map[3] = {2,1,0}; - w->cbp_table_index = map[cbp_index]; - } + w->cbp_table_index = wmv2_get_cbp_table_index(s, cbp_index); if (w->mspel_bit) s->mspel = get_bits1(&s->gb); -- cgit v1.2.3