summaryrefslogtreecommitdiff
path: root/libavcodec/wmalosslessdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-05 20:10:45 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-05 20:22:09 +0200
commit517dcc9b5fc4294669c0b6edaaa3ff166d412219 (patch)
treeafff025f131c22971259fd339a1663191fbb3a20 /libavcodec/wmalosslessdec.c
parent5f4e18cd162be2375cdd623816de58207b0b8a31 (diff)
parentf0ccd53a3b0bbe704a7bc94dbc8caac7be81e079 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: tests: Refactor rotozoom/videogen common code into a separate file. tests: Mark some file-internal symbols as static. build: Drop leftover .exp pattern from LIBSUFFIXES list. vsrc_buffer: return EAGAIN if no frame is available. WMAL: Shift output samples by the specified number of padding zeroes. WMAL: Restore removed code in mclms_predict() rtpdec_h264: Remove a useless ifdef rtpdec_h264: Remove outdated/useless/incorrect comments rtpdec_h264: Remove useless memory corruption checks rtpdec_h264: Return proper error codes rtpdec_h264: Check the available data length before reading rtpdec_h264: Add input size checks png: check bit depth for PAL8/Y400A pixel formats. ea: check chunk_size for validity. celp filters: Do not read earlier than the start of the 'out' vector. Conflicts: libavcodec/pngdec.c libavfilter/src_buffer.c tests/rotozoom.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmalosslessdec.c')
-rw-r--r--libavcodec/wmalosslessdec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 879bfb6d0e..0b386ceedc 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -658,9 +658,9 @@ static void mclms_predict(WmallDecodeCtx *s, int icoef, int *pred)
int num_channels = s->num_channels;
for (ich = 0; ich < num_channels; ich++) {
+ pred[ich] = 0;
if (!s->is_channel_coded[ich])
continue;
- pred[ich] = 0;
for (i = 0; i < order * num_channels; i++)
pred[ich] += s->mclms_prevvalues[i + s->mclms_recent] *
s->mclms_coeffs[i + order * num_channels * ich];
@@ -983,10 +983,10 @@ static int decode_subframe(WmallDecodeCtx *s)
for (j = 0; j < subframe_len; j++) {
if (s->bits_per_sample == 16) {
- *s->samples_16[c] = (int16_t) s->channel_residues[c][j];
+ *s->samples_16[c] = (int16_t) s->channel_residues[c][j] << padding_zeroes;
s->samples_16[c] += s->num_channels;
} else {
- *s->samples_32[c] = s->channel_residues[c][j];
+ *s->samples_32[c] = s->channel_residues[c][j] << padding_zeroes;
s->samples_32[c] += s->num_channels;
}
}