From ea57502c82a91362daeafec392375706fa266d8b Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Sun, 19 Jun 2011 16:19:06 +0100 Subject: [PATCH 01/12] fate: remove output redirections from old regtest scripts All tests are run through the fate-run.sh script which already sets up redirections. Using the outputs set there simplifies things somewhat. Signed-off-by: Mans Rullgard --- tests/codec-regression.sh | 10 ++++------ tests/fate-run.sh | 3 --- tests/lavf-regression.sh | 6 ++---- tests/lavfi-regression.sh | 6 ++---- tests/regression-funcs.sh | 23 ++++++++--------------- 5 files changed, 16 insertions(+), 32 deletions(-) diff --git a/tests/codec-regression.sh b/tests/codec-regression.sh index a858250e2f..ccedbdbfef 100755 --- a/tests/codec-regression.sh +++ b/tests/codec-regression.sh @@ -11,8 +11,6 @@ set -e eval do_$test=y -rm -f "$logfile" - # generate reference for quality check if [ -n "$do_vref" ]; then do_ffmpeg $raw_ref -f image2 -vcodec pgmyuv -i $raw_src -an -f rawvideo @@ -265,14 +263,14 @@ fi if [ -n "$do_mp2" ] ; then do_audio_encoding mp2.mp2 do_audio_decoding -$tiny_psnr $pcm_dst $pcm_ref 2 1924 >> $logfile +$tiny_psnr $pcm_dst $pcm_ref 2 1924 fi if [ -n "$do_ac3_fixed" ] ; then do_audio_encoding ac3.rm "-vn -acodec ac3_fixed" # binaries configured with --disable-sse decode ac3 differently #do_audio_decoding -#$tiny_psnr $pcm_dst $pcm_ref 2 1024 >> $logfile +#$tiny_psnr $pcm_dst $pcm_ref 2 1024 fi if [ -n "$do_g726" ] ; then @@ -318,12 +316,12 @@ fi if [ -n "$do_wmav1" ] ; then do_audio_encoding wmav1.asf "-acodec wmav1" do_ffmpeg_nomd5 $pcm_dst $DEC_OPTS -i $target_path/$file -f wav -$tiny_psnr $pcm_dst $pcm_ref 2 8192 >> $logfile +$tiny_psnr $pcm_dst $pcm_ref 2 8192 fi if [ -n "$do_wmav2" ] ; then do_audio_encoding wmav2.asf "-acodec wmav2" do_ffmpeg_nomd5 $pcm_dst $DEC_OPTS -i $target_path/$file -f wav -$tiny_psnr $pcm_dst $pcm_ref 2 8192 >> $logfile +$tiny_psnr $pcm_dst $pcm_ref 2 8192 fi #if [ -n "$do_vorbis" ] ; then diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 366145d22f..2c744b880f 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -76,9 +76,6 @@ pcm(){ regtest(){ t="${test#$2-}" ref=${base}/ref/$2/$t - cleanfiles="$cleanfiles $outfile $errfile" - outfile=tests/data/regression/$2/$t - errfile=tests/data/$t.$2.err ${base}/${1}-regression.sh $t $2 $3 "$target_exec" "$target_path" "$threads" "$thread_type" } diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index 39e752b3c6..d7e684032c 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -31,9 +31,9 @@ do_image_formats() mkdir -p "$outfile" file=${outfile}%02d.$1 run_ffmpeg $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $2 $ENC_OPTS $3 -t 0.5 -y -qscale 10 $target_path/$file - do_md5sum ${outfile}02.$1 >> $logfile + do_md5sum ${outfile}02.$1 do_ffmpeg_crc $file $DEC_OPTS $3 -i $target_path/$file - wc -c ${outfile}02.$1 >> $logfile + wc -c ${outfile}02.$1 } do_audio_only() @@ -43,8 +43,6 @@ do_audio_only() do_ffmpeg_crc $file $DEC_OPTS $4 -i $target_path/$file } -rm -f "$logfile" - if [ -n "$do_avi" ] ; then do_lavf avi fi diff --git a/tests/lavfi-regression.sh b/tests/lavfi-regression.sh index b2a195a90e..4a483e68a5 100755 --- a/tests/lavfi-regression.sh +++ b/tests/lavfi-regression.sh @@ -11,15 +11,13 @@ set -e eval do_$test=y -rm -f "$logfile" - do_video_filter() { label=$1 filters=$2 shift 2 - printf '%-20s' $label >>$logfile + printf '%-20s' $label run_ffmpeg $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src \ - $ENC_OPTS -vf "$filters" -vcodec rawvideo $* -f nut md5: >>$logfile + $ENC_OPTS -vf "$filters" -vcodec rawvideo $* -f nut md5: } do_lavfi() { diff --git a/tests/regression-funcs.sh b/tests/regression-funcs.sh index e57cdf111e..979157bcf9 100755 --- a/tests/regression-funcs.sh +++ b/tests/regression-funcs.sh @@ -15,10 +15,7 @@ datadir="./tests/data" target_datadir="${target_path}/${datadir}" this="$test.$test_ref" -logdir="$datadir/regression/$test_ref" -logfile="$logdir/$test" outfile="$datadir/$test_ref/" -errfile="$datadir/$this.err" # various files ffmpeg="$target_exec ${target_path}/ffmpeg" @@ -37,12 +34,8 @@ trap 'rm -f -- $cleanfiles' EXIT mkdir -p "$datadir" mkdir -p "$outfile" -mkdir -p "$logdir" - -(exec >&3) 2>/dev/null || exec 3>&2 [ "${V-0}" -gt 0 ] && echov=echov || echov=: -[ "${V-0}" -gt 1 ] || exec 2>$errfile echov(){ echo "$@" >&3 @@ -67,13 +60,13 @@ do_ffmpeg() shift set -- $* ${target_path}/$f run_ffmpeg $* - do_md5sum $f >> $logfile + do_md5sum $f if [ $f = $raw_dst ] ; then - $tiny_psnr $f $raw_ref >> $logfile + $tiny_psnr $f $raw_ref elif [ $f = $pcm_dst ] ; then - $tiny_psnr $f $pcm_ref 2 >> $logfile + $tiny_psnr $f $pcm_ref 2 else - wc -c $f >> $logfile + wc -c $f fi } @@ -84,11 +77,11 @@ do_ffmpeg_nomd5() set -- $* ${target_path}/$f run_ffmpeg $* if [ $f = $raw_dst ] ; then - $tiny_psnr $f $raw_ref >> $logfile + $tiny_psnr $f $raw_ref elif [ $f = $pcm_dst ] ; then - $tiny_psnr $f $pcm_ref 2 >> $logfile + $tiny_psnr $f $pcm_ref 2 else - wc -c $f >> $logfile + wc -c $f fi } @@ -97,7 +90,7 @@ do_ffmpeg_crc() f="$1" shift run_ffmpeg $* -f crc "$target_crcfile" - echo "$f $(cat $crcfile)" >> $logfile + echo "$f $(cat $crcfile)" } do_video_decoding() From 84e70ef004d763262ea4e795341ff240b8b10da3 Mon Sep 17 00:00:00 2001 From: Daniel Kang Date: Tue, 21 Jun 2011 00:30:23 -0400 Subject: [PATCH 02/12] h264: Add x86 assembly for 10-bit weight/biweight H.264 functions. Mainly ported from 8-bit H.264 weight/biweight. Signed-off-by: Diego Biurrun --- libavcodec/x86/Makefile | 1 + libavcodec/x86/h264_weight_10bit.asm | 321 +++++++++++++++++++++++++++ libavcodec/x86/h264dsp_mmx.c | 61 +++++ 3 files changed, 383 insertions(+) create mode 100644 libavcodec/x86/h264_weight_10bit.asm diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile index ea57bd1db6..022ab27766 100644 --- a/libavcodec/x86/Makefile +++ b/libavcodec/x86/Makefile @@ -15,6 +15,7 @@ YASM-OBJS-$(CONFIG_H264DSP) += x86/h264_deblock.o \ x86/h264_idct.o \ x86/h264_idct_10bit.o \ x86/h264_weight.o \ + x86/h264_weight_10bit.o \ YASM-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred.o \ x86/h264_intrapred_10bit.o diff --git a/libavcodec/x86/h264_weight_10bit.asm b/libavcodec/x86/h264_weight_10bit.asm new file mode 100644 index 0000000000..1c58d72d94 --- /dev/null +++ b/libavcodec/x86/h264_weight_10bit.asm @@ -0,0 +1,321 @@ +;***************************************************************************** +;* MMX/SSE2/AVX-optimized 10-bit H.264 weighted prediction code +;***************************************************************************** +;* Copyright (C) 2005-2011 x264 project +;* +;* Authors: Daniel Kang +;* +;* This file is part of Libav. +;* +;* Libav 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, +;* 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 +;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;****************************************************************************** + +%include "x86inc.asm" +%include "x86util.asm" + +SECTION_RODATA 32 + +pw_pixel_max: times 8 dw ((1 << 10)-1) +sq_1: dq 1 + dq 0 + +cextern pw_1 + +SECTION .text + +;----------------------------------------------------------------------------- +; void h264_weight(uint8_t *dst, int stride, int log2_denom, +; int weight, int offset); +;----------------------------------------------------------------------------- +%ifdef ARCH_X86_32 +DECLARE_REG_TMP 2 +%else +DECLARE_REG_TMP 10 +%endif + +%macro WEIGHT_PROLOGUE 1 + mov t0, %1 +.prologue + PROLOGUE 0,5,8 + movifnidn r0, r0mp + movifnidn r1d, r1m + movifnidn r3d, r3m + movifnidn r4d, r4m +%endmacro + +%macro WEIGHT_SETUP 1 + mova m0, [pw_1] + movd m2, r2m + pslld m0, m2 ; 1<h264_idct8_add4 = ff_h264_idct8_add4_10_sse2; #endif + c->weight_h264_pixels_tab[0] = ff_h264_weight_16x16_10_sse2; + c->weight_h264_pixels_tab[1] = ff_h264_weight_16x8_10_sse2; + c->weight_h264_pixels_tab[2] = ff_h264_weight_8x16_10_sse2; + c->weight_h264_pixels_tab[3] = ff_h264_weight_8x8_10_sse2; + c->weight_h264_pixels_tab[4] = ff_h264_weight_8x4_10_sse2; + c->weight_h264_pixels_tab[5] = ff_h264_weight_4x8_10_sse2; + c->weight_h264_pixels_tab[6] = ff_h264_weight_4x4_10_sse2; + c->weight_h264_pixels_tab[7] = ff_h264_weight_4x2_10_sse2; + + c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16x16_10_sse2; + c->biweight_h264_pixels_tab[1] = ff_h264_biweight_16x8_10_sse2; + c->biweight_h264_pixels_tab[2] = ff_h264_biweight_8x16_10_sse2; + c->biweight_h264_pixels_tab[3] = ff_h264_biweight_8x8_10_sse2; + c->biweight_h264_pixels_tab[4] = ff_h264_biweight_8x4_10_sse2; + c->biweight_h264_pixels_tab[5] = ff_h264_biweight_4x8_10_sse2; + c->biweight_h264_pixels_tab[6] = ff_h264_biweight_4x4_10_sse2; + c->biweight_h264_pixels_tab[7] = ff_h264_biweight_4x2_10_sse2; + c->h264_v_loop_filter_chroma= ff_deblock_v_chroma_10_sse2; c->h264_v_loop_filter_chroma_intra= ff_deblock_v_chroma_intra_10_sse2; #if HAVE_ALIGNED_STACK @@ -463,6 +505,25 @@ void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth) c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_10_sse2; #endif } + if (mm_flags&AV_CPU_FLAG_SSE4) { + c->weight_h264_pixels_tab[0] = ff_h264_weight_16x16_10_sse4; + c->weight_h264_pixels_tab[1] = ff_h264_weight_16x8_10_sse4; + c->weight_h264_pixels_tab[2] = ff_h264_weight_8x16_10_sse4; + c->weight_h264_pixels_tab[3] = ff_h264_weight_8x8_10_sse4; + c->weight_h264_pixels_tab[4] = ff_h264_weight_8x4_10_sse4; + c->weight_h264_pixels_tab[5] = ff_h264_weight_4x8_10_sse4; + c->weight_h264_pixels_tab[6] = ff_h264_weight_4x4_10_sse4; + c->weight_h264_pixels_tab[7] = ff_h264_weight_4x2_10_sse4; + + c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16x16_10_sse4; + c->biweight_h264_pixels_tab[1] = ff_h264_biweight_16x8_10_sse4; + c->biweight_h264_pixels_tab[2] = ff_h264_biweight_8x16_10_sse4; + c->biweight_h264_pixels_tab[3] = ff_h264_biweight_8x8_10_sse4; + c->biweight_h264_pixels_tab[4] = ff_h264_biweight_8x4_10_sse4; + c->biweight_h264_pixels_tab[5] = ff_h264_biweight_4x8_10_sse4; + c->biweight_h264_pixels_tab[6] = ff_h264_biweight_4x4_10_sse4; + c->biweight_h264_pixels_tab[7] = ff_h264_biweight_4x2_10_sse4; + } #if HAVE_AVX if (mm_flags&AV_CPU_FLAG_AVX) { c->h264_idct_dc_add = From 6371ce4b0f0535a7f576b8f109d35345e3d11d7d Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 21 Jun 2011 01:11:28 +0200 Subject: [PATCH 03/12] h264: Fix assert that failed to compile with -DDEBUG. The assert referenced a variable that no longer exists since 4:4:4 support. --- libavcodec/h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index dc4acb8379..13a63809a0 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1682,7 +1682,7 @@ static av_always_inline void hl_decode_mb_predict_luma(H264Context *h, int mb_ty uint64_t tr_high; if(dir == DIAG_DOWN_LEFT_PRED || dir == VERT_LEFT_PRED){ const int topright_avail= (h->topright_samples_available<mb_y || linesize <= block_offset[i]); if(!topright_avail){ if (pixel_shift) { tr_high= ((uint16_t*)ptr)[3 - linesize/2]*0x0001000100010001ULL; From 087d93f568962463e3db7bc2895a3d98ce30bfc0 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 15 Jun 2011 13:45:24 +0200 Subject: [PATCH 04/12] swscale: Remove unused variable from ff_bfin_get_unscaled_swscale(). --- libswscale/bfin/swscale_bfin.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libswscale/bfin/swscale_bfin.c b/libswscale/bfin/swscale_bfin.c index c8030ba29f..0c5f004930 100644 --- a/libswscale/bfin/swscale_bfin.c +++ b/libswscale/bfin/swscale_bfin.c @@ -78,8 +78,6 @@ static int yuyvtoyv12_unscaled(SwsContext *c, uint8_t* src[], int srcStride[], i void ff_bfin_get_unscaled_swscale(SwsContext *c) { - SwsFunc swScale = c->swScale; - if (c->dstFormat == PIX_FMT_YUV420P && c->srcFormat == PIX_FMT_UYVY422) { av_log (NULL, AV_LOG_VERBOSE, "selecting Blackfin optimized uyvytoyv12_unscaled\n"); c->swScale = uyvytoyv12_unscaled; From d352df093169f39631f1ec0017a3f186ef85f83c Mon Sep 17 00:00:00 2001 From: ami_stuff Date: Mon, 25 Apr 2011 00:20:27 +0200 Subject: [PATCH 05/12] rawvideo: Support auv2 fourcc. --- libavcodec/raw.c | 1 + libavformat/riff.c | 1 + 2 files changed, 2 insertions(+) diff --git a/libavcodec/raw.c b/libavcodec/raw.c index 7d92aba4a7..bc7c1561e7 100644 --- a/libavcodec/raw.c +++ b/libavcodec/raw.c @@ -61,6 +61,7 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = { { PIX_FMT_UYVY422, MKTAG('A', 'V', '1', 'x') }, /* Avid 1:1x */ { PIX_FMT_UYVY422, MKTAG('A', 'V', 'u', 'p') }, { PIX_FMT_UYVY422, MKTAG('V', 'D', 'T', 'Z') }, /* SoftLab-NSK VideoTizer */ + { PIX_FMT_UYVY422, MKTAG('a', 'u', 'v', '2') }, { PIX_FMT_UYYVYY411, MKTAG('Y', '4', '1', '1') }, { PIX_FMT_GRAY8, MKTAG('G', 'R', 'E', 'Y') }, { PIX_FMT_NV12, MKTAG('N', 'V', '1', '2') }, diff --git a/libavformat/riff.c b/libavformat/riff.c index fe6cc55055..756fc57f01 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -180,6 +180,7 @@ const AVCodecTag ff_codec_bmp_tags[] = { { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '2', 'B') }, { CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'V', '9') }, { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', 'U', '9') }, + { CODEC_ID_RAWVIDEO, MKTAG('a', 'u', 'v', '2') }, { CODEC_ID_FRWU, MKTAG('F', 'R', 'W', 'U') }, { CODEC_ID_R10K, MKTAG('R', '1', '0', 'k') }, { CODEC_ID_R210, MKTAG('r', '2', '1', '0') }, From 682a20114e9ee0272be764c68dc1cf251ff083da Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Mon, 25 Apr 2011 00:27:03 +0200 Subject: [PATCH 06/12] riff: Add M263, XVIX, MMJP, CDV5 fourccs. --- libavformat/riff.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/riff.c b/libavformat/riff.c index 756fc57f01..95e08b28a8 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -40,6 +40,7 @@ const AVCodecTag ff_codec_bmp_tags[] = { { CODEC_ID_H263, MKTAG('L', '2', '6', '3') }, { CODEC_ID_H263, MKTAG('V', 'X', '1', 'K') }, { CODEC_ID_H263, MKTAG('Z', 'y', 'G', 'o') }, + { CODEC_ID_H263, MKTAG('M', '2', '6', '3') }, { CODEC_ID_H263P, MKTAG('H', '2', '6', '3') }, { CODEC_ID_H263I, MKTAG('I', '2', '6', '3') }, /* intel h263 */ { CODEC_ID_H261, MKTAG('H', '2', '6', '1') }, @@ -83,6 +84,7 @@ const AVCodecTag ff_codec_bmp_tags[] = { { CODEC_ID_MPEG4, MKTAG('U', 'L', 'D', 'X') }, { CODEC_ID_MPEG4, MKTAG('G', 'E', 'O', 'V') }, { CODEC_ID_MPEG4, MKTAG('S', 'I', 'P', 'P') }, /* Samsung SHR-6040 */ + { CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'X') }, { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') }, { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '3') }, { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', 'G', '3') }, @@ -107,6 +109,7 @@ const AVCodecTag ff_codec_bmp_tags[] = { { CODEC_ID_DVVIDEO, MKTAG('d', 'v', '5', '0') }, { CODEC_ID_DVVIDEO, MKTAG('c', 'd', 'v', 'c') }, /* Canopus DV */ { CODEC_ID_DVVIDEO, MKTAG('C', 'D', 'V', 'H') }, /* Canopus DV */ + { CODEC_ID_DVVIDEO, MKTAG('C', 'D', 'V', '5') }, /* Canopus DV */ { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', ' ') }, { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', 's') }, { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '1') }, @@ -148,6 +151,7 @@ const AVCodecTag ff_codec_bmp_tags[] = { { CODEC_ID_MJPEG, MKTAG('A', 'V', 'I', '2') }, { CODEC_ID_MJPEG, MKTAG('M', 'T', 'S', 'J') }, { CODEC_ID_MJPEG, MKTAG('Z', 'J', 'P', 'G') }, /* Paradigm Matrix M-JPEG Codec */ + { CODEC_ID_MJPEG, MKTAG('M', 'M', 'J', 'P') }, { CODEC_ID_HUFFYUV, MKTAG('H', 'F', 'Y', 'U') }, { CODEC_ID_FFVHUFF, MKTAG('F', 'F', 'V', 'H') }, { CODEC_ID_CYUV, MKTAG('C', 'Y', 'U', 'V') }, From 2ea1ca1714f655a463b941b115e45a1a2f031f7b Mon Sep 17 00:00:00 2001 From: ami_stuff Date: Wed, 11 May 2011 22:18:15 +0200 Subject: [PATCH 07/12] riff: Add DAVC fourcc. This fourcc is used by the "mpegable AVC" codec and files encoded with this codec decode correctly with our H.264 decoder. --- libavformat/riff.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/riff.c b/libavformat/riff.c index 95e08b28a8..b2e8414b5d 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -33,6 +33,7 @@ const AVCodecTag ff_codec_bmp_tags[] = { { CODEC_ID_H264, MKTAG('X', '2', '6', '4') }, { CODEC_ID_H264, MKTAG('x', '2', '6', '4') }, { CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, + { CODEC_ID_H264, MKTAG('D', 'A', 'V', 'C') }, { CODEC_ID_H264, MKTAG('V', 'S', 'S', 'H') }, { CODEC_ID_H263, MKTAG('H', '2', '6', '3') }, { CODEC_ID_H263, MKTAG('X', '2', '6', '3') }, From a304a833621a793bbf49b796fe1fd11ea1cd54c8 Mon Sep 17 00:00:00 2001 From: Kamil Nowosad Date: Mon, 23 May 2011 23:13:34 +0200 Subject: [PATCH 08/12] riff/img2: Add JPEG 2000 codec IDs. --- libavformat/img2.c | 1 + libavformat/riff.c | 1 + 2 files changed, 2 insertions(+) diff --git a/libavformat/img2.c b/libavformat/img2.c index ec37a38845..4eef62371d 100644 --- a/libavformat/img2.c +++ b/libavformat/img2.c @@ -82,6 +82,7 @@ static const IdStrMap img_tags[] = { { CODEC_ID_SUNRAST , "im24"}, { CODEC_ID_SUNRAST , "sunras"}, { CODEC_ID_JPEG2000 , "jp2"}, + { CODEC_ID_JPEG2000 , "jpc"}, { CODEC_ID_DPX , "dpx"}, { CODEC_ID_PICTOR , "pic"}, { CODEC_ID_NONE , NULL} diff --git a/libavformat/riff.c b/libavformat/riff.c index b2e8414b5d..817349cb82 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -250,6 +250,7 @@ const AVCodecTag ff_codec_bmp_tags[] = { { CODEC_ID_ZMBV, MKTAG('Z', 'M', 'B', 'V') }, { CODEC_ID_KMVC, MKTAG('K', 'M', 'V', 'C') }, { CODEC_ID_CAVS, MKTAG('C', 'A', 'V', 'S') }, + { CODEC_ID_JPEG2000, MKTAG('m', 'j', 'p', '2') }, { CODEC_ID_JPEG2000, MKTAG('M', 'J', '2', 'C') }, { CODEC_ID_VMNC, MKTAG('V', 'M', 'n', 'c') }, { CODEC_ID_TARGA, MKTAG('t', 'g', 'a', ' ') }, From 7ac639654f21aa78e0afa14f6c049ffa2c9078bd Mon Sep 17 00:00:00 2001 From: ami_stuff Date: Fri, 13 May 2011 00:49:29 +0200 Subject: [PATCH 09/12] mov: Support R10g codec identifier. --- libavformat/isom.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/isom.c b/libavformat/isom.c index c65f9317e7..dd4008b69b 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -83,6 +83,7 @@ const AVCodecTag codec_movvideo_tags[] = { { CODEC_ID_RAWVIDEO, MKTAG('b', '4', '8', 'r') }, { CODEC_ID_R10K, MKTAG('R', '1', '0', 'k') }, /* UNCOMPRESSED 10BIT RGB */ + { CODEC_ID_R10K, MKTAG('R', '1', '0', 'g') }, /* UNCOMPRESSED 10BIT RGB */ { CODEC_ID_R210, MKTAG('r', '2', '1', '0') }, /* UNCOMPRESSED 10BIT RGB */ { CODEC_ID_V210, MKTAG('v', '2', '1', '0') }, /* UNCOMPRESSED 10BIT 4:2:2 */ From 53d5cd2c8225e251826c77f8f69a30250038fbd0 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Fri, 13 May 2011 01:08:01 +0200 Subject: [PATCH 10/12] mov: Support Digital Voodoo SD 8 Bit and DTS codec identifiers. --- libavcodec/raw.c | 1 + libavformat/isom.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/libavcodec/raw.c b/libavcodec/raw.c index bc7c1561e7..4bc07b869a 100644 --- a/libavcodec/raw.c +++ b/libavcodec/raw.c @@ -122,6 +122,7 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = { { PIX_FMT_UYVY422, MKTAG('A', 'V', 'U', 'I') }, /* FIXME merge both fields */ { PIX_FMT_YUYV422, MKTAG('y', 'u', 'v', '2') }, { PIX_FMT_YUYV422, MKTAG('y', 'u', 'v', 's') }, + { PIX_FMT_YUYV422, MKTAG('D', 'V', 'O', 'O') }, /* Digital Voodoo SD 8 Bit */ { PIX_FMT_PAL8, MKTAG('W', 'R', 'A', 'W') }, { PIX_FMT_RGB555LE,MKTAG('L', '5', '5', '5') }, { PIX_FMT_RGB565LE,MKTAG('L', '5', '6', '5') }, diff --git a/libavformat/isom.c b/libavformat/isom.c index dd4008b69b..eb17e25474 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -57,6 +57,7 @@ const AVCodecTag ff_mp4_obj_type[] = { { CODEC_ID_VC1 , 0xA3 }, { CODEC_ID_DIRAC , 0xA4 }, { CODEC_ID_AC3 , 0xA5 }, + { CODEC_ID_DTS , 0xA9 }, /* mp4ra.org */ { CODEC_ID_VORBIS , 0xDD }, /* non standard, gpac uses it */ { CODEC_ID_DVD_SUBTITLE, 0xE0 }, /* non standard, see unsupported-embedded-subs-2.mp4 */ { CODEC_ID_QCELP , 0xE1 }, @@ -81,6 +82,7 @@ const AVCodecTag codec_movvideo_tags[] = { { CODEC_ID_RAWVIDEO, MKTAG('A', 'B', 'G', 'R') }, { CODEC_ID_RAWVIDEO, MKTAG('b', '1', '6', 'g') }, { CODEC_ID_RAWVIDEO, MKTAG('b', '4', '8', 'r') }, + { CODEC_ID_RAWVIDEO, MKTAG('D', 'V', 'O', 'O') }, /* Digital Voodoo SD 8 Bit */ { CODEC_ID_R10K, MKTAG('R', '1', '0', 'k') }, /* UNCOMPRESSED 10BIT RGB */ { CODEC_ID_R10K, MKTAG('R', '1', '0', 'g') }, /* UNCOMPRESSED 10BIT RGB */ @@ -243,6 +245,8 @@ const AVCodecTag codec_movaudio_tags[] = { { CODEC_ID_AAC, MKTAG('m', 'p', '4', 'a') }, /* MPEG-4 AAC */ { CODEC_ID_AC3, MKTAG('a', 'c', '-', '3') }, /* ETSI TS 102 366 Annex F */ { CODEC_ID_AC3, MKTAG('s', 'a', 'c', '3') }, /* Nero Recode */ + { CODEC_ID_DTS, MKTAG('d', 't', 's', 'c') }, /* mp4ra.org */ + { CODEC_ID_DTS, MKTAG('D', 'T', 'S', ' ') }, /* non-standard */ { CODEC_ID_AMR_NB, MKTAG('s', 'a', 'm', 'r') }, /* AMR-NB 3gp */ { CODEC_ID_AMR_WB, MKTAG('s', 'a', 'w', 'b') }, /* AMR-WB 3gp */ From f082a0fb420f0367bdd00219fd0fe8fe3caf7bc7 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Sun, 19 Jun 2011 18:41:14 +0100 Subject: [PATCH 11/12] configure: report optimization for size separately This removes an unsightly override of the 'optimizations' setting only to make the configure report print 'small' when --enable-small is used. Signed-off-by: Mans Rullgard --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 31e82fc6db..b26394ec29 100755 --- a/configure +++ b/configure @@ -3006,7 +3006,6 @@ fi if enabled small; then add_cflags $size_cflags - optimizations="small" elif enabled optimizations; then add_cflags $speed_cflags else @@ -3140,6 +3139,7 @@ if enabled sparc; then echo "VIS enabled ${vis-no}" fi echo "debug symbols ${debug-no}" +echo "optimize for size ${small-no}" echo "optimizations ${optimizations-no}" echo "static ${static-no}" echo "shared ${shared-no}" From 67e7dc54049d9b51a0c2168c8265145a9aef7780 Mon Sep 17 00:00:00 2001 From: ami_stuff Date: Tue, 24 May 2011 23:38:01 +0200 Subject: [PATCH 12/12] rawdec: Fix decoding of QT WRAW files. From some tests it results that: 1. All of the AVI/MOV WRAW files need to be flipped. 2. MOV WRAW files need to use AVI color modes. 3. Assigning PAL8 mode by default to WRAW codec is not correct. --- libavcodec/raw.c | 1 - libavcodec/rawdec.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/raw.c b/libavcodec/raw.c index 4bc07b869a..aa1ea308b0 100644 --- a/libavcodec/raw.c +++ b/libavcodec/raw.c @@ -123,7 +123,6 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = { { PIX_FMT_YUYV422, MKTAG('y', 'u', 'v', '2') }, { PIX_FMT_YUYV422, MKTAG('y', 'u', 'v', 's') }, { PIX_FMT_YUYV422, MKTAG('D', 'V', 'O', 'O') }, /* Digital Voodoo SD 8 Bit */ - { PIX_FMT_PAL8, MKTAG('W', 'R', 'A', 'W') }, { PIX_FMT_RGB555LE,MKTAG('L', '5', '5', '5') }, { PIX_FMT_RGB565LE,MKTAG('L', '5', '6', '5') }, { PIX_FMT_RGB565BE,MKTAG('B', '5', '6', '5') }, diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index 6b3387f636..5e8e6c4c43 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -78,6 +78,8 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx) if (avctx->codec_tag == MKTAG('r','a','w',' ')) avctx->pix_fmt = find_pix_fmt(pix_fmt_bps_mov, avctx->bits_per_coded_sample); + else if (avctx->codec_tag == MKTAG('W','R','A','W')) + avctx->pix_fmt = find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample); else if (avctx->codec_tag) avctx->pix_fmt = find_pix_fmt(ff_raw_pix_fmt_tags, avctx->codec_tag); else if (avctx->pix_fmt == PIX_FMT_NONE && avctx->bits_per_coded_sample) @@ -98,7 +100,7 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx) avctx->coded_frame= &context->pic; if((avctx->extradata_size >= 9 && !memcmp(avctx->extradata + avctx->extradata_size - 9, "BottomUp", 9)) || - avctx->codec_tag == MKTAG( 3 , 0 , 0 , 0 )) + avctx->codec_tag == MKTAG(3, 0, 0, 0) || avctx->codec_tag == MKTAG('W','R','A','W')) context->flip=1; return 0;