History

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

Michael Niedermayer committed 14 years ago

Commit 175cc372 parents 5666983 d3b8bde18 files · +101 −59Browse files

Unified · Split

18 files
  1. configure +11 −10
  2. libavcodec/arm/dca.h +1 −1
  3. libavcodec/arm/rv40dsp_neon.S +2 −2
  4. libavcodec/libgsm.c +4 −1
  5. libavcodec/v410enc.c +2 −2
  6. libavformat/flvenc.c +3 −0
  7. libavformat/movenc.c +28 −11
  8. libavformat/movenc.h +4 −0
  9. libavformat/westwood.c +5 −0
  10. tests/Makefile +2 −0
  11. tests/fate.mak +0 −6
  12. tests/fate/atrac.mak +19 −0
  13. tests/fate/indeo.mak +8 −0
  14. tests/fate2.mak +3 −20
  15. tests/ref/acodec/alac +2 −2
  16. tests/ref/fate/r210 +3 −0
  17. tests/ref/vsynth1/mpeg4 +2 −2
  18. tests/ref/vsynth2/mpeg4 +2 −2
configure+11−10
@@ -978,8 +978,17 @@ COMPONENT_LIST=" · 977 unmodified lines
978978 protocols
979979 "
980980
981+PROGRAM_LIST="
982+ avconv
983+ ffplay
984+ ffprobe
985+ ffserver
986+ ffmpeg
987+"
988+
981989 CONFIG_LIST="
982990 $COMPONENT_LIST
991+ $PROGRAM_LIST
983992 aandct
984993 ac3dsp
985994 avcodec
@@ -994,11 +1003,6 @@ CONFIG_LIST=" · 8 unmodified lines
9941003 dwt
9951004 dxva2
9961005 fastdiv
997− ffmpeg
998− avconv
999− ffplay
1000− ffprobe
1001− ffserver
10021006 fft
10031007 frei0r
10041008 gnutls
@@ -1790,6 +1794,8 @@ target_os_default=$(tolower $(uname -s)) · 785 unmodified lines
17901794 host_os=$target_os_default
17911795
17921796 # configurable options
1797+enable $PROGRAM_LIST
1798+
17931799 enable avcodec
17941800 enable avdevice
17951801 enable avfilter
@@ -1800,11 +1806,6 @@ enable stripping · 4 unmodified lines
18001806 enable swresample
18011807 enable swscale
18021808
1803−enable ffmpeg
1804−enable ffplay
1805−enable ffprobe
1806−enable ffserver
1807−
18081809 enable asm
18091810 enable debug
18101811 enable doc
libavcodec/arm/dca.h+1−1
@@ -25,7 +25,7 @@ · 24 unmodified lines
2525 #include "config.h"
2626 #include "libavutil/intmath.h"
2727
28−#if HAVE_ARMV6 && HAVE_INLINE_ASM
28+#if HAVE_ARMV6 && HAVE_INLINE_ASM && AV_GCC_VERSION_AT_LEAST(4,4)
2929
3030 #define decode_blockcodes decode_blockcodes
3131 static inline int decode_blockcodes(int code1, int code2, int levels,
libavcodec/arm/rv40dsp_neon.S+2−2
@@ -372,7 +372,7 @@ endfunc · 371 unmodified lines
372372
373373 function ff_\type\()_rv40_qpel8_mc33_neon, export=1
374374 mov r3, #8
375− b ff_\type\()_pixels8_xy2_neon
375+ b X(ff_\type\()_pixels8_xy2_neon)
376376 endfunc
377377
378378 function ff_\type\()_rv40_qpel8_mc13_neon, export=1
@@ -652,7 +652,7 @@ endfunc · 273 unmodified lines
652652
653653 function ff_\type\()_rv40_qpel16_mc33_neon, export=1
654654 mov r3, #16
655− b ff_\type\()_pixels16_xy2_neon
655+ b X(ff_\type\()_pixels16_xy2_neon)
656656 endfunc
657657 .endm
658658
libavcodec/libgsm.c+4−1
@@ -155,7 +155,7 @@ static av_cold int libgsm_decode_init(AVCodecContext *avctx) { · 154 unmodified lines
155155 break;
156156 case CODEC_ID_GSM_MS: {
157157 int one = 1;
158− gsm_option(avctx->priv_data, GSM_OPT_WAV49, &one);
158+ gsm_option(s->state, GSM_OPT_WAV49, &one);
159159 avctx->frame_size = 2 * GSM_FRAME_SIZE;
160160 avctx->block_align = GSM_MS_BLOCK_SIZE;
161161 }
@@ -212,9 +212,12 @@ static int libgsm_decode_frame(AVCodecContext *avctx, void *data, · 50 unmodified lines
212212
213213 static void libgsm_flush(AVCodecContext *avctx) {
214214 LibGSMDecodeContext *s = avctx->priv_data;
215+ int one = 1;
215216
216217 gsm_destroy(s->state);
217218 s->state = gsm_create();
219+ if (avctx->codec_id == CODEC_ID_GSM_MS)
220+ gsm_option(s->state, GSM_OPT_WAV49, &one);
218221 }
219222
220223 AVCodec ff_libgsm_decoder = {
libavcodec/v410enc.c+2−2
@@ -20,8 +20,8 @@ · 19 unmodified lines
2020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2121 */
2222
23+#include "libavutil/intreadwrite.h"
2324 #include "avcodec.h"
24−#include "put_bits.h"
2525
2626 static av_cold int v410_encode_init(AVCodecContext *avctx)
2727 {
@@ -50,7 +50,7 @@ static int v410_encode_frame(AVCodecContext *avctx, uint8_t *buf, · 22 unmodified lines
5050 int i, j;
5151 int output_size = 0;
5252
53− if (buf_size < avctx->width * avctx->height * 3) {
53+ if (buf_size < avctx->width * avctx->height * 4) {
5454 av_log(avctx, AV_LOG_ERROR, "Out buffer is too small.\n");
5555 return AVERROR(ENOMEM);
5656 }
libavformat/flvenc.c+3−0
@@ -93,6 +93,7 @@ static int get_audio_flags(AVCodecContext *enc){ · 92 unmodified lines
9393 case 11025:
9494 flags |= FLV_SAMPLERATE_11025HZ;
9595 break;
96+ case 16000: //nellymoser only
9697 case 8000: //nellymoser only
9798 case 5512: //not mp3
9899 if(enc->codec_id != CODEC_ID_MP3){
@@ -128,6 +129,8 @@ static int get_audio_flags(AVCodecContext *enc){ · 29 unmodified lines
128129 case CODEC_ID_NELLYMOSER:
129130 if (enc->sample_rate == 8000) {
130131 flags |= FLV_CODECID_NELLYMOSER_8KHZ_MONO | FLV_SAMPLESSIZE_16BIT;
132+ } else if (enc->sample_rate == 16000) {
133+ flags |= FLV_CODECID_NELLYMOSER_16KHZ_MONO | FLV_SAMPLESSIZE_16BIT;
131134 } else {
132135 flags |= FLV_CODECID_NELLYMOSER | FLV_SAMPLESSIZE_16BIT;
133136 }
libavformat/movenc.c+28−11
@@ -49,6 +49,9 @@ static const AVOption options[] = { · 48 unmodified lines
4949 { "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 },
5050 { "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 },
5151 FF_RTP_FLAG_OPTS(MOVMuxContext, rtp_flags),
52+ { "skip_iods", "Skip writing iods atom.", offsetof(MOVMuxContext, iods_skip), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM},
53+ { "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},
54+ { "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},
5255 { NULL },
5356 };
5457
@@ -1489,21 +1492,34 @@ static int mov_write_traf_tag(AVIOContext *pb, MOVTrack *track, AVStream *st) · 1434 unmodified lines
14891492 return updateSize(pb, pos);
14901493 }
14911494
1492−#if 0
1493−/* TODO: Not sorted out, but not necessary either */
14941495 static int mov_write_iods_tag(AVIOContext *pb, MOVMuxContext *mov)
14951496 {
1496− avio_wb32(pb, 0x15); /* size */
1497+ int i, has_audio = 0, has_video = 0;
1498+ int64_t pos = avio_tell(pb);
1499+ int audio_profile = mov->iods_audio_profile;
1500+ int video_profile = mov->iods_video_profile;
1501+ for (i = 0; i < mov->nb_streams; i++) {
1502+ if(mov->tracks[i].entry > 0) {
1503+ has_audio |= mov->tracks[i].enc->codec_type == AVMEDIA_TYPE_AUDIO;
1504+ has_video |= mov->tracks[i].enc->codec_type == AVMEDIA_TYPE_VIDEO;
1505+ }
1506+ }
1507+ if (audio_profile < 0)
1508+ audio_profile = 0xFF - has_audio;
1509+ if (video_profile < 0)
1510+ video_profile = 0xFF - has_video;
1511+ avio_wb32(pb, 0x0); /* size */
14971512 ffio_wfourcc(pb, "iods");
14981513 avio_wb32(pb, 0); /* version & flags */
1499− avio_wb16(pb, 0x1007);
1500− avio_w8(pb, 0);
1501− avio_wb16(pb, 0x4fff);
1502− avio_wb16(pb, 0xfffe);
1503− avio_wb16(pb, 0x01ff);
1504− return 0x15;
1514+ putDescr(pb, 0x10, 7);
1515+ avio_wb16(pb, 0x004f);
1516+ avio_w8(pb, 0xff);
1517+ avio_w8(pb, 0xff);
1518+ avio_w8(pb, audio_profile);
1519+ avio_w8(pb, video_profile);
1520+ avio_w8(pb, 0xff);
1521+ return updateSize(pb, pos);
15051522 }
1506−#endif
15071523
15081524 static int mov_write_mvhd_tag(AVIOContext *pb, MOVMuxContext *mov)
15091525 {
@@ -1968,7 +1984,8 @@ static int mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov, · 458 unmodified lines
19681984 }
19691985
19701986 mov_write_mvhd_tag(pb, mov);
1971− //mov_write_iods_tag(pb, mov);
1987+ if (mov->mode != MODE_MOV && !mov->iods_skip)
1988+ mov_write_iods_tag(pb, mov);
19721989 for (i=0; i<mov->nb_streams; i++) {
19731990 if(mov->tracks[i].entry > 0) {
19741991 mov_write_trak_tag(pb, mov, &(mov->tracks[i]), i < s->nb_streams ? s->streams[i] : NULL);
libavformat/movenc.h+4−0
@@ -125,6 +125,10 @@ typedef struct MOVMuxContext { · 124 unmodified lines
125125 int64_t reserved_moov_pos;
126126 int max_fragment_duration;
127127 int max_fragment_size;
128+
129+ int iods_skip;
130+ int iods_video_profile;
131+ int iods_audio_profile;
128132 } MOVMuxContext;
129133
130134 #define FF_MOV_FLAG_RTP_HINT 1
libavformat/westwood.c+5−0
@@ -331,6 +331,11 @@ static int wsvqa_read_packet(AVFormatContext *s, · 330 unmodified lines
331331
332332 skip_byte = chunk_size & 0x01;
333333
334+ if ((chunk_type == SND2_TAG || chunk_type == SND1_TAG) && wsvqa->audio_channels == 0) {
335+ av_log(s, AV_LOG_ERROR, "audio chunk without any audio header information found\n");
336+ return AVERROR_INVALIDDATA;
337+ }
338+
334339 if ((chunk_type == SND1_TAG) || (chunk_type == SND2_TAG) || (chunk_type == VQFR_TAG)) {
335340
336341 ret= av_get_packet(pb, pkt, chunk_size);
tests/Makefile+2−0
@@ -48,10 +48,12 @@ include $(SRC_PATH)/tests/fate/ac3.mak · 47 unmodified lines
4848 include $(SRC_PATH)/tests/fate/als.mak
4949 include $(SRC_PATH)/tests/fate/amrnb.mak
5050 include $(SRC_PATH)/tests/fate/amrwb.mak
51+include $(SRC_PATH)/tests/fate/atrac.mak
5152 include $(SRC_PATH)/tests/fate/dct.mak
5253 include $(SRC_PATH)/tests/fate/fft.mak
5354 include $(SRC_PATH)/tests/fate/h264.mak
5455 include $(SRC_PATH)/tests/fate/image.mak
56+include $(SRC_PATH)/tests/fate/indeo.mak
5557 include $(SRC_PATH)/tests/fate/libavutil.mak
5658 include $(SRC_PATH)/tests/fate/mapchan.mak
5759 include $(SRC_PATH)/tests/fate/lossless-audio.mak
tests/fate.mak+0−6
@@ -126,12 +126,6 @@ FATE_TESTS += fate-iff-ilbm · 125 unmodified lines
126126 fate-iff-ilbm: CMD = framecrc -i $(SAMPLES)/iff/lms-matriks.ilbm -pix_fmt rgb24
127127 FATE_TESTS += fate-iff-pcm
128128 fate-iff-pcm: CMD = md5 -i $(SAMPLES)/iff/Bells -f s16le
129−FATE_TESTS += fate-indeo2
130−fate-indeo2: CMD = framecrc -i $(SAMPLES)/rt21/VPAR0026.AVI
131−FATE_TESTS += fate-indeo3
132−fate-indeo3: CMD = framecrc -i $(SAMPLES)/iv32/cubes.mov
133−FATE_TESTS += fate-indeo5
134−fate-indeo5: CMD = framecrc -i $(SAMPLES)/iv50/Educ_Movie_DeadlyForce.avi -an
135129 FATE_TESTS += fate-interplay-mve-16bit
136130 fate-interplay-mve-16bit: CMD = framecrc -i $(SAMPLES)/interplay-mve/descent3-level5-16bit-partial.mve -pix_fmt rgb24
137131 FATE_TESTS += fate-interplay-mve-8bit
tests/fate/atrac.mak+19−0
@@ -0,0 +1,19 @@
1+FATE_TESTS += fate-atrac1
2+fate-atrac1: CMD = pcm -i $(SAMPLES)/atrac1/test_tones_small.aea
3+fate-atrac1: CMP = oneoff
4+fate-atrac1: REF = $(SAMPLES)/atrac1/test_tones_small.pcm
5+
6+FATE_TESTS += fate-atrac3-1
7+fate-atrac3-1: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_066_small.wav
8+fate-atrac3-1: CMP = oneoff
9+fate-atrac3-1: REF = $(SAMPLES)/atrac3/mc_sich_at3_066_small.pcm
10+
11+FATE_TESTS += fate-atrac3-2
12+fate-atrac3-2: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_105_small.wav
13+fate-atrac3-2: CMP = oneoff
14+fate-atrac3-2: REF = $(SAMPLES)/atrac3/mc_sich_at3_105_small.pcm
15+
16+FATE_TESTS += fate-atrac3-3
17+fate-atrac3-3: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_132_small.wav
18+fate-atrac3-3: CMP = oneoff
19+fate-atrac3-3: REF = $(SAMPLES)/atrac3/mc_sich_at3_132_small.pcm
tests/fate/indeo.mak+8−0
@@ -0,0 +1,8 @@
1+FATE_TESTS += fate-indeo2
2+fate-indeo2: CMD = framecrc -i $(SAMPLES)/rt21/VPAR0026.AVI
3+
4+FATE_TESTS += fate-indeo3
5+fate-indeo3: CMD = framecrc -i $(SAMPLES)/iv32/cubes.mov
6+
7+FATE_TESTS += fate-indeo5
8+fate-indeo5: CMD = framecrc -i $(SAMPLES)/iv50/Educ_Movie_DeadlyForce.avi -an
tests/fate2.mak+3−20
@@ -40,26 +40,6 @@ fate-truespeech: CMD = pcm -i $(SAMPLES)/truespeech/a6.wav · 39 unmodified lines
4040 fate-truespeech: CMP = oneoff
4141 fate-truespeech: REF = $(SAMPLES)/truespeech/a6.pcm
4242
43−FATE_TESTS += fate-atrac1
44−fate-atrac1: CMD = pcm -i $(SAMPLES)/atrac1/test_tones_small.aea
45−fate-atrac1: CMP = oneoff
46−fate-atrac1: REF = $(SAMPLES)/atrac1/test_tones_small.pcm
47−
48−FATE_TESTS += fate-atrac3-1
49−fate-atrac3-1: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_066_small.wav
50−fate-atrac3-1: CMP = oneoff
51−fate-atrac3-1: REF = $(SAMPLES)/atrac3/mc_sich_at3_066_small.pcm
52−
53−FATE_TESTS += fate-atrac3-2
54−fate-atrac3-2: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_105_small.wav
55−fate-atrac3-2: CMP = oneoff
56−fate-atrac3-2: REF = $(SAMPLES)/atrac3/mc_sich_at3_105_small.pcm
57−
58−FATE_TESTS += fate-atrac3-3
59−fate-atrac3-3: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_132_small.wav
60−fate-atrac3-3: CMP = oneoff
61−fate-atrac3-3: REF = $(SAMPLES)/atrac3/mc_sich_at3_132_small.pcm
62−
6343 FATE_TESTS += fate-gsm
6444 fate-gsm: CMD = framecrc -i $(SAMPLES)/gsm/sample-gsm-8000.mov -t 10
6545
@@ -132,3 +112,6 @@ fate-v410dec: CMD = framecrc -i $(SAMPLES)/v410/lenav410.mov -pix_fmt yuv444p10l · 66 unmodified lines
132112 FATE_TESTS += fate-v410enc
133113 fate-v410enc: tests/vsynth1/00.pgm
134114 fate-v410enc: CMD = md5 -f image2 -vcodec pgmyuv -i $(TARGET_PATH)/tests/vsynth1/%02d.pgm -flags +bitexact -vcodec v410 -f avi
115+
116+FATE_TESTS += fate-r210
117+fate-r210: CMD = framecrc -i $(SAMPLES)/r210/r210.avi -pix_fmt rgb48le
tests/ref/acodec/alac+2−2
@@ -1,4 +1,4 @@
1−4fe333ff79e86cca6ba8c109cc08263e *./tests/data/acodec/alac.m4a
2−389166 ./tests/data/acodec/alac.m4a
1+bff6044a7f303d8482775f4fcdc2d272 *./tests/data/acodec/alac.m4a
2+389190 ./tests/data/acodec/alac.m4a
33 64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/alac.acodec.out.wav
44 stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
tests/ref/fate/r210+3−0
@@ -0,0 +1,3 @@
1+0, 0, 1843200, 0xbd414b93
2+0, 3003, 1843200, 0x23298f1f
3+0, 6006, 1843200, 0x5a56df19
tests/ref/vsynth1/mpeg4+2−2
@@ -1,4 +1,4 @@
1−f32960be0f05be8b2ed03447e1eaea6f *./tests/data/vsynth1/odivx.mp4
2−539996 ./tests/data/vsynth1/odivx.mp4
1+146bf838d7efd524595c68145337dfef *./tests/data/vsynth1/odivx.mp4
2+540020 ./tests/data/vsynth1/odivx.mp4
33 8828a375448dc5c2215163ba70656f89 *./tests/data/mpeg4.vsynth1.out.yuv
44 stddev: 7.97 PSNR: 30.10 MAXDIFF: 105 bytes: 7603200/ 7603200
tests/ref/vsynth2/mpeg4+2−2
@@ -1,4 +1,4 @@
1−4d092ca067362a61b9c96f5f12a1ab5a *./tests/data/vsynth2/odivx.mp4
2−119649 ./tests/data/vsynth2/odivx.mp4
1+ad44d4d5a20fbd40641703a5de46fd5c *./tests/data/vsynth2/odivx.mp4
2+119673 ./tests/data/vsynth2/odivx.mp4
33 90a3577850239083a9042bef33c50e85 *./tests/data/mpeg4.vsynth2.out.yuv
44 stddev: 5.34 PSNR: 33.57 MAXDIFF: 83 bytes: 7603200/ 7603200

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t