diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-01-02 15:05:41 +0100 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-01-02 19:01:42 +0100 |
commit | 51da00e24cb0191ecda14f7d056b782aacfde982 (patch) | |
tree | 89cd4828ebb32eef5d6c967b0fc5e58070c065cf /libavcodec | |
parent | af018d802d5f16ead8ce86b56e2316f0979e0105 (diff) | |
download | ffmpeg-51da00e24cb0191ecda14f7d056b782aacfde982.tar.gz |
dca: adjust decoding of the XBR extension for integer core decoding
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dcadec.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index b36397a8c5..6b8d02d59a 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -1344,17 +1344,17 @@ int ff_dca_xbr_parse_frame(DCAContext *s) for(i = 0; i < n_xbr_ch[chset]; i++) { for(j = 0; j < active_bands[chset][i]; j++) { const int xbr_abits = abits_high[i][j]; - const float quant_step_size = ff_dca_lossless_quant_d[xbr_abits]; + const uint32_t quant_step_size = ff_dca_lossless_quant[xbr_abits]; const int sfi = xbr_tmode && s->dca_chan[i].transition_mode[j] && subsubframe >= s->dca_chan[i].transition_mode[j]; - const float rscale = quant_step_size * scale_table_high[i][j][sfi]; - float *subband_samples = s->dca_chan[chan_base+i].subband_samples[k][j]; - int block[8]; + const uint32_t rscale = scale_table_high[i][j][sfi]; + int32_t *subband_samples = s->dca_chan[chan_base+i].subband_samples[k][j]; + int32_t block[SAMPLES_PER_SUBBAND]; if(xbr_abits <= 0) continue; if(xbr_abits > 7) { - get_array(&s->gb, block, 8, xbr_abits - 3); + get_array(&s->gb, block, SAMPLES_PER_SUBBAND, xbr_abits - 3); } else { int block_code1, block_code2, size, levels, err; @@ -1373,8 +1373,9 @@ int ff_dca_xbr_parse_frame(DCAContext *s) } /* scale & sum into subband */ - for(l = 0; l < 8; l++) - subband_samples[l] += (float)block[l] * rscale; + s->dcadsp.dequantize(block, quant_step_size, rscale); + for(l = 0; l < SAMPLES_PER_SUBBAND; l++) + subband_samples[l] += block[l]; } } |