diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2016-01-11 21:14:00 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2016-01-11 21:51:11 +0100 |
commit | fa66237b69c27befa788b100e73783e0f47fe1b7 (patch) | |
tree | d065cfa6372bf29b3c1acba567865294a0d08261 /libavcodec/wmalosslessdec.c | |
parent | 62825236dba31a2240e25974a3ba41c1303e4edc (diff) | |
download | ffmpeg-fa66237b69c27befa788b100e73783e0f47fe1b7.tar.gz |
lavc: Use get_bitsz where needed
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/wmalosslessdec.c')
-rw-r--r-- | libavcodec/wmalosslessdec.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index e752bd02ea..e335db7f12 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -411,8 +411,7 @@ static void decode_ac_filter(WmallDecodeCtx *s) s->acfilter_scaling = get_bits(&s->gb, 4); for (i = 0; i < s->acfilter_order; i++) - s->acfilter_coeffs[i] = (s->acfilter_scaling ? - get_bits(&s->gb, s->acfilter_scaling) : 0) + 1; + s->acfilter_coeffs[i] = get_bitsz(&s->gb, s->acfilter_scaling) + 1; } static void decode_mclms(WmallDecodeCtx *s) @@ -425,7 +424,7 @@ static void decode_mclms(WmallDecodeCtx *s) if (1 << cbits < s->mclms_scaling + 1) cbits++; - send_coef_bits = (cbits ? get_bits(&s->gb, cbits) : 0) + 2; + send_coef_bits = get_bitsz(&s->gb, cbits) + 2; for (i = 0; i < s->mclms_order * s->num_channels * s->num_channels; i++) s->mclms_coeffs[i] = get_bits(&s->gb, send_coef_bits); @@ -471,7 +470,7 @@ static int decode_cdlms(WmallDecodeCtx *s) if ((1 << cbits) < s->cdlms[c][i].scaling + 1) cbits++; - s->cdlms[c][i].bitsend = get_bits(&s->gb, cbits) + 2; + s->cdlms[c][i].bitsend = get_bitsz(&s->gb, cbits) + 2; shift_l = 32 - s->cdlms[c][i].bitsend; shift_r = 32 - s->cdlms[c][i].scaling - 2; for (j = 0; j < s->cdlms[c][i].coefsend; j++) |