Merge commit 'ec444c84cfd30ef34a4e7b4ec7ee77d7e5250d25'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 23 Oct 2012 13:08:55 +0000 (15:08 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 23 Oct 2012 13:08:55 +0000 (15:08 +0200)
* 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>
1  2 
libavcodec/mpegaudiodec.c
tests/Makefile
tests/fate/audio.mak

@@@ -2,20 -2,20 +2,20 @@@
   * MPEG Audio decoder
   * Copyright (c) 2001, 2002 Fabrice Bellard
   *
 - * This file is part of Libav.
 + * This file is part of FFmpeg.
   *
 - * Libav is free software; you can redistribute it and/or
 + * FFmpeg is free software; you can redistribute it and/or
   * modify it under the terms of the GNU Lesser General Public
   * License as published by the Free Software Foundation; either
   * version 2.1 of the License, or (at your option) any later version.
   *
 - * Libav is distributed in the hope that it will be useful,
 + * FFmpeg is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   * Lesser General Public License for more details.
   *
   * You should have received a copy of the GNU Lesser General Public
 - * License along with Libav; if not, write to the Free Software
 + * License along with FFmpeg; if not, write to the Free Software
   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
   */
  
@@@ -25,8 -25,6 +25,8 @@@
   */
  
  #include "libavutil/audioconvert.h"
 +#include "libavutil/avassert.h"
 +#include "libavutil/libm.h"
  #include "avcodec.h"
  #include "get_bits.h"
  #include "mathops.h"
@@@ -205,8 -203,6 +205,8 @@@ static void ff_compute_band_indexes(MPA
  {
      if (g->block_type == 2) {
          if (g->switch_point) {
 +            if(s->sample_rate_index == 8)
 +                av_log_ask_for_sample(s->avctx, "switch point in 8khz\n");
              /* if switched mode, we handle the 36 first samples as
                  long blocks.  For 8000Hz, we handle the 72 first
                  exponents as long blocks */
@@@ -266,10 -262,7 +266,10 @@@ static inline int l3_unscale(int value
      e  = table_4_3_exp  [4 * value + (exponent & 3)];
      m  = table_4_3_value[4 * value + (exponent & 3)];
      e -= exponent >> 2;
 -    assert(e >= 1);
 +#ifdef DEBUG
 +    if(e < 1)
 +        av_log(0, AV_LOG_WARNING, "l3_unscale: e is %d\n", e);
 +#endif
      if (e > 31)
          return 0;
      m = (m + (1 << (e - 1))) >> e;
@@@ -333,7 -326,7 +333,7 @@@ static av_cold void decode_init_static(
                   INIT_VLC_USE_NEW_STATIC);
          offset += huff_vlc_tables_sizes[i];
      }
 -    assert(offset == FF_ARRAY_ELEMS(huff_vlc_tables));
 +    av_assert0(offset == FF_ARRAY_ELEMS(huff_vlc_tables));
  
      offset = 0;
      for (i = 0; i < 2; i++) {
                   INIT_VLC_USE_NEW_STATIC);
          offset += huff_quad_vlc_tables_sizes[i];
      }
 -    assert(offset == FF_ARRAY_ELEMS(huff_quad_vlc_tables));
 +    av_assert0(offset == FF_ARRAY_ELEMS(huff_quad_vlc_tables));
  
      for (i = 0; i < 9; i++) {
          k = 0;
  
          for (j = 0; j < 2; j++) {
              e = -(j + 1) * ((i + 1) >> 1);
 -            f = pow(2.0, e / 4.0);
 +            f = exp2(e / 4.0);
              k = i & 1;
              is_table_lsf[j][k ^ 1][i] = FIXR(f);
              is_table_lsf[j][k    ][i] = FIXR(1.0);
@@@ -833,7 -826,7 +833,7 @@@ static void switch_buffer(MPADecodeCont
      if (s->in_gb.buffer && *pos >= s->gb.size_in_bits) {
          s->gb           = s->in_gb;
          s->in_gb.buffer = NULL;
 -        assert((get_bits_count(&s->gb) & 7) == 0);
 +        av_assert2((get_bits_count(&s->gb) & 7) == 0);
          skip_bits_long(&s->gb, *pos - *end_pos);
          *end_pos2 =
          *end_pos  = *end_pos2 + get_bits_count(&s->gb) - *pos;
@@@ -962,7 -955,7 +962,7 @@@ static int huffman_decode(MPADecodeCont
                  s_index -= 4;
                  skip_bits_long(&s->gb, last_pos - pos);
                  av_log(s->avctx, AV_LOG_INFO, "overread, skip %d enddists: %d %d\n", last_pos - pos, end_pos-pos, end_pos2-pos);
 -                if(s->err_recognition & AV_EF_BITSTREAM)
 +                if(s->err_recognition & (AV_EF_BITSTREAM|AV_EF_COMPLIANT))
                      s_index=0;
                  break;
              }
      }
      /* skip extension bits */
      bits_left = end_pos2 - get_bits_count(&s->gb);
 -    if (bits_left < 0 && (s->err_recognition & AV_EF_BUFFER)) {
 +    if (bits_left < 0 && (s->err_recognition & (AV_EF_BUFFER|AV_EF_COMPLIANT))) {
          av_log(s->avctx, AV_LOG_ERROR, "bits_left=%d\n", bits_left);
          s_index=0;
 -    } else if (bits_left > 0 && (s->err_recognition & AV_EF_BUFFER)) {
 +    } else if (bits_left > 0 && (s->err_recognition & (AV_EF_BUFFER|AV_EF_AGGRESSIVE))) {
          av_log(s->avctx, AV_LOG_ERROR, "bits_left=%d\n", bits_left);
          s_index = 0;
      }
@@@ -1172,17 -1165,6 +1172,17 @@@ found2
  }
  
  #if CONFIG_FLOAT
 +#if HAVE_MIPSFPU
 +#   include "mips/compute_antialias_float.h"
 +#endif /* HAVE_MIPSFPU */
 +#else
 +#if HAVE_MIPSDSPR1
 +#   include "mips/compute_antialias_fixed.h"
 +#endif /* HAVE_MIPSDSPR1 */
 +#endif /* CONFIG_FLOAT */
 +
 +#ifndef compute_antialias
 +#if CONFIG_FLOAT
  #define AA(j) do {                                                      \
          float tmp0 = ptr[-1-j];                                         \
          float tmp1 = ptr[   j];                                         \
@@@ -1228,7 -1210,6 +1228,7 @@@ static void compute_antialias(MPADecode
          ptr += 18;
      }
  }
 +#endif /* compute_antialias */
  
  static void compute_imdct(MPADecodeContext *s, GranuleDef *g,
                            INTFLOAT *sb_samples, INTFLOAT *mdct_buf)
@@@ -1398,8 -1379,9 +1398,8 @@@ static int mp_decode_layer3(MPADecodeCo
      if (!s->adu_mode) {
          int skip;
          const uint8_t *ptr = s->gb.buffer + (get_bits_count(&s->gb)>>3);
 -        int extrasize = av_clip(get_bits_left(&s->gb) >> 3, 0,
 -                                FFMAX(0, LAST_BUF_SIZE - s->last_buf_size));
 -        assert((get_bits_count(&s->gb) & 7) == 0);
 +        int extrasize = av_clip(get_bits_left(&s->gb) >> 3, 0, EXTRABYTES);
 +        av_assert1((get_bits_count(&s->gb) & 7) == 0);
          /* now we get bits from the main_data_begin offset */
          av_dlog(s->avctx, "seekback:%d, lastbuf:%d\n",
                  main_data_begin, s->last_buf_size);
          s->in_gb = s->gb;
          init_get_bits(&s->gb, s->last_buf, s->last_buf_size*8);
  #if !UNCHECKED_BITSTREAM_READER
 -        s->gb.size_in_bits_plus8 += extrasize * 8;
 +        s->gb.size_in_bits_plus8 += FFMAX(extrasize, LAST_BUF_SIZE - s->last_buf_size) * 8;
  #endif
          s->last_buf_size <<= 3;
          for (gr = 0; gr < nb_granules && (s->last_buf_size >> 3) < main_data_begin; gr++) {
@@@ -1604,7 -1586,7 +1604,7 @@@ static int mp_decode_frame(MPADecodeCon
          }
  
          align_get_bits(&s->gb);
 -        assert((get_bits_count(&s->gb) & 7) == 0);
 +        av_assert1((get_bits_count(&s->gb) & 7) == 0);
          i = get_bits_left(&s->gb) >> 3;
  
          if (i < 0 || i > BACKSTEP_SIZE || nb_frames < 0) {
                  av_log(s->avctx, AV_LOG_ERROR, "invalid new backstep %d\n", i);
              i = FFMIN(BACKSTEP_SIZE, buf_size - HEADER_SIZE);
          }
 -        assert(i <= buf_size - HEADER_SIZE && i >= 0);
 +        av_assert1(i <= buf_size - HEADER_SIZE && i >= 0);
          memcpy(s->last_buf + s->last_buf_size, s->gb.buffer + buf_size - HEADER_SIZE - i, i);
          s->last_buf_size += i;
      }
  
 +    if(nb_frames < 0)
 +        return nb_frames;
 +
      /* get output buffer */
      if (!samples) {
          s->frame.nb_samples = s->avctx->frame_size;
@@@ -1656,19 -1635,10 +1656,19 @@@ static int decode_frame(AVCodecContext 
      uint32_t header;
      int out_size;
  
 +    while(buf_size && !*buf){
 +        buf++;
 +        buf_size--;
 +    }
 +
      if (buf_size < HEADER_SIZE)
          return AVERROR_INVALIDDATA;
  
      header = AV_RB32(buf);
 +    if (header>>8 == AV_RB32("TAG")>>8) {
 +        av_log(avctx, AV_LOG_DEBUG, "discarding ID3 tag\n");
 +        return buf_size;
 +    }
      if (ff_mpa_check_header(header) < 0) {
          av_log(avctx, AV_LOG_ERROR, "Header missing\n");
          return AVERROR_INVALIDDATA;
          av_log(avctx, AV_LOG_ERROR, "incomplete frame\n");
          return AVERROR_INVALIDDATA;
      } else if (s->frame_size < buf_size) {
 +        av_log(avctx, AV_LOG_DEBUG, "incorrect frame size - multiple frames in buffer?\n");
          buf_size= s->frame_size;
      }
  
      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
@@@ -1728,8 -1701,7 +1732,8 @@@ static int decode_frame_adu(AVCodecCont
      int buf_size        = avpkt->size;
      MPADecodeContext *s = avctx->priv_data;
      uint32_t header;
 -    int len, out_size;
 +    int len;
 +    int av_unused out_size;
  
      len = buf_size;
  
@@@ -1908,11 -1880,8 +1912,8 @@@ static void flush_mp3on4(AVCodecContex
      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]);
  }
  
  
@@@ -1930,7 -1899,7 +1931,7 @@@ static int decode_frame_mp3on4(AVCodecC
      int fr, j, n, ch, ret;
  
      /* get output buffer */
 -    s->frame->nb_samples = MPA_FRAME_SIZE;
 +    s->frame->nb_samples = s->frames * MPA_FRAME_SIZE;
      if ((ret = avctx->get_buffer(avctx, s->frame)) < 0) {
          av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
          return ret;
          fsize = AV_RB16(buf) >> 4;
          fsize = FFMIN3(fsize, len, MPA_MAX_CODED_FRAME_SIZE);
          m     = s->mp3decctx[fr];
 -        assert(m != NULL);
 +        av_assert1(m);
  
          if (fsize < HEADER_SIZE) {
              av_log(avctx, AV_LOG_ERROR, "Frame size smaller than header size\n");
diff --combined tests/Makefile
@@@ -1,18 -1,6 +1,18 @@@
 +FFSERVER_REFFILE = $(SRC_PATH)/tests/ffserver.regression.ref
 +
  VREF = tests/vsynth1/00.pgm
  AREF = tests/data/asynth1.sw
  
 +
 +$(AREF): CMP=
 +
 +ffservertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/data/asynth1.sw
 +      @echo
 +      @echo "Unfortunately ffserver is broken and therefore its regression"
 +      @echo "test fails randomly. Treat the results accordingly."
 +      @echo
 +      $(SRC_PATH)/tests/ffserver-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/ffserver.conf
 +
  OBJDIRS += tests/data tests/vsynth1
  
  tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF) | tests/vsynth1
@@@ -30,16 -18,7 +30,16 @@@ tests/data/vsynth1.yuv: tests/videogen$
  tests/data/vsynth2.yuv: tests/rotozoom$(HOSTEXESUF) | tests/data
        $(M)$< $(SRC_PATH)/tests/lena.pnm $@
  
 -tests/data/asynth% tests/data/vsynth%.yuv tests/vsynth%/00.pgm: TAG = GEN
 +tests/data/ffprobe-test.nut: ffmpeg$(EXESUF) | tests/data
 +      $(M)$(TARGET_EXEC) ./$< \
 +        -f lavfi -i "aevalsrc=sin(400*PI*2*t)::d=0.125[out0]; testsrc=d=0.125[out1]; testsrc=s=100x100:d=0.125[out2]" \
 +        -f ffmetadata -i $(SRC_PATH)/tests/test.ffmeta \
 +        -flags +bitexact -map 0:0 -map 0:1 -map 0:2 -map_metadata 1 \
 +        -map_metadata:s:0 1:s:0 -map_metadata:s:1 1:s:1 \
 +        -vcodec rawvideo -acodec pcm_s16le \
 +        -y $@ 2>/dev/null
 +
 +tests/data/%.sw tests/data/asynth% tests/data/vsynth%.yuv tests/vsynth%/00.pgm tests/data/%.nut: TAG = GEN
  
  ALLYES  = $(strip $(call XYES, $(1)))
  XYES    = $(if $(strip $(1)),                                           \
@@@ -75,12 -54,10 +75,11 @@@ include $(SRC_PATH)/tests/fate/audio.ma
  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
  include $(SRC_PATH)/tests/fate/ea.mak
 +include $(SRC_PATH)/tests/fate/ffprobe.mak
  include $(SRC_PATH)/tests/fate/filter.mak
  include $(SRC_PATH)/tests/fate/flac.mak
  include $(SRC_PATH)/tests/fate/fft.mak
@@@ -90,13 -67,11 +89,13 @@@ include $(SRC_PATH)/tests/fate/indeo.ma
  include $(SRC_PATH)/tests/fate/libavcodec.mak
  include $(SRC_PATH)/tests/fate/libavformat.mak
  include $(SRC_PATH)/tests/fate/libavutil.mak
 +include $(SRC_PATH)/tests/fate/mapchan.mak
  include $(SRC_PATH)/tests/fate/lossless-audio.mak
  include $(SRC_PATH)/tests/fate/lossless-video.mak
  include $(SRC_PATH)/tests/fate/microsoft.mak
  include $(SRC_PATH)/tests/fate/mp3.mak
  include $(SRC_PATH)/tests/fate/mpc.mak
 +include $(SRC_PATH)/tests/fate/options.mak
  include $(SRC_PATH)/tests/fate/pcm.mak
  include $(SRC_PATH)/tests/fate/probe.mak
  include $(SRC_PATH)/tests/fate/prores.mak
@@@ -104,7 -79,6 +103,7 @@@ include $(SRC_PATH)/tests/fate/qt.ma
  include $(SRC_PATH)/tests/fate/qtrle.mak
  include $(SRC_PATH)/tests/fate/real.mak
  include $(SRC_PATH)/tests/fate/screen.mak
 +include $(SRC_PATH)/tests/fate/subtitles.mak
  include $(SRC_PATH)/tests/fate/utvideo.mak
  include $(SRC_PATH)/tests/fate/video.mak
  include $(SRC_PATH)/tests/fate/voice.mak
@@@ -114,42 -88,34 +113,42 @@@ include $(SRC_PATH)/tests/fate/vqf.ma
  include $(SRC_PATH)/tests/fate/wavpack.mak
  include $(SRC_PATH)/tests/fate/wma.mak
  
 -FATE_AVCONV += $(FATE_AVCONV-yes)
 -FATE-$(CONFIG_AVCONV) += $(FATE_AVCONV)
 +FATE_FFMPEG += $(FATE_FFMPEG-yes) $(FATE_AVCONV) $(FATE_AVCONV-yes)
 +FATE-$(CONFIG_FFMPEG) += $(FATE_FFMPEG)
 +FATE-$(CONFIG_FFPROBE) += $(FATE_FFPROBE)
  
  FATE_SAMPLES_AVCONV           += $(FATE_SAMPLES_AVCONV-yes)
 -FATE_SAMPLES-$(CONFIG_AVCONV) += $(FATE_SAMPLES_AVCONV)
 -FATE_SAMPLES += $(FATE_SAMPLES-yes)
 +FATE_EXTERN-$(CONFIG_FFMPEG)  += $(FATE_SAMPLES_AVCONV) $(FATE_SAMPLES_FFMPEG) $(FATE_SAMPLES_FFPROBE)
 +FATE_EXTERN += $(FATE_EXTERN-yes)
  
  FATE += $(FATE-yes)
  FATE += $(FATE_LIBAVUTIL)
  
 -$(FATE_AVCONV) $(FATE_SAMPLES_AVCONV): avconv$(EXESUF)
 +$(FATE_FFMPEG) $(FATE_SAMPLES_AVCONV) $(FATE_SAMPLES_FFMPEG): ffmpeg$(EXESUF)
 +
 +$(FATE_FFPROBE) $(FATE_SAMPLES_FFPROBE): ffprobe$(EXESUF)
  
  ifdef SAMPLES
 -FATE += $(FATE_SAMPLES)
 +FATE += $(FATE_FULL) $(FATE_FULL-yes)
 +FATE += $(FATE_EXTERN)
  fate-rsync:
 -      rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES)
 +      rsync -vaLW --timeout=60 --contimeout=60 rsync://fate-suite.ffmpeg.org/fate-suite/ $(SAMPLES)
  else
 +fate::
 +      @echo "warning: only a subset of the fate tests will be run because SAMPLES is not specified"
  fate-rsync:
        @echo "use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite"
 -$(FATE_SAMPLES):
 +$(FATE_EXTERN):
        @echo "$@ requires external samples and SAMPLES not specified"; false
  endif
  
  FATE_UTILS = base64 tiny_psnr
  
 -fate: $(FATE)
 +TOOL = ffmpeg
 +
 +fate:: $(FATE)
  
 -$(FATE): $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
 +$(FATE) $(FATE_TESTS-no): $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
        @echo "TEST    $(@:fate-%=%)"
        $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' '$(CMP_UNIT)'
  
@@@ -159,7 -125,7 +158,7 @@@ fate-list
  clean:: testclean
  
  testclean:
 -      $(RM) -r tests/vsynth1 tests/data
 +      $(RM) -r tests/vsynth1 tests/data tools/lavfi-showfiltfmts$(EXESUF)
        $(RM) $(CLEANSUFFIXES:%=tests/%)
        $(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
  
diff --combined tests/fate/audio.mak
@@@ -1,62 -1,44 +1,62 @@@
- 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_AVCONV += $(FATE_BINKAUDIO-yes)
++FATE_SAMPLES_AUDIO += $(FATE_BINKAUDIO-yes)
+ fate-binkaudio: $(FATE_BINKAUDIO-yes)
  
- FATE_SAMPLES_AUDIO += fate-bmv-audio
 -FATE_SAMPLES_AVCONV-$(call DEMDEC, BMV, BMV_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_AVCONV-$(call DEMDEC, DSICIN, DSICINAUDIO) += 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_AVCONV-$(call DEMDEC, MPEGTS, DCA) += 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_AVCONV-$(call DEMDEC, AVI, IMC) += 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_AVCONV-$(call DEMDEC, FLV, NELLYMOSER) += 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
  
 -FATE_SAMPLES_AVCONV-$(call DEMDEC, VMD, VMDAUDIO) += fate-sierra-vmd-audio
 +FATE_SAMPLES_AUDIO += fate-nellymoser-aref-encode
 +fate-nellymoser-aref-encode: $(AREF) ./tests/data/asynth-16000-1.wav
 +fate-nellymoser-aref-encode: CMD = enc_dec_pcm flv wav s16le $(REF) -c:a nellymoser
 +fate-nellymoser-aref-encode: CMP = stddev
 +fate-nellymoser-aref-encode: REF = ./tests/data/asynth-16000-1.wav
 +fate-nellymoser-aref-encode: CMP_SHIFT = -244
 +fate-nellymoser-aref-encode: CMP_TARGET = 9612
 +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_AVCONV-$(call DEMDEC, SMACKER, SMACKAUD) += 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_AVCONV-$(call DEMDEC, WSVQA, WS_SND1) += fate-ws_snd
 +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)
 +fate-audio: $(FATE_SAMPLES_AUDIO)