diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-02-19 19:13:09 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-02-19 19:13:18 +0100 |
commit | 04f7eee70908ffdffd55e159a9a37a07fdf9187e (patch) | |
tree | 65468e36c8b92407c4fa0aeb1e53a0d382337c34 | |
parent | d9b3097ba2d4b215b95481dcd92ce88b4ffae6da (diff) | |
parent | a520a9946f25fe36000558cf8bb512109ea40353 (diff) | |
download | ffmpeg-04f7eee70908ffdffd55e159a9a37a07fdf9187e.tar.gz |
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>
-rw-r--r-- | libavcodec/wmalosslessdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index 9f1e32866b..95e8cf2ab7 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -885,7 +885,7 @@ static void mclms_predict(WmallDecodeCtx *s, int icoef, int *pred) 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++) { mclms_predict(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; 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]; |