mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 00:32:31 +00:00
Merge remote-tracking branch 'shariman/wmall'
* shariman/wmall: Perform inter-channel decorr. only if both channels are coded Use fixed-length array in revert_mclms() Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
04f7eee709
@ -885,7 +885,7 @@ static void mclms_predict(WmallDecodeCtx *s, int icoef, int *pred)
|
|||||||
|
|
||||||
static void revert_mclms(WmallDecodeCtx *s, int tile_size)
|
static void revert_mclms(WmallDecodeCtx *s, int tile_size)
|
||||||
{
|
{
|
||||||
int icoef, pred[s->num_channels];
|
int icoef, pred[WMALL_MAX_CHANNELS] = {0};
|
||||||
for (icoef = 0; icoef < tile_size; icoef++) {
|
for (icoef = 0; icoef < tile_size; icoef++) {
|
||||||
mclms_predict(s, icoef, pred);
|
mclms_predict(s, icoef, pred);
|
||||||
mclms_update(s, icoef, pred);
|
mclms_update(s, icoef, pred);
|
||||||
@ -1025,7 +1025,7 @@ static void revert_inter_ch_decorr(WmallDecodeCtx *s, int tile_size)
|
|||||||
int icoef;
|
int icoef;
|
||||||
if (s->num_channels != 2)
|
if (s->num_channels != 2)
|
||||||
return;
|
return;
|
||||||
else {
|
else if (s->is_channel_coded[0] && s->is_channel_coded[1]) {
|
||||||
for (icoef = 0; icoef < tile_size; icoef++) {
|
for (icoef = 0; icoef < tile_size; icoef++) {
|
||||||
s->channel_residues[0][icoef] -= s->channel_residues[1][icoef] >> 1;
|
s->channel_residues[0][icoef] -= s->channel_residues[1][icoef] >> 1;
|
||||||
s->channel_residues[1][icoef] += s->channel_residues[0][icoef];
|
s->channel_residues[1][icoef] += s->channel_residues[0][icoef];
|
||||||
|
Loading…
Reference in New Issue
Block a user