diff options
author | foo86 <foobaz86@gmail.com> | 2016-03-02 22:32:10 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-03-03 12:35:21 +0100 |
commit | 00e3717b4a21d93bdf822588a9f6fbfd1fca27a5 (patch) | |
tree | 40f80db69580de09be1d1a1259d72ba36120cf79 /libavcodec/dca_xll.c | |
parent | 89813487491afbca5472e8a4af262eedb4aead02 (diff) | |
download | ffmpeg-00e3717b4a21d93bdf822588a9f6fbfd1fca27a5.tar.gz |
avcodec/dca: simplify condition
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/dca_xll.c')
-rw-r--r-- | libavcodec/dca_xll.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c index ffe8ef3369..5e6cf35c5d 100644 --- a/libavcodec/dca_xll.c +++ b/libavcodec/dca_xll.c @@ -460,19 +460,14 @@ static int chs_parse_band_data(DCAXllDecoder *s, DCAXllChSet *c, int band, int s // Unpack Rice coding flag // 0 - linear code, 1 - Rice code c->rice_code_flag[i] = get_bits1(&s->gb); - if (!c->seg_common && c->rice_code_flag[i]) { - // Unpack Hybrid Rice coding flag - // 0 - Rice code, 1 - Hybrid Rice code - if (get_bits1(&s->gb)) - // Unpack binary code length for isolated samples - c->bitalloc_hybrid_linear[i] = get_bits(&s->gb, c->nabits) + 1; - else - // 0 indicates no Hybrid Rice coding - c->bitalloc_hybrid_linear[i] = 0; - } else { + // Unpack Hybrid Rice coding flag + // 0 - Rice code, 1 - Hybrid Rice code + if (!c->seg_common && c->rice_code_flag[i] && get_bits1(&s->gb)) + // Unpack binary code length for isolated samples + c->bitalloc_hybrid_linear[i] = get_bits(&s->gb, c->nabits) + 1; + else // 0 indicates no Hybrid Rice coding c->bitalloc_hybrid_linear[i] = 0; - } } // Unpack coding parameters |