diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-23 15:08:55 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-23 15:08:55 +0200 |
commit | 79ec524ff52aa641896f755b63e933ab2877763c (patch) | |
tree | d3750e2e5d798ea76e4673263cdfd05a93c3f3b4 | |
parent | 35ce42e07029b3af62f652a53719fee99bb7a5aa (diff) | |
parent | ec444c84cfd30ef34a4e7b4ec7ee77d7e5250d25 (diff) | |
download | ffmpeg-79ec524ff52aa641896f755b63e933ab2877763c.tar.gz |
Merge commit 'ec444c84cfd30ef34a4e7b4ec7ee77d7e5250d25'
* commit 'ec444c84cfd30ef34a4e7b4ec7ee77d7e5250d25':
mpegaudiodec: Fix buffer handling on random access
mpegaudio: Refactor mp3on4 flush function
fate: Add dependencies for audio tests
fate: cosmetics: Group idct8x8 test together with all other libavcodec tests
fate: More fine-grained dependencies for libavcodec test programs
Conflicts:
tests/fate/audio.mak
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/mpegaudiodec.c | 17 | ||||
-rw-r--r-- | tests/Makefile | 1 | ||||
-rw-r--r-- | tests/fate/audio.mak | 26 | ||||
-rw-r--r-- | tests/fate/dct.mak | 5 | ||||
-rw-r--r-- | tests/fate/libavcodec.mak | 16 |
5 files changed, 33 insertions, 32 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 5a39bdce33..b010af6b3e 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1713,11 +1713,15 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr, return buf_size; } +static void mp_flush(MPADecodeContext *ctx) +{ + memset(ctx->synth_buf, 0, sizeof(ctx->synth_buf)); + ctx->last_buf_size = 0; +} + static void flush(AVCodecContext *avctx) { - MPADecodeContext *s = avctx->priv_data; - memset(s->synth_buf, 0, sizeof(s->synth_buf)); - s->last_buf_size = 0; + mp_flush(avctx->priv_data); } #if CONFIG_MP3ADU_DECODER || CONFIG_MP3ADUFLOAT_DECODER @@ -1908,11 +1912,8 @@ static void flush_mp3on4(AVCodecContext *avctx) int i; MP3On4DecodeContext *s = avctx->priv_data; - for (i = 0; i < s->frames; i++) { - MPADecodeContext *m = s->mp3decctx[i]; - memset(m->synth_buf, 0, sizeof(m->synth_buf)); - m->last_buf_size = 0; - } + for (i = 0; i < s->frames; i++) + mp_flush(s->mp3decctx[i]); } diff --git a/tests/Makefile b/tests/Makefile index 6fb2eddaf6..54987afee4 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -75,7 +75,6 @@ include $(SRC_PATH)/tests/fate/audio.mak include $(SRC_PATH)/tests/fate/bmp.mak include $(SRC_PATH)/tests/fate/cdxl.mak include $(SRC_PATH)/tests/fate/cover-art.mak -include $(SRC_PATH)/tests/fate/dct.mak include $(SRC_PATH)/tests/fate/demux.mak include $(SRC_PATH)/tests/fate/dfa.mak include $(SRC_PATH)/tests/fate/dpcm.mak diff --git a/tests/fate/audio.mak b/tests/fate/audio.mak index 44b0c24db2..7c68cbe3cf 100644 --- a/tests/fate/audio.mak +++ b/tests/fate/audio.mak @@ -1,35 +1,35 @@ -FATE_BINKAUDIO += fate-binkaudio-dct +FATE_BINKAUDIO-$(call DEMDEC, BINK, BINKAUDIO_DCT) += fate-binkaudio-dct fate-binkaudio-dct: CMD = pcm -i $(SAMPLES)/bink/binkaudio_dct.bik fate-binkaudio-dct: REF = $(SAMPLES)/bink/binkaudio_dct.pcm fate-binkaudio-dct: FUZZ = 2 -FATE_BINKAUDIO += fate-binkaudio-rdft +FATE_BINKAUDIO-$(call DEMDEC, BINK, BINKAUDIO_RDFT) += fate-binkaudio-rdft fate-binkaudio-rdft: CMD = pcm -i $(SAMPLES)/bink/binkaudio_rdft.bik fate-binkaudio-rdft: REF = $(SAMPLES)/bink/binkaudio_rdft.pcm fate-binkaudio-rdft: FUZZ = 2 -$(FATE_BINKAUDIO): CMP = oneoff +$(FATE_BINKAUDIO-yes): CMP = oneoff -FATE_SAMPLES_AUDIO += $(FATE_BINKAUDIO) -fate-binkaudio: $(FATE_BINKAUDIO) +FATE_SAMPLES_AUDIO += $(FATE_BINKAUDIO-yes) +fate-binkaudio: $(FATE_BINKAUDIO-yes) -FATE_SAMPLES_AUDIO += fate-bmv-audio +FATE_SAMPLES_AUDIO-$(call DEMDEC, BMV, BMV_AUDIO) += fate-bmv-audio fate-bmv-audio: CMD = framecrc -i $(SAMPLES)/bmv/SURFING-partial.BMV -vn -FATE_SAMPLES_AUDIO += fate-delphine-cin-audio +FATE_SAMPLES_AUDIO-$(call DEMDEC, DSICIN, DSICINAUDIO) += fate-delphine-cin-audio fate-delphine-cin-audio: CMD = framecrc -i $(SAMPLES)/delphine-cin/LOGO-partial.CIN -vn -FATE_SAMPLES_AUDIO += fate-dts +FATE_SAMPLES_AUDIO-$(call DEMDEC, MPEGTS, DCA) += fate-dts fate-dts: CMD = pcm -i $(SAMPLES)/dts/dts.ts fate-dts: CMP = oneoff fate-dts: REF = $(SAMPLES)/dts/dts.pcm -FATE_SAMPLES_AUDIO += fate-imc +FATE_SAMPLES_AUDIO-$(call DEMDEC, AVI, IMC) += fate-imc fate-imc: CMD = pcm -i $(SAMPLES)/imc/imc.avi fate-imc: CMP = oneoff fate-imc: REF = $(SAMPLES)/imc/imc.pcm -FATE_SAMPLES_AUDIO += fate-nellymoser +FATE_SAMPLES_AUDIO-$(call DEMDEC, FLV, NELLYMOSER) += fate-nellymoser fate-nellymoser: CMD = pcm -i $(SAMPLES)/nellymoser/nellymoser.flv fate-nellymoser: CMP = oneoff fate-nellymoser: REF = $(SAMPLES)/nellymoser/nellymoser.pcm @@ -46,16 +46,16 @@ fate-nellymoser-aref-encode: SIZE_TOLERANCE = 268 FATE_SAMPLES_AUDIO += fate-paf-audio fate-paf-audio: CMD = framecrc -i $(SAMPLES)/paf/hod1-partial.paf -vn -FATE_SAMPLES_AUDIO += fate-sierra-vmd-audio +FATE_SAMPLES_AUDIO-$(call DEMDEC, VMD, VMDAUDIO) += fate-sierra-vmd-audio fate-sierra-vmd-audio: CMD = framecrc -i $(SAMPLES)/vmd/12.vmd -vn -FATE_SAMPLES_AUDIO += fate-smacker-audio +FATE_SAMPLES_AUDIO-$(call DEMDEC, SMACKER, SMACKAUD) += fate-smacker-audio fate-smacker-audio: CMD = framecrc -i $(SAMPLES)/smacker/wetlogo.smk -vn FATE_SAMPLES_AUDIO += fate-vima fate-vima: CMD = framecrc -i $(SAMPLES)/smush/ronin_part.znm -vn -FATE_SAMPLES_AUDIO += fate-ws_snd +FATE_SAMPLES_AUDIO-$(call DEMDEC, WSVQA, WS_SND1) += fate-ws_snd fate-ws_snd: CMD = md5 -i $(SAMPLES)/vqa/ws_snd.vqa -f s16le FATE_SAMPLES_FFMPEG += $(FATE_SAMPLES_AUDIO) diff --git a/tests/fate/dct.mak b/tests/fate/dct.mak deleted file mode 100644 index d79cb9157d..0000000000 --- a/tests/fate/dct.mak +++ /dev/null @@ -1,5 +0,0 @@ -FATE-yes += fate-idct8x8 -fate-idct8x8: libavcodec/dct-test$(EXESUF) -fate-idct8x8: CMD = run libavcodec/dct-test -i -fate-idct8x8: REF = /dev/null -fate-idct8x8: CMP = null diff --git a/tests/fate/libavcodec.mak b/tests/fate/libavcodec.mak index e7831bb083..6e81f57688 100644 --- a/tests/fate/libavcodec.mak +++ b/tests/fate/libavcodec.mak @@ -1,17 +1,23 @@ -FATE_LIBAVCODEC += fate-golomb +FATE_LIBAVCODEC-$(CONFIG_GOLOMB) += fate-golomb fate-golomb: libavcodec/golomb-test$(EXESUF) fate-golomb: CMD = run libavcodec/golomb-test fate-golomb: REF = /dev/null -FATE_LIBAVCODEC += fate-iirfilter +FATE_LIBAVCODEC-yes += fate-idct8x8 +fate-idct8x8: libavcodec/dct-test$(EXESUF) +fate-idct8x8: CMD = run libavcodec/dct-test -i +fate-idct8x8: CMP = null +fate-idct8x8: REF = /dev/null + +FATE_LIBAVCODEC-yes += fate-iirfilter fate-iirfilter: libavcodec/iirfilter-test$(EXESUF) fate-iirfilter: CMD = run libavcodec/iirfilter-test -FATE_LIBAVCODEC += fate-rangecoder +FATE_LIBAVCODEC-$(CONFIG_RANGECODER) += fate-rangecoder fate-rangecoder: libavcodec/rangecoder-test$(EXESUF) fate-rangecoder: CMD = run libavcodec/rangecoder-test fate-rangecoder: CMP = null fate-rangecoder: REF = /dev/null -FATE-$(CONFIG_AVCODEC) += $(FATE_LIBAVCODEC) -fate-libavcodec: $(FATE_LIBAVCODEC) +FATE-$(CONFIG_AVCODEC) += $(FATE_LIBAVCODEC-yes) +fate-libavcodec: $(FATE_LIBAVCODEC-yes) |