Merge commit 'adadc3f2443d25b375e21e801516ccfd78e0b080'
* commit 'adadc3f2443d25b375e21e801516ccfd78e0b080': qdm2: refactor joined stereo support Conflicts: libavcodec/qdm2.c See: 2b12d1ffd841cf57976b124c1882e4a23a7c5f61 Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
564909093a
@ -815,7 +815,7 @@ static int synthfilt_build_sb_samples(QDM2Context *q, GetBitContext *gb,
|
||||
int length, int sb_min, int sb_max)
|
||||
{
|
||||
int sb, j, k, n, ch, run, channels;
|
||||
int joined_stereo, zero_encoding, chs;
|
||||
int joined_stereo, zero_encoding;
|
||||
int type34_first;
|
||||
float type34_div = 0;
|
||||
float type34_predictor;
|
||||
@ -991,16 +991,18 @@ static int synthfilt_build_sb_samples(QDM2Context *q, GetBitContext *gb,
|
||||
}
|
||||
|
||||
if (joined_stereo) {
|
||||
float tmp[10][MPA_MAX_CHANNELS];
|
||||
for (k = 0; k < run; k++) {
|
||||
tmp[k][0] = samples[k];
|
||||
if ((j + k) < 128)
|
||||
tmp[k][1] = (sign_bits[(j + k) / 8]) ? -samples[k] : samples[k];
|
||||
for (k = 0; k < run && j + k < 128; k++) {
|
||||
q->sb_samples[0][j + k][sb] =
|
||||
q->tone_level[0][sb][(j + k) / 2] * samples[k];
|
||||
if (q->nb_channels == 2) {
|
||||
if (sign_bits[(j + k) / 8])
|
||||
q->sb_samples[1][j + k][sb] =
|
||||
q->tone_level[1][sb][(j + k) / 2] * -samples[k];
|
||||
else
|
||||
q->sb_samples[1][j + k][sb] =
|
||||
q->tone_level[1][sb][(j + k) / 2] * samples[k];
|
||||
}
|
||||
}
|
||||
for (chs = 0; chs < q->nb_channels; chs++)
|
||||
for (k = 0; k < run; k++)
|
||||
if ((j + k) < 128)
|
||||
q->sb_samples[chs][j + k][sb] = q->tone_level[chs][sb][((j + k)/2)] * tmp[k][chs];
|
||||
} else {
|
||||
for (k = 0; k < run; k++)
|
||||
if ((j + k) < 128)
|
||||
|
Loading…
x
Reference in New Issue
Block a user