OSDN Git Service

Perform inter-channel decorr. only if both channels are coded
authorMashiat Sarker Shakkhar <shahriman_ams@yahoo.com>
Sat, 18 Feb 2012 15:00:03 +0000 (21:00 +0600)
committerMashiat Sarker Shakkhar <shahriman_ams@yahoo.com>
Sat, 18 Feb 2012 15:04:10 +0000 (21:04 +0600)
libavcodec/wmalosslessdec.c

index 30c055b..899645a 100644 (file)
@@ -1025,7 +1025,7 @@ static void revert_inter_ch_decorr(WmallDecodeCtx *s, int tile_size)
     int icoef;
     if (s->num_channels != 2)
         return;
-    else {
+    else if (s->is_channel_coded[0] && s->is_channel_coded[1]) {
         for (icoef = 0; icoef < tile_size; icoef++) {
             s->channel_residues[0][icoef] -= s->channel_residues[1][icoef] >> 1;
             s->channel_residues[1][icoef] += s->channel_residues[0][icoef];