From 2cf5d291104d38771407441193bc1fd931aa9984 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sat, 25 May 2013 12:35:12 +0200 Subject: [PATCH 1/2] indeo4: reuse context block VLC for band instead of defaulting Currently if no custom block VLC is specified for band, a default block VLC will be used, while the global block VLC stored in the context should be used instead. This fixes decoding of one sample I have. --- libavcodec/indeo4.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c index eb34688775..75714350a4 100644 --- a/libavcodec/indeo4.c +++ b/libavcodec/indeo4.c @@ -362,9 +362,12 @@ static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band, } /* decode block huffman codebook */ - if (ff_ivi_dec_huff_desc(&ctx->gb, get_bits1(&ctx->gb), IVI_BLK_HUFF, - &band->blk_vlc, avctx)) - return AVERROR_INVALIDDATA; + if (!get_bits1(&ctx->gb)) + band->blk_vlc.tab = ctx->blk_vlc.tab; + else + if (ff_ivi_dec_huff_desc(&ctx->gb, 1, IVI_BLK_HUFF, + &band->blk_vlc, avctx)) + return AVERROR_INVALIDDATA; /* select appropriate rvmap table for this band */ band->rvmap_sel = get_bits1(&ctx->gb) ? get_bits(&ctx->gb, 3) : 8; From 4a27a52a1f74016095b7aee1b4a422cf62217ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 20 May 2013 01:46:21 +0300 Subject: [PATCH 2/2] fate: Don't use files from SRC_PATH in the actual tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If building out of tree, make sure the filter scripts are copied into the build tree before running tests. This makes sure that SRC_PATH doesn't need to exist on the remote system (or doesn't need to exist at the same path). Signed-off-by: Martin Storsjö --- tests/Makefile | 6 +++++- tests/fate/filter-audio.mak | 3 ++- tests/fate/filter-video.mak | 6 ++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 1b3f319405..0951bdec3e 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,7 +1,7 @@ VREF = tests/vsynth1/00.pgm AREF = tests/data/asynth1.sw -OBJDIRS += tests/data tests/vsynth1 +OBJDIRS += tests/data tests/vsynth1 tests/data/filtergraphs $(VREF): tests/videogen$(HOSTEXESUF) | tests/vsynth1 $(M)./$< 'tests/vsynth1/' @@ -20,6 +20,10 @@ tests/data/vsynth2.yuv: tests/rotozoom$(HOSTEXESUF) | tests/data tests/data/asynth% tests/data/vsynth%.yuv tests/vsynth%/00.pgm: TAG = GEN +tests/data/filtergraphs/%: TAG = COPY +tests/data/filtergraphs/%: $(SRC_PATH)/tests/filtergraphs/% | tests/data/filtergraphs + $(M)cp $< $@ + CHKCFG = $(if $($(1))$(!$(1)),$($(1)), $(error No such config: $(1))) ALLYES = $(strip $(call XYES, $(1))) diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index ac025c4b08..bab1685f79 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -42,9 +42,10 @@ $(FATE_ATRIM): SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav FATE_FILTER-$(call FILTERDEMDECENCMUX, ATRIM, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_ATRIM) FATE_AFILTER-$(call FILTERDEMDECENCMUX, CHANNELMAP, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-channelmap +fate-filter-channelmap: tests/data/filtergraphs/channelmap fate-filter-channelmap: SRC = $(TARGET_PATH)/tests/data/asynth-44100-6.wav fate-filter-channelmap: tests/data/asynth-44100-6.wav -fate-filter-channelmap: CMD = md5 -i $(SRC) -filter_complex_script $(SRC_PATH)/tests/filtergraphs/channelmap -f wav -flags +bitexact +fate-filter-channelmap: CMD = md5 -i $(SRC) -filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/channelmap -f wav -flags +bitexact fate-filter-channelmap: CMP = oneline fate-filter-channelmap: REF = 21f1977c4f9705e2057083f84764e685 diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index f4e813c707..c911d0d252 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -34,10 +34,12 @@ FATE_FILTER_VSYNTH-$(CONFIG_NEGATE_FILTER) += fate-filter-negate fate-filter-negate: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf negate FATE_FILTER_VSYNTH-$(CONFIG_OVERLAY_FILTER) += fate-filter-overlay -fate-filter-overlay: CMD = framecrc -c:v pgmyuv -i $(SRC) -c:v pgmyuv -i $(SRC) -filter_complex_script $(SRC_PATH)/tests/filtergraphs/overlay +fate-filter-overlay: tests/data/filtergraphs/overlay +fate-filter-overlay: CMD = framecrc -c:v pgmyuv -i $(SRC) -c:v pgmyuv -i $(SRC) -filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/overlay FATE_FILTER_VSYNTH-$(call ALLYES, SETPTS_FILTER SETTB_FILTER) += fate-filter-setpts -fate-filter-setpts: CMD = framecrc -c:v pgmyuv -i $(SRC) -filter_script $(SRC_PATH)/tests/filtergraphs/setpts +fate-filter-setpts: tests/data/filtergraphs/setpts +fate-filter-setpts: CMD = framecrc -c:v pgmyuv -i $(SRC) -filter_script $(TARGET_PATH)/tests/data/filtergraphs/setpts FATE_FILTER_VSYNTH-$(CONFIG_TRANSPOSE_FILTER) += fate-filter-transpose fate-filter-transpose: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf transpose