summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-16 01:23:15 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-16 01:23:15 +0100
commit175cc378b3bd970caf1641e5df3361d6233747e1 (patch)
treed237cb08b1b6909154a007d3c06f0dab61b9700f
parent56669837ce18d15d757a144712a082b9cb535c94 (diff)
parentd3b8bde2f14f78109a892e57f544bf840cf6d4fc (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: movenc: Rudimentary IODs support. v410enc: fix output buffer size check v410enc: include correct headers fate: add -pix_fmt rgb48le to r210 test flvenc: Support muxing 16 kHz nellymoser configure: refactor list of programs into a variable fate: add r210 decoder test fate: split off Indeo FATE tests into their own file fate: split off ATRAC FATE tests into their own file fate: Add FATE tests for v410 encoder and decoder ARM: fix external symbol refs in rv40 asm westwood: Make sure audio header info is present when parsing audio packets libgsm: Reset the MS mode of GSM in the flush function libgsm: Set options on the right object ARM: dca: disable optimised decode_blockcodes() for old gcc Conflicts: configure libavformat/movenc.c libavformat/movenc.h tests/fate2.mak tests/ref/acodec/alac tests/ref/vsynth1/mpeg4 tests/ref/vsynth2/mpeg4 Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rwxr-xr-xconfigure21
-rw-r--r--libavcodec/arm/dca.h2
-rw-r--r--libavcodec/arm/rv40dsp_neon.S4
-rw-r--r--libavcodec/libgsm.c5
-rw-r--r--libavcodec/v410enc.c4
-rw-r--r--libavformat/flvenc.c3
-rw-r--r--libavformat/movenc.c39
-rw-r--r--libavformat/movenc.h4
-rw-r--r--libavformat/westwood.c5
-rw-r--r--tests/Makefile2
-rw-r--r--tests/fate.mak6
-rw-r--r--tests/fate/atrac.mak19
-rw-r--r--tests/fate/indeo.mak8
-rw-r--r--tests/fate2.mak23
-rw-r--r--tests/ref/acodec/alac4
-rw-r--r--tests/ref/fate/r2103
-rw-r--r--tests/ref/vsynth1/mpeg44
-rw-r--r--tests/ref/vsynth2/mpeg44
18 files changed, 101 insertions, 59 deletions
diff --git a/configure b/configure
index d59e474909..ac0cb20962 100755
--- a/configure
+++ b/configure
@@ -978,8 +978,17 @@ COMPONENT_LIST="
protocols
"
+PROGRAM_LIST="
+ avconv
+ ffplay
+ ffprobe
+ ffserver
+ ffmpeg
+"
+
CONFIG_LIST="
$COMPONENT_LIST
+ $PROGRAM_LIST
aandct
ac3dsp
avcodec
@@ -994,11 +1003,6 @@ CONFIG_LIST="
dwt
dxva2
fastdiv
- ffmpeg
- avconv
- ffplay
- ffprobe
- ffserver
fft
frei0r
gnutls
@@ -1790,6 +1794,8 @@ target_os_default=$(tolower $(uname -s))
host_os=$target_os_default
# configurable options
+enable $PROGRAM_LIST
+
enable avcodec
enable avdevice
enable avfilter
@@ -1800,11 +1806,6 @@ enable stripping
enable swresample
enable swscale
-enable ffmpeg
-enable ffplay
-enable ffprobe
-enable ffserver
-
enable asm
enable debug
enable doc
diff --git a/libavcodec/arm/dca.h b/libavcodec/arm/dca.h
index 9ff7f7c75e..9b0efc0e64 100644
--- a/libavcodec/arm/dca.h
+++ b/libavcodec/arm/dca.h
@@ -25,7 +25,7 @@
#include "config.h"
#include "libavutil/intmath.h"
-#if HAVE_ARMV6 && HAVE_INLINE_ASM
+#if HAVE_ARMV6 && HAVE_INLINE_ASM && AV_GCC_VERSION_AT_LEAST(4,4)
#define decode_blockcodes decode_blockcodes
static inline int decode_blockcodes(int code1, int code2, int levels,
diff --git a/libavcodec/arm/rv40dsp_neon.S b/libavcodec/arm/rv40dsp_neon.S
index a4313d89f9..d9e1b7c959 100644
--- a/libavcodec/arm/rv40dsp_neon.S
+++ b/libavcodec/arm/rv40dsp_neon.S
@@ -372,7 +372,7 @@ endfunc
function ff_\type\()_rv40_qpel8_mc33_neon, export=1
mov r3, #8
- b ff_\type\()_pixels8_xy2_neon
+ b X(ff_\type\()_pixels8_xy2_neon)
endfunc
function ff_\type\()_rv40_qpel8_mc13_neon, export=1
@@ -652,7 +652,7 @@ endfunc
function ff_\type\()_rv40_qpel16_mc33_neon, export=1
mov r3, #16
- b ff_\type\()_pixels16_xy2_neon
+ b X(ff_\type\()_pixels16_xy2_neon)
endfunc
.endm
diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c
index 9ba9da9e3f..ed4962a3b2 100644
--- a/libavcodec/libgsm.c
+++ b/libavcodec/libgsm.c
@@ -155,7 +155,7 @@ static av_cold int libgsm_decode_init(AVCodecContext *avctx) {
break;
case CODEC_ID_GSM_MS: {
int one = 1;
- gsm_option(avctx->priv_data, GSM_OPT_WAV49, &one);
+ gsm_option(s->state, GSM_OPT_WAV49, &one);
avctx->frame_size = 2 * GSM_FRAME_SIZE;
avctx->block_align = GSM_MS_BLOCK_SIZE;
}
@@ -212,9 +212,12 @@ static int libgsm_decode_frame(AVCodecContext *avctx, void *data,
static void libgsm_flush(AVCodecContext *avctx) {
LibGSMDecodeContext *s = avctx->priv_data;
+ int one = 1;
gsm_destroy(s->state);
s->state = gsm_create();
+ if (avctx->codec_id == CODEC_ID_GSM_MS)
+ gsm_option(s->state, GSM_OPT_WAV49, &one);
}
AVCodec ff_libgsm_decoder = {
diff --git a/libavcodec/v410enc.c b/libavcodec/v410enc.c
index ea66653412..e6c837eef6 100644
--- a/libavcodec/v410enc.c
+++ b/libavcodec/v410enc.c
@@ -20,8 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/intreadwrite.h"
#include "avcodec.h"
-#include "put_bits.h"
static av_cold int v410_encode_init(AVCodecContext *avctx)
{
@@ -50,7 +50,7 @@ static int v410_encode_frame(AVCodecContext *avctx, uint8_t *buf,
int i, j;
int output_size = 0;
- if (buf_size < avctx->width * avctx->height * 3) {
+ if (buf_size < avctx->width * avctx->height * 4) {
av_log(avctx, AV_LOG_ERROR, "Out buffer is too small.\n");
return AVERROR(ENOMEM);
}
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 2384e81276..3f034bc31a 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -93,6 +93,7 @@ static int get_audio_flags(AVCodecContext *enc){
case 11025:
flags |= FLV_SAMPLERATE_11025HZ;
break;
+ case 16000: //nellymoser only
case 8000: //nellymoser only
case 5512: //not mp3
if(enc->codec_id != CODEC_ID_MP3){
@@ -128,6 +129,8 @@ static int get_audio_flags(AVCodecContext *enc){
case CODEC_ID_NELLYMOSER:
if (enc->sample_rate == 8000) {
flags |= FLV_CODECID_NELLYMOSER_8KHZ_MONO | FLV_SAMPLESSIZE_16BIT;
+ } else if (enc->sample_rate == 16000) {
+ flags |= FLV_CODECID_NELLYMOSER_16KHZ_MONO | FLV_SAMPLESSIZE_16BIT;
} else {
flags |= FLV_CODECID_NELLYMOSER | FLV_SAMPLESSIZE_16BIT;
}
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 442a2717cf..0b5097b567 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -49,6 +49,9 @@ static const AVOption options[] = {
{ "frag_size", "maximum fragment size", offsetof(MOVMuxContext, max_fragment_size), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, 0 },
{ "frag_duration", "maximum fragment duration", offsetof(MOVMuxContext, max_fragment_duration), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, 0 },
FF_RTP_FLAG_OPTS(MOVMuxContext, rtp_flags),
+ { "skip_iods", "Skip writing iods atom.", offsetof(MOVMuxContext, iods_skip), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM},
+ { "iods_audio_profile", "iods audio profile atom.", offsetof(MOVMuxContext, iods_audio_profile), AV_OPT_TYPE_INT, {.dbl = -1}, -1, 255, AV_OPT_FLAG_ENCODING_PARAM},
+ { "iods_video_profile", "iods video profile atom.", offsetof(MOVMuxContext, iods_video_profile), AV_OPT_TYPE_INT, {.dbl = -1}, -1, 255, AV_OPT_FLAG_ENCODING_PARAM},
{ NULL },
};
@@ -1489,21 +1492,34 @@ static int mov_write_traf_tag(AVIOContext *pb, MOVTrack *track, AVStream *st)
return updateSize(pb, pos);
}
-#if 0
-/* TODO: Not sorted out, but not necessary either */
static int mov_write_iods_tag(AVIOContext *pb, MOVMuxContext *mov)
{
- avio_wb32(pb, 0x15); /* size */
+ int i, has_audio = 0, has_video = 0;
+ int64_t pos = avio_tell(pb);
+ int audio_profile = mov->iods_audio_profile;
+ int video_profile = mov->iods_video_profile;
+ for (i = 0; i < mov->nb_streams; i++) {
+ if(mov->tracks[i].entry > 0) {
+ has_audio |= mov->tracks[i].enc->codec_type == AVMEDIA_TYPE_AUDIO;
+ has_video |= mov->tracks[i].enc->codec_type == AVMEDIA_TYPE_VIDEO;
+ }
+ }
+ if (audio_profile < 0)
+ audio_profile = 0xFF - has_audio;
+ if (video_profile < 0)
+ video_profile = 0xFF - has_video;
+ avio_wb32(pb, 0x0); /* size */
ffio_wfourcc(pb, "iods");
avio_wb32(pb, 0); /* version & flags */
- avio_wb16(pb, 0x1007);
- avio_w8(pb, 0);
- avio_wb16(pb, 0x4fff);
- avio_wb16(pb, 0xfffe);
- avio_wb16(pb, 0x01ff);
- return 0x15;
+ putDescr(pb, 0x10, 7);
+ avio_wb16(pb, 0x004f);
+ avio_w8(pb, 0xff);
+ avio_w8(pb, 0xff);
+ avio_w8(pb, audio_profile);
+ avio_w8(pb, video_profile);
+ avio_w8(pb, 0xff);
+ return updateSize(pb, pos);
}
-#endif
static int mov_write_mvhd_tag(AVIOContext *pb, MOVMuxContext *mov)
{
@@ -1968,7 +1984,8 @@ static int mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov,
}
mov_write_mvhd_tag(pb, mov);
- //mov_write_iods_tag(pb, mov);
+ if (mov->mode != MODE_MOV && !mov->iods_skip)
+ mov_write_iods_tag(pb, mov);
for (i=0; i<mov->nb_streams; i++) {
if(mov->tracks[i].entry > 0) {
mov_write_trak_tag(pb, mov, &(mov->tracks[i]), i < s->nb_streams ? s->streams[i] : NULL);
diff --git a/libavformat/movenc.h b/libavformat/movenc.h
index a3701bba0a..f6c95adea3 100644
--- a/libavformat/movenc.h
+++ b/libavformat/movenc.h
@@ -125,6 +125,10 @@ typedef struct MOVMuxContext {
int64_t reserved_moov_pos;
int max_fragment_duration;
int max_fragment_size;
+
+ int iods_skip;
+ int iods_video_profile;
+ int iods_audio_profile;
} MOVMuxContext;
#define FF_MOV_FLAG_RTP_HINT 1
diff --git a/libavformat/westwood.c b/libavformat/westwood.c
index c232d5c829..c46c3ba10e 100644
--- a/libavformat/westwood.c
+++ b/libavformat/westwood.c
@@ -331,6 +331,11 @@ static int wsvqa_read_packet(AVFormatContext *s,
skip_byte = chunk_size & 0x01;
+ if ((chunk_type == SND2_TAG || chunk_type == SND1_TAG) && wsvqa->audio_channels == 0) {
+ av_log(s, AV_LOG_ERROR, "audio chunk without any audio header information found\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if ((chunk_type == SND1_TAG) || (chunk_type == SND2_TAG) || (chunk_type == VQFR_TAG)) {
ret= av_get_packet(pb, pkt, chunk_size);
diff --git a/tests/Makefile b/tests/Makefile
index 640e6300cc..b44db7dbd4 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -48,10 +48,12 @@ include $(SRC_PATH)/tests/fate/ac3.mak
include $(SRC_PATH)/tests/fate/als.mak
include $(SRC_PATH)/tests/fate/amrnb.mak
include $(SRC_PATH)/tests/fate/amrwb.mak
+include $(SRC_PATH)/tests/fate/atrac.mak
include $(SRC_PATH)/tests/fate/dct.mak
include $(SRC_PATH)/tests/fate/fft.mak
include $(SRC_PATH)/tests/fate/h264.mak
include $(SRC_PATH)/tests/fate/image.mak
+include $(SRC_PATH)/tests/fate/indeo.mak
include $(SRC_PATH)/tests/fate/libavutil.mak
include $(SRC_PATH)/tests/fate/mapchan.mak
include $(SRC_PATH)/tests/fate/lossless-audio.mak
diff --git a/tests/fate.mak b/tests/fate.mak
index 81c5c33fa3..067aaad1dc 100644
--- a/tests/fate.mak
+++ b/tests/fate.mak
@@ -126,12 +126,6 @@ FATE_TESTS += fate-iff-ilbm
fate-iff-ilbm: CMD = framecrc -i $(SAMPLES)/iff/lms-matriks.ilbm -pix_fmt rgb24
FATE_TESTS += fate-iff-pcm
fate-iff-pcm: CMD = md5 -i $(SAMPLES)/iff/Bells -f s16le
-FATE_TESTS += fate-indeo2
-fate-indeo2: CMD = framecrc -i $(SAMPLES)/rt21/VPAR0026.AVI
-FATE_TESTS += fate-indeo3
-fate-indeo3: CMD = framecrc -i $(SAMPLES)/iv32/cubes.mov
-FATE_TESTS += fate-indeo5
-fate-indeo5: CMD = framecrc -i $(SAMPLES)/iv50/Educ_Movie_DeadlyForce.avi -an
FATE_TESTS += fate-interplay-mve-16bit
fate-interplay-mve-16bit: CMD = framecrc -i $(SAMPLES)/interplay-mve/descent3-level5-16bit-partial.mve -pix_fmt rgb24
FATE_TESTS += fate-interplay-mve-8bit
diff --git a/tests/fate/atrac.mak b/tests/fate/atrac.mak
new file mode 100644
index 0000000000..1d586c6e79
--- /dev/null
+++ b/tests/fate/atrac.mak
@@ -0,0 +1,19 @@
+FATE_TESTS += fate-atrac1
+fate-atrac1: CMD = pcm -i $(SAMPLES)/atrac1/test_tones_small.aea
+fate-atrac1: CMP = oneoff
+fate-atrac1: REF = $(SAMPLES)/atrac1/test_tones_small.pcm
+
+FATE_TESTS += fate-atrac3-1
+fate-atrac3-1: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_066_small.wav
+fate-atrac3-1: CMP = oneoff
+fate-atrac3-1: REF = $(SAMPLES)/atrac3/mc_sich_at3_066_small.pcm
+
+FATE_TESTS += fate-atrac3-2
+fate-atrac3-2: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_105_small.wav
+fate-atrac3-2: CMP = oneoff
+fate-atrac3-2: REF = $(SAMPLES)/atrac3/mc_sich_at3_105_small.pcm
+
+FATE_TESTS += fate-atrac3-3
+fate-atrac3-3: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_132_small.wav
+fate-atrac3-3: CMP = oneoff
+fate-atrac3-3: REF = $(SAMPLES)/atrac3/mc_sich_at3_132_small.pcm
diff --git a/tests/fate/indeo.mak b/tests/fate/indeo.mak
new file mode 100644
index 0000000000..df07392790
--- /dev/null
+++ b/tests/fate/indeo.mak
@@ -0,0 +1,8 @@
+FATE_TESTS += fate-indeo2
+fate-indeo2: CMD = framecrc -i $(SAMPLES)/rt21/VPAR0026.AVI
+
+FATE_TESTS += fate-indeo3
+fate-indeo3: CMD = framecrc -i $(SAMPLES)/iv32/cubes.mov
+
+FATE_TESTS += fate-indeo5
+fate-indeo5: CMD = framecrc -i $(SAMPLES)/iv50/Educ_Movie_DeadlyForce.avi -an
diff --git a/tests/fate2.mak b/tests/fate2.mak
index b0591a3314..e78a8a3231 100644
--- a/tests/fate2.mak
+++ b/tests/fate2.mak
@@ -40,26 +40,6 @@ fate-truespeech: CMD = pcm -i $(SAMPLES)/truespeech/a6.wav
fate-truespeech: CMP = oneoff
fate-truespeech: REF = $(SAMPLES)/truespeech/a6.pcm
-FATE_TESTS += fate-atrac1
-fate-atrac1: CMD = pcm -i $(SAMPLES)/atrac1/test_tones_small.aea
-fate-atrac1: CMP = oneoff
-fate-atrac1: REF = $(SAMPLES)/atrac1/test_tones_small.pcm
-
-FATE_TESTS += fate-atrac3-1
-fate-atrac3-1: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_066_small.wav
-fate-atrac3-1: CMP = oneoff
-fate-atrac3-1: REF = $(SAMPLES)/atrac3/mc_sich_at3_066_small.pcm
-
-FATE_TESTS += fate-atrac3-2
-fate-atrac3-2: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_105_small.wav
-fate-atrac3-2: CMP = oneoff
-fate-atrac3-2: REF = $(SAMPLES)/atrac3/mc_sich_at3_105_small.pcm
-
-FATE_TESTS += fate-atrac3-3
-fate-atrac3-3: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_132_small.wav
-fate-atrac3-3: CMP = oneoff
-fate-atrac3-3: REF = $(SAMPLES)/atrac3/mc_sich_at3_132_small.pcm
-
FATE_TESTS += fate-gsm
fate-gsm: CMD = framecrc -i $(SAMPLES)/gsm/sample-gsm-8000.mov -t 10
@@ -132,3 +112,6 @@ fate-v410dec: CMD = framecrc -i $(SAMPLES)/v410/lenav410.mov -pix_fmt yuv444p10l
FATE_TESTS += fate-v410enc
fate-v410enc: tests/vsynth1/00.pgm
fate-v410enc: CMD = md5 -f image2 -vcodec pgmyuv -i $(TARGET_PATH)/tests/vsynth1/%02d.pgm -flags +bitexact -vcodec v410 -f avi
+
+FATE_TESTS += fate-r210
+fate-r210: CMD = framecrc -i $(SAMPLES)/r210/r210.avi -pix_fmt rgb48le
diff --git a/tests/ref/acodec/alac b/tests/ref/acodec/alac
index db6393ac46..39264c53c7 100644
--- a/tests/ref/acodec/alac
+++ b/tests/ref/acodec/alac
@@ -1,4 +1,4 @@
-4fe333ff79e86cca6ba8c109cc08263e *./tests/data/acodec/alac.m4a
-389166 ./tests/data/acodec/alac.m4a
+bff6044a7f303d8482775f4fcdc2d272 *./tests/data/acodec/alac.m4a
+389190 ./tests/data/acodec/alac.m4a
64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/alac.acodec.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/fate/r210 b/tests/ref/fate/r210
new file mode 100644
index 0000000000..238a1364e5
--- /dev/null
+++ b/tests/ref/fate/r210
@@ -0,0 +1,3 @@
+0, 0, 1843200, 0xbd414b93
+0, 3003, 1843200, 0x23298f1f
+0, 6006, 1843200, 0x5a56df19
diff --git a/tests/ref/vsynth1/mpeg4 b/tests/ref/vsynth1/mpeg4
index fbf3b8fdcc..3d6f985e5a 100644
--- a/tests/ref/vsynth1/mpeg4
+++ b/tests/ref/vsynth1/mpeg4
@@ -1,4 +1,4 @@
-f32960be0f05be8b2ed03447e1eaea6f *./tests/data/vsynth1/odivx.mp4
-539996 ./tests/data/vsynth1/odivx.mp4
+146bf838d7efd524595c68145337dfef *./tests/data/vsynth1/odivx.mp4
+540020 ./tests/data/vsynth1/odivx.mp4
8828a375448dc5c2215163ba70656f89 *./tests/data/mpeg4.vsynth1.out.yuv
stddev: 7.97 PSNR: 30.10 MAXDIFF: 105 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth2/mpeg4 b/tests/ref/vsynth2/mpeg4
index 726e1d9436..35729a0a7a 100644
--- a/tests/ref/vsynth2/mpeg4
+++ b/tests/ref/vsynth2/mpeg4
@@ -1,4 +1,4 @@
-4d092ca067362a61b9c96f5f12a1ab5a *./tests/data/vsynth2/odivx.mp4
-119649 ./tests/data/vsynth2/odivx.mp4
+ad44d4d5a20fbd40641703a5de46fd5c *./tests/data/vsynth2/odivx.mp4
+119673 ./tests/data/vsynth2/odivx.mp4
90a3577850239083a9042bef33c50e85 *./tests/data/mpeg4.vsynth2.out.yuv
stddev: 5.34 PSNR: 33.57 MAXDIFF: 83 bytes: 7603200/ 7603200