aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-26 02:10:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-26 02:34:24 +0200
commitc684cb29bc6e81b9b2973e826b6fec98f8bafe8c (patch)
tree9d639d03103bb07cb955becdd3713f8b300f6b8f /libavcodec
parent0c3a3b75d743602dfa207936862789e93327cfc7 (diff)
parentdb70730291df74595873d41914d2ef398fb13364 (diff)
downloadffmpeg-c684cb29bc6e81b9b2973e826b6fec98f8bafe8c.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: x86: fft: remove unused fft_dispatch* functions avconv: remove unused variable opt_shortest FATE: Add Canopus Lossless tests cllc: Pad swapped buffer Conflicts: ffmpeg_opt.c tests/ref/fate/cllc-argb tests/ref/fate/cllc-rgb Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/cllc.c7
-rw-r--r--libavcodec/x86/fft_mmx.asm8
2 files changed, 6 insertions, 9 deletions
diff --git a/libavcodec/cllc.c b/libavcodec/cllc.c
index af51c36d8c..7625852aba 100644
--- a/libavcodec/cllc.c
+++ b/libavcodec/cllc.c
@@ -284,7 +284,8 @@ static int cllc_decode_frame(AVCodecContext *avctx, void *data,
/* Make sure our bswap16'd buffer is big enough */
swapped_buf_new = av_fast_realloc(ctx->swapped_buf,
- &ctx->swapped_buf_size, avpkt->size);
+ &ctx->swapped_buf_size, avpkt->size +
+ FF_INPUT_BUFFER_PADDING_SIZE);
if (!swapped_buf_new) {
av_log(avctx, AV_LOG_ERROR, "Could not realloc swapped buffer.\n");
return AVERROR(ENOMEM);
@@ -313,6 +314,10 @@ static int cllc_decode_frame(AVCodecContext *avctx, void *data,
ctx->dsp.bswap16_buf((uint16_t *) ctx->swapped_buf, (uint16_t *) src,
(avpkt->size - info_offset) / 2);
+ /* Initialize padding to 0 */
+ memset(ctx->swapped_buf + avpkt->size - info_offset,
+ 0, FF_INPUT_BUFFER_PADDING_SIZE);
+
init_get_bits(&gb, ctx->swapped_buf, (avpkt->size - info_offset) * 8);
/*
diff --git a/libavcodec/x86/fft_mmx.asm b/libavcodec/x86/fft_mmx.asm
index 79c7c183b9..e8a9925105 100644
--- a/libavcodec/x86/fft_mmx.asm
+++ b/libavcodec/x86/fft_mmx.asm
@@ -792,14 +792,6 @@ fft %+ n %+ fullsuffix:
align 8
dispatch_tab %+ fullsuffix: pointer list_of_fft
-
-section .text
-
-; On x86_32, this function does the register saving and restoring for all of fft.
-; The others pass args in registers and don't spill anything.
-cglobal fft_dispatch%2, 2,5,8, zc, nbits
- FFT_DISPATCH fullsuffix, nbits
- RET
%endmacro ; DECL_FFT
%if HAVE_AVX