You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
Merge commit '7686afd049be98d18663682b92d983340fa2c305'
* commit '7686afd049be98d18663682b92d983340fa2c305': dca: factorize scaling in inverse ADPCM Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -1353,16 +1353,27 @@ static int dca_subsubframe(DCAContext *s, int base_channel, int block_index)
|
|||||||
*/
|
*/
|
||||||
if (s->prediction_mode[k][l]) {
|
if (s->prediction_mode[k][l]) {
|
||||||
int n;
|
int n;
|
||||||
for (m = 0; m < 8; m++) {
|
if (s->predictor_history)
|
||||||
for (n = 1; n <= 4; n++)
|
subband_samples[k][l][0] += (adpcm_vb[s->prediction_vq[k][l]][0] *
|
||||||
|
s->subband_samples_hist[k][l][3] +
|
||||||
|
adpcm_vb[s->prediction_vq[k][l]][1] *
|
||||||
|
s->subband_samples_hist[k][l][2] +
|
||||||
|
adpcm_vb[s->prediction_vq[k][l]][2] *
|
||||||
|
s->subband_samples_hist[k][l][1] +
|
||||||
|
adpcm_vb[s->prediction_vq[k][l]][3] *
|
||||||
|
s->subband_samples_hist[k][l][0]) *
|
||||||
|
(1.0f / 8192);
|
||||||
|
for (m = 1; m < 8; m++) {
|
||||||
|
float sum = adpcm_vb[s->prediction_vq[k][l]][0] *
|
||||||
|
subband_samples[k][l][m - 1];
|
||||||
|
for (n = 2; n <= 4; n++)
|
||||||
if (m >= n)
|
if (m >= n)
|
||||||
subband_samples[k][l][m] +=
|
sum += adpcm_vb[s->prediction_vq[k][l]][n - 1] *
|
||||||
(adpcm_vb[s->prediction_vq[k][l]][n - 1] *
|
subband_samples[k][l][m - n];
|
||||||
subband_samples[k][l][m - n] / 8192);
|
|
||||||
else if (s->predictor_history)
|
else if (s->predictor_history)
|
||||||
subband_samples[k][l][m] +=
|
sum += adpcm_vb[s->prediction_vq[k][l]][n - 1] *
|
||||||
(adpcm_vb[s->prediction_vq[k][l]][n - 1] *
|
s->subband_samples_hist[k][l][m - n + 4];
|
||||||
s->subband_samples_hist[k][l][m - n + 4] / 8192);
|
subband_samples[k][l][m] += sum * 1.0f / 8192;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user