Re: [libav-devel] [PATCH 01/14] maint: Ignore dot dirs
On Sat, May 04, 2019 at 02:14:14PM +0200, Luca Barbato wrote: > They are usually created by tools and editors. > --- a/.gitignore > +++ b/.gitignore > @@ -29,3 +29,4 @@ > /coverage.info > /lcov/ > /mapfile > +.*/ This ignores dotdirs everywhere, not just in the top-level directory, which seems overreaching and possibly does not match your intent. Even if restricted to the top-level it feels like overreach. What files are you trying to ignore exactly? Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] configure: Try adding -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 for mingw as well
On Sun, Apr 14, 2019 at 09:33:40PM +0300, Martin Storsjö wrote: > On Sun, 14 Apr 2019, Diego Biurrun wrote: > > On Sat, Apr 13, 2019 at 12:58:40AM +0300, Martin Storsjö wrote: > > > On Fri, 12 Apr 2019, Luca Barbato wrote: > > > > On 11/04/2019 15:35, Martin Storsjö wrote: > > > > > On Wed, 10 Apr 2019, Luca Barbato wrote: > > > > > > On 10/04/2019 10:48, Martin Storsjö wrote: > > > > > > > Mingw headers have got header inline implementations of > > > > > > > localtime_r > > > > > > > and gmtime_r, but only visible if certain posix thread safe > > > > > > > functions > > > > > > > have been requested. > > > > > > > > > > > this is a preparatory step for improving the detection of > > > > > > > > > > > those > > > > > > > functions. > > > > > > > --- > > > > > > > An alternative fix is also provided in a different patch series, > > > > > > > by adjusting libavutil/time_internal.h. > > > > > > > > > Seems fine to me. > > > > > > > Which ones do you mean - this series of 2 patches, the other one, > > > > > > > or both? > > > > > > > This series seems fine to me. > > > > > > Ok. FWIW, the change in mingw-w64 that broke it was reverted (there was a > > > similar issue within gcc as well), but I guess this change probably is > > > good > > > to make anyway. > > > > I generally don't think that adding workarounds for foreign bugs is a > > sustainable strategy, > > Well, the idea of prefixing local system function fallbacks/replacements > isn't so much of a "workaround" as a sensible idea in general IMO. This is a > pattern that already is used e.g. for ff_getaddrinfo, ff_poll etc. > > That is, regardless of what the reason for using a fallback is (the real > function does not exist, the real function is declared in headers but > missing in libs, the real function exists but we want to avoid it because > it's buggy, etc), the pattern of > > #include > static inline ff_systemfunc() { > ... > } > #define systemfunc ff_systemfunc > > should always be safe. So I think that should be a generally beneficial > change in any case as well. IIRC we only do that within libavformat and use a different pattern within libavutil. Then again, my code knowledge might be getting a bit rusty. > > but I clearly prefer the configure change. > > Well, the check_func_headers change obviously is for the better, yes. Adding > the _POSIX_C_SOURCE define when building for mingw most probably also is > sensible, but the fact that we add it manually to most OSes, while we don't > add it automatically for all, makes it a little less clear cut. Switching from trying to set some flags globally for all platforms, inevitably hitting a snag on some fringe system, then adding an exception for that system, to setting flags by platform and strictly only when necessary on that platform, is - oddly enough - one of the single biggest improvements to the whole configure machinery. So I'm very weary of changes in that area due to having been burned so often in the past. If the change was motivated by a bug (since fixed) in mingw, then we should not add workarounds for it. Anyway, I've presented my arguments. I trust you to make a good decision. Push at your discretion. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] configure: Try adding -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 for mingw as well
On Sat, Apr 13, 2019 at 12:58:40AM +0300, Martin Storsjö wrote: > On Fri, 12 Apr 2019, Luca Barbato wrote: > > On 11/04/2019 15:35, Martin Storsjö wrote: > > > On Wed, 10 Apr 2019, Luca Barbato wrote: > > > > On 10/04/2019 10:48, Martin Storsjö wrote: > > > > > Mingw headers have got header inline implementations of localtime_r > > > > > and gmtime_r, but only visible if certain posix thread safe functions > > > > > have been requested. > > > > > > > > > > This is a preparatory step for improving the detection of those > > > > > functions. > > > > > --- > > > > > An alternative fix is also provided in a different patch series, > > > > > by adjusting libavutil/time_internal.h. > > > > > > > > Seems fine to me. > > > > > > Which ones do you mean - this series of 2 patches, the other one, or both? > > > > > > > This series seems fine to me. > > Ok. FWIW, the change in mingw-w64 that broke it was reverted (there was a > similar issue within gcc as well), but I guess this change probably is good > to make anyway. I generally don't think that adding workarounds for foreign bugs is a sustainable strategy, but I clearly prefer the configure change. Also, s/Try adding/Add/ in the log message, you're not just trying to add those flags :-) Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [v2] the great lavf-tests cleanup
On Mon, Feb 04, 2019 at 11:47:21AM +0100, Diego Biurrun wrote: > The patchset is considerably cleaned up compared to the initial > version. Vittorio's complaints about inadequate naming should be > addressed now and all the changes are much more straightforward > and minimal. ping Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Unbreak travis on macos
On Tue, Feb 12, 2019 at 01:53:08PM +0100, Luca Barbato wrote: > --- a/.travis.yml > +++ b/.travis.yml > @@ -19,7 +19,7 @@ cache: > before_install: > - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update --all; fi > + - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi Should be OK. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 08/11] tests: Convert lavf image tests away from legacy test scripts
Rename some tests in the process for consistency and simplicity. --- tests/Makefile| 1 + tests/fate-run.sh | 11 tests/fate/avformat.mak | 13 -- tests/fate/lavf-image.mak | 25 ++ tests/lavf-regression.sh | 65 --- tests/ref/lavf/bmp| 6 ++--- tests/ref/lavf/dpx| 6 ++--- tests/ref/lavf/jpg| 6 ++--- tests/ref/lavf/pam| 6 ++--- tests/ref/lavf/pcx| 6 ++--- tests/ref/lavf/pgm| 6 ++--- tests/ref/lavf/png| 6 ++--- tests/ref/lavf/ppm| 6 ++--- tests/ref/lavf/sgi| 6 ++--- tests/ref/lavf/sun| 3 +++ tests/ref/lavf/sunrast| 3 --- tests/ref/lavf/tga| 6 ++--- tests/ref/lavf/tiff | 6 ++--- tests/ref/lavf/xwd| 6 ++--- 19 files changed, 76 insertions(+), 117 deletions(-) create mode 100644 tests/fate/lavf-image.mak create mode 100644 tests/ref/lavf/sun delete mode 100644 tests/ref/lavf/sunrast diff --git a/tests/Makefile b/tests/Makefile index 6ad54eba71..ce7b58bd8b 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -62,6 +62,7 @@ include $(SRC_PATH)/tests/fate/vcodec.mak include $(SRC_PATH)/tests/fate/avformat.mak include $(SRC_PATH)/tests/fate/lavf-audio.mak +include $(SRC_PATH)/tests/fate/lavf-image.mak include $(SRC_PATH)/tests/fate/lavf-image2pipe.mak include $(SRC_PATH)/tests/fate/seek.mak diff --git a/tests/fate-run.sh b/tests/fate-run.sh index b20e013d6b..a9dfebc364 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -197,6 +197,17 @@ lavf_audio(){ do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file } +lavf_image(){ +t="${test#lavf-}" +outdir="tests/data/images/$t" +mkdir -p "$outdir" +file=${outdir}/%02d.$t +run_avconv $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $1 $ENC_OPTS $2 -frames 12 -y -qscale 10 $target_path/$file +do_md5sum ${outdir}/02.$t +do_avconv_crc $file $DEC_OPTS $2 -i $target_path/$file +echo $(wc -c ${outdir}/02.$t) +} + lavf_image2pipe(){ t="${test#lavf-}" t="${t%pipe}" diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index d840227914..9dbdff71ef 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -1,31 +1,18 @@ FATE_LAVF-$(call ENCDEC2, MSMPEG4V3, MP2, ASF)+= asf FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, AVI)+= avi -FATE_LAVF-$(call ENCDEC, BMP, IMAGE2) += bmp -FATE_LAVF-$(call ENCDEC, DPX, IMAGE2) += dpx FATE_LAVF-$(call ENCDEC2, DVVIDEO,PCM_S16LE, AVI)+= dv_fmt FATE_LAVF-$(call ENCDEC, FLV, FLV)+= flv_fmt FATE_LAVF-$(call ENCDEC, GIF, IMAGE2) += gif FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, GXF)+= gxf -FATE_LAVF-$(call ENCDEC, MJPEG, IMAGE2) += jpg FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, MATROSKA) += mkv FATE_LAVF-$(call ENCDEC2, MPEG4, PCM_ALAW, MOV)+= mov FATE_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2, MPEG1SYSTEM MPEGPS) += mpg FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF)+= mxf FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF)+= mxf_d10 FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT)+= nut -FATE_LAVF-$(call ENCDEC, PAM, IMAGE2) += pam -FATE_LAVF-$(call ENCDEC, PCX, IMAGE2) += pcx -FATE_LAVF-$(call ENCDEC, PGM, IMAGE2) += pgm -FATE_LAVF-$(call ENCDEC, PNG, IMAGE2) += png -FATE_LAVF-$(call ENCDEC, PPM, IMAGE2) += ppm FATE_LAVF-$(call ENCMUX, RV10 AC3_FIXED,RM) += rm -FATE_LAVF-$(call ENCDEC, SGI, IMAGE2) += sgi -FATE_LAVF-$(call ENCDEC, SUNRAST, IMAGE2) += sunrast FATE_LAVF-$(call ENCDEC, FLV, SWF)+= swf -FATE_LAVF-$(call ENCDEC, TARGA, IMAGE2) += tga -FATE_LAVF-$(call ENCDEC, TIFF, IMAGE2) += tiff FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2, MPEGTS) += ts -FATE_LAVF-$(call ENCDEC, XWD, IMAGE2) += xwd FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += yuv4mpeg FATE_LAVF += $(FATE_LAVF-yes:%=fate-lavf-%) diff --git a/tests/fate/lavf-image.mak b/tests/fate/lavf-image.mak new file mode 100644 index 00..24acdb70f0 --- /dev/null +++ b/tests/fate/lavf-image.mak @@ -0,0 +1,25 @@ +FATE_LAVF_IMAGES-$(call ENCDEC, BMP,IMAGE2) += bmp +FATE_LAVF_IMAGES-$(call ENCDEC, DPX,IMAGE2) += dpx +FATE_LAVF_IMAGES-$(call ENCDEC, MJPEG, IMAGE2)
[libav-devel] [PATCH 05/11] tests: Use a predefined function for lavf-rm test
--- tests/lavf-regression.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index 326319c6db..4161e375ee 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -15,7 +15,8 @@ do_lavf() { file=${outfile}lavf.$1 do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le $2 -i $pcm_src $ENC_OPTS -b:a 64k -t 1 -qscale:v 10 $3 -do_avconv_crc $file $DEC_OPTS -i $target_path/$file $4 +test $5 = "disable_crc" || +do_avconv_crc $file $DEC_OPTS -i $target_path/$file $4 } do_streamed_images() @@ -53,9 +54,8 @@ fi if [ -n "$do_rm" ] ; then file=${outfile}lavf.rm -do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 -c:a ac3_fixed -b:a 64k -# broken -#do_avconv_crc $file -i $target_path/$file +# The RealMedia muxer is broken. +do_lavf rm "" "-c:a ac3_fixed" "" disable_crc fi if [ -n "$do_mpg" ] ; then -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 09/11] tests: Convert lavf pixfmt conversion tests away from legacy test scripts
Also split monolithic lavf-pixfmt test into individual tests. --- tests/Makefile| 1 + tests/fate-run.sh | 11 +++ tests/fate/avformat.mak | 1 - tests/fate/pixfmt.mak | 28 tests/lavf-regression.sh | 16 tests/ref/lavf/pixfmt | 38 -- tests/ref/pixfmt/bgr24| 2 ++ tests/ref/pixfmt/gray | 2 ++ tests/ref/pixfmt/monob| 2 ++ tests/ref/pixfmt/monow| 2 ++ tests/ref/pixfmt/rgb24| 2 ++ tests/ref/pixfmt/rgb32| 2 ++ tests/ref/pixfmt/rgb555 | 2 ++ tests/ref/pixfmt/rgb565 | 2 ++ tests/ref/pixfmt/yuv410p | 2 ++ tests/ref/pixfmt/yuv411p | 2 ++ tests/ref/pixfmt/yuv420p | 2 ++ tests/ref/pixfmt/yuv422p | 2 ++ tests/ref/pixfmt/yuv440p | 2 ++ tests/ref/pixfmt/yuv444p | 2 ++ tests/ref/pixfmt/yuvj420p | 2 ++ tests/ref/pixfmt/yuvj422p | 2 ++ tests/ref/pixfmt/yuvj440p | 2 ++ tests/ref/pixfmt/yuvj444p | 2 ++ tests/ref/pixfmt/yuyv422 | 2 ++ 25 files changed, 78 insertions(+), 55 deletions(-) create mode 100644 tests/fate/pixfmt.mak delete mode 100644 tests/ref/lavf/pixfmt create mode 100644 tests/ref/pixfmt/bgr24 create mode 100644 tests/ref/pixfmt/gray create mode 100644 tests/ref/pixfmt/monob create mode 100644 tests/ref/pixfmt/monow create mode 100644 tests/ref/pixfmt/rgb24 create mode 100644 tests/ref/pixfmt/rgb32 create mode 100644 tests/ref/pixfmt/rgb555 create mode 100644 tests/ref/pixfmt/rgb565 create mode 100644 tests/ref/pixfmt/yuv410p create mode 100644 tests/ref/pixfmt/yuv411p create mode 100644 tests/ref/pixfmt/yuv420p create mode 100644 tests/ref/pixfmt/yuv422p create mode 100644 tests/ref/pixfmt/yuv440p create mode 100644 tests/ref/pixfmt/yuv444p create mode 100644 tests/ref/pixfmt/yuvj420p create mode 100644 tests/ref/pixfmt/yuvj422p create mode 100644 tests/ref/pixfmt/yuvj440p create mode 100644 tests/ref/pixfmt/yuvj444p create mode 100644 tests/ref/pixfmt/yuyv422 diff --git a/tests/Makefile b/tests/Makefile index ce7b58bd8b..b64a8dc968 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -109,6 +109,7 @@ include $(SRC_PATH)/tests/fate/mpc.mak include $(SRC_PATH)/tests/fate/mpeg4.mak include $(SRC_PATH)/tests/fate/opus.mak include $(SRC_PATH)/tests/fate/pcm.mak +include $(SRC_PATH)/tests/fate/pixfmt.mak include $(SRC_PATH)/tests/fate/probe.mak include $(SRC_PATH)/tests/fate/prores.mak include $(SRC_PATH)/tests/fate/qt.mak diff --git a/tests/fate-run.sh b/tests/fate-run.sh index a9dfebc364..89eef1230f 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -223,6 +223,17 @@ lavftest(){ ${base}/lavf-regression.sh $t lavf tests/vsynth1 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags" } +pixfmt_conversion(){ +conversion="${test#pixfmt-}" +outdir="tests/data/pixfmt" +raw_dst="$outdir/$conversion.out.yuv" +file=${outdir}/${conversion}.yuv +run_avconv $DEC_OPTS -r 1 -f image2 -c:v pgmyuv -i $raw_src \ + $ENC_OPTS -f rawvideo -t 1 -s 352x288 -pix_fmt $conversion $target_path/$raw_dst +do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $conversion -i $target_path/$raw_dst \ + $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p +} + video_filter(){ filters=$1 shift diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index 9dbdff71ef..033e5c9199 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -16,7 +16,6 @@ FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2, MPEGTS) += ts FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += yuv4mpeg FATE_LAVF += $(FATE_LAVF-yes:%=fate-lavf-%) -FATE_LAVF += fate-lavf-pixfmt $(FATE_LAVF): $(AREF) $(VREF) $(FATE_LAVF): CMD = lavftest diff --git a/tests/fate/pixfmt.mak b/tests/fate/pixfmt.mak new file mode 100644 index 00..469aebdd66 --- /dev/null +++ b/tests/fate/pixfmt.mak @@ -0,0 +1,28 @@ +FATE_PIXFMT = bgr24 \ +gray\ +monob \ +monow \ +rgb24 \ +rgb32 \ +rgb555 \ +rgb565 \ +yuv410p \ +yuv411p \ +yuv420p \ +yuv422p \ +yuv440p \ +yuv444p \ +yuvj420p\ +yuvj422p\ +yuvj440p\ +yuvj444p\ +yuyv422 \ + +FATE_PIXFMT := $(FATE_PIXFMT:%=fate-pixfmt-%) + +$(FATE_PIXFMT): CMD = pixfmt_conversion +$(FATE_PIXFMT): REF = $(SRC_PATH)/tests/ref/pixfmt/$(@:fate-pixfmt-%=%) +$(FATE_PIXFMT): $(VREF) + +FATE_AVCONV +=
[libav-devel] [PATCH 04/11] tests: Enable CRC test for yuv4mpeg
--- tests/lavf-regression.sh | 2 +- tests/ref/lavf/yuv4mpeg | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index 6a8919bdc2..326319c6db 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -130,7 +130,7 @@ fi if [ -n "$do_yuv4mpeg" ] ; then file=${outfile}lavf.y4m do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 -#do_avconv_crc $file -i $target_path/$file +do_avconv_crc $file -i $target_path/$file fi # image formats diff --git a/tests/ref/lavf/yuv4mpeg b/tests/ref/lavf/yuv4mpeg index 8c1566ea0d..367b37621d 100644 --- a/tests/ref/lavf/yuv4mpeg +++ b/tests/ref/lavf/yuv4mpeg @@ -1,2 +1,3 @@ ec8178cb152f9cdbfd9cb724d977db2e *./tests/data/lavf/lavf.y4m 3801808 ./tests/data/lavf/lavf.y4m +./tests/data/lavf/lavf.y4m CRC=0x0a941f26 -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 02/11] tests: Unify output directory creation
--- tests/Makefile| 5 +++-- tests/fate-run.sh | 2 -- tests/lavf-regression.sh | 1 - tests/regression-funcs.sh | 3 --- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index c3dd5879bf..8d9a42433f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -2,7 +2,8 @@ THREADS = 1 VREF = tests/vsynth1/00.pgm AREF = tests/data/asynth1.sw -OUTDIRS += tests/data tests/vsynth1 tests/data/filtergraphs +FATE_OUTDIRS = tests/data tests/data/fate tests/data/filtergraphs tests/data/lavf tests/data/pixfmt tests/vsynth1 +OUTDIRS += $(FATE_OUTDIRS) $(VREF): tests/videogen$(HOSTEXESUF) | tests/vsynth1 $(M)./$< 'tests/vsynth1/' @@ -149,7 +150,7 @@ $(addprefix fate-, $(IGNORE_TESTS)): REPORT=ignore fate: $(FATE) -$(FATE): $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) +$(FATE): $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) | $(FATE_OUTDIRS) @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)' '$(GEN)' '$(HWACCEL)' '$(REPORT)' diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 8de749d4a7..b9b3d9763e 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -196,8 +196,6 @@ null(){ : } -mkdir -p "$outdir" - exec 3>&2 eval $command >"$outfile" 2>$errfile err=$? diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index fd4f5548d0..6a8919bdc2 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -237,7 +237,6 @@ fi if [ -n "$do_pixfmt" ] ; then outfile="$datadir/pixfmt/" -mkdir -p "$outfile" conversions="yuv420p yuv422p yuv444p yuyv422 yuv410p yuv411p yuvj420p \ yuvj422p yuvj444p rgb24 bgr24 rgb32 rgb565 rgb555 gray monow \ monob yuv440p yuvj440p" diff --git a/tests/regression-funcs.sh b/tests/regression-funcs.sh index 3728d44980..fad2057a73 100755 --- a/tests/regression-funcs.sh +++ b/tests/regression-funcs.sh @@ -29,9 +29,6 @@ target_crcfile="$target_datadir/$this.crc" cleanfiles="$raw_dst $crcfile" trap 'rm -f -- $cleanfiles' EXIT -mkdir -p "$datadir" -mkdir -p "$outfile" - [ "${V-0}" -gt 0 ] && echov=echov || echov=: echov(){ -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 06/11] tests: Convert image2pipe tests away from legacy test scripts
--- tests/Makefile | 1 + tests/fate-run.sh | 45 ++ tests/fate/avformat.mak| 3 --- tests/fate/lavf-image2pipe.mak | 12 +++ tests/lavf-regression.sh | 19 -- tests/ref/lavf/pbmpipe | 6 +++--- tests/ref/lavf/pgmpipe | 6 +++--- tests/ref/lavf/ppmpipe | 6 +++--- 8 files changed, 67 insertions(+), 31 deletions(-) create mode 100644 tests/fate/lavf-image2pipe.mak diff --git a/tests/Makefile b/tests/Makefile index 8d9a42433f..1884f5e437 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -61,6 +61,7 @@ include $(SRC_PATH)/tests/fate/acodec.mak include $(SRC_PATH)/tests/fate/vcodec.mak include $(SRC_PATH)/tests/fate/avformat.mak +include $(SRC_PATH)/tests/fate/lavf-image2pipe.mak include $(SRC_PATH)/tests/fate/seek.mak include $(SRC_PATH)/tests/fate/aac.mak diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 8c6adf11cf..0221e5c1dc 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -152,6 +152,51 @@ enc_dec(){ tests/tiny_psnr $srcfile $decfile $cmp_unit $cmp_shift } +# FIXME: There is a certain duplication between the avconv-related helper +# functions above and below that should be refactored. +avconv2="$target_exec ${target_path}/avconv" +raw_src="${target_path}/tests/vsynth1/%02d.pgm" +crcfile="tests/data/$test.lavf.crc" +target_crcfile="${target_path}/$crcfile" + +echov(){ +echo "$@" >&3 +} + +AVCONV_OPTS="-nostats -y -cpuflags $cpuflags -threads $threads" +DEC_OPTS="-flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -fflags +bitexact" +ENC_OPTS="$DEC_OPTS -threads 1 -dct fastint" + +run_avconv(){ +$echov $avconv2 $AVCONV_OPTS $* +$avconv2 $AVCONV_OPTS $* +} + +do_avconv(){ +f="$1" +shift +set -- $* ${target_path}/$f +run_avconv $* +do_md5sum $f +echo $(wc -c $f) +} + +do_avconv_crc(){ +f="$1" +shift +run_avconv $* -f crc "$target_crcfile" +echo "$f $(cat $crcfile)" +} + +lavf_image2pipe(){ +t="${test#lavf-}" +t="${t%pipe}" +outdir="tests/data/lavf" +file=${outdir}/${t}pipe.$t +do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src -f image2pipe $ENC_OPTS -t 1 -qscale 10 +do_avconv_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file +} + lavftest(){ t="${test#lavf-}" ref=${base}/ref/lavf/$t diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index 458ae7cae9..a4a0988bb2 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -20,13 +20,10 @@ FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF)+= mxf_d10 FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT)+= nut FATE_LAVF-$(call ENCDEC, FLAC, OGG)+= ogg FATE_LAVF-$(call ENCDEC, PAM, IMAGE2) += pam -FATE_LAVF-$(call ENCDEC, PBM, IMAGE2PIPE) += pbmpipe FATE_LAVF-$(call ENCDEC, PCX, IMAGE2) += pcx FATE_LAVF-$(call ENCDEC, PGM, IMAGE2) += pgm -FATE_LAVF-$(call ENCDEC, PGM, IMAGE2PIPE) += pgmpipe FATE_LAVF-$(call ENCDEC, PNG, IMAGE2) += png FATE_LAVF-$(call ENCDEC, PPM, IMAGE2) += ppm -FATE_LAVF-$(call ENCDEC, PPM, IMAGE2PIPE) += ppmpipe FATE_LAVF-$(call ENCMUX, RV10 AC3_FIXED,RM) += rm FATE_LAVF-$(call ENCDEC, PCM_U8,RSO)+= rso FATE_LAVF-$(call ENCDEC, SGI, IMAGE2) += sgi diff --git a/tests/fate/lavf-image2pipe.mak b/tests/fate/lavf-image2pipe.mak new file mode 100644 index 00..297f677ada --- /dev/null +++ b/tests/fate/lavf-image2pipe.mak @@ -0,0 +1,12 @@ +FATE_LAVF_IMAGE2PIPE-$(call ENCDEC, PBM,IMAGE2PIPE) += pbmpipe +FATE_LAVF_IMAGE2PIPE-$(call ENCDEC, PGM,IMAGE2PIPE) += pgmpipe +FATE_LAVF_IMAGE2PIPE-$(call ENCDEC, PPM,IMAGE2PIPE) += ppmpipe + +FATE_LAVF_IMAGE2PIPE = $(FATE_LAVF_IMAGE2PIPE-yes:%=fate-lavf-%) + +$(FATE_LAVF_IMAGE2PIPE): CMD = lavf_image2pipe +$(FATE_LAVF_IMAGE2PIPE): REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%) +$(FATE_LAVF_IMAGE2PIPE): $(VREF) + +FATE_AVCONV += $(FATE_LAVF_IMAGE2PIPE) +fate-lavf-image2pipe fate-lavf: $(FATE_LAVF_IMAGE2PIPE) diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index 4161e375ee..fecc36c0fd 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -19,13 +19,6 @@ do_lavf() do_avconv_crc $file $DEC_OPTS -i $target_path/$file $4 } -do_streamed_images() -{ -file=${outfile}${1}pipe.$1 -do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src -f image2pipe $ENC_OPTS -t 1 -qscale 10 -do_avconv_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file -} - do_image_formats() { outfile="$datadir/images/$1/" @@
[libav-devel] [PATCH 03/11] tests: Drop duplicate variable declaration
--- tests/fate-run.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index b9b3d9763e..8c6adf11cf 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -162,7 +162,6 @@ video_filter(){ filters=$1 shift label=${test#filter-} -raw_src="${target_path}/tests/vsynth1/%02d.pgm" printf '%-20s' $label avconv $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src \ $FLAGS $ENC_OPTS -vf "$filters" -c:v rawvideo -frames:v 5 $* -f nut md5: -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [v2] the great lavf-tests cleanup
I was at FOSDEM and finishing this is what I used to keep myself occupied :) It is currently running through Oracle and I expect it to pass all the instances (an initial Oracle run already turned up a mistake). The patchset is considerably cleaned up compared to the initial version. Vittorio's complaints about inadequate naming should be addressed now and all the changes are much more straightforward and minimal. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 11/11] tests: Add a convenience function for video-only lavf tests
Rename a test in the process for consistency and simplicity and remove the remnants of the now-unused lavf regression test scripts. --- tests/Makefile | 2 +- tests/fate-run.sh | 8 ++-- tests/fate/avformat.mak| 10 - tests/fate/lavf-video.mak | 13 ++ tests/fate/seek.mak| 4 +- tests/lavf-regression.sh | 30 - tests/ref/lavf/gif | 6 +-- tests/ref/lavf/y4m | 3 ++ tests/ref/lavf/yuv4mpeg| 3 -- tests/ref/seek/{lavf-yuv4mpeg => lavf-y4m} | 0 tests/regression-funcs.sh | 67 -- 11 files changed, 27 insertions(+), 119 deletions(-) delete mode 100644 tests/fate/avformat.mak create mode 100644 tests/fate/lavf-video.mak delete mode 100755 tests/lavf-regression.sh create mode 100644 tests/ref/lavf/y4m delete mode 100644 tests/ref/lavf/yuv4mpeg rename tests/ref/seek/{lavf-yuv4mpeg => lavf-y4m} (100%) delete mode 100755 tests/regression-funcs.sh diff --git a/tests/Makefile b/tests/Makefile index 8a28cbf58a..76e751c7fa 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -60,11 +60,11 @@ PARSERDEMDEC = $(call ALLYES, $(1)_PARSER $(2)_DEMUXER $(3)_DECODER) include $(SRC_PATH)/tests/fate/acodec.mak include $(SRC_PATH)/tests/fate/vcodec.mak -include $(SRC_PATH)/tests/fate/avformat.mak include $(SRC_PATH)/tests/fate/lavf-audio.mak include $(SRC_PATH)/tests/fate/lavf-container.mak include $(SRC_PATH)/tests/fate/lavf-image.mak include $(SRC_PATH)/tests/fate/lavf-image2pipe.mak +include $(SRC_PATH)/tests/fate/lavf-video.mak include $(SRC_PATH)/tests/fate/seek.mak include $(SRC_PATH)/tests/fate/aac.mak diff --git a/tests/fate-run.sh b/tests/fate-run.sh index c8ac6a1385..b613678a92 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -226,10 +226,12 @@ lavf_image2pipe(){ do_avconv_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file } -lavftest(){ +lavf_video(){ t="${test#lavf-}" -ref=${base}/ref/lavf/$t -${base}/lavf-regression.sh $t lavf tests/vsynth1 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags" +outdir="tests/data/lavf" +file=${outdir}/lavf.$t +do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 $1 +do_avconv_crc $file $DEC_OPTS -i $target_path/$file $1 } pixfmt_conversion(){ diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak deleted file mode 100644 index 7c984e4fcd..00 --- a/tests/fate/avformat.mak +++ /dev/null @@ -1,10 +0,0 @@ -FATE_LAVF-$(call ENCDEC, GIF, IMAGE2) += gif -FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += yuv4mpeg - -FATE_LAVF += $(FATE_LAVF-yes:%=fate-lavf-%) - -$(FATE_LAVF): $(AREF) $(VREF) -$(FATE_LAVF): CMD = lavftest - -FATE_AVCONV += $(FATE_LAVF) -fate-lavf: $(FATE_LAVF) diff --git a/tests/fate/lavf-video.mak b/tests/fate/lavf-video.mak new file mode 100644 index 00..d964e91404 --- /dev/null +++ b/tests/fate/lavf-video.mak @@ -0,0 +1,13 @@ +FATE_LAVF_VIDEO-$(call ENCDEC, GIF,IMAGE2) += gif +FATE_LAVF_VIDEO-$(CONFIG_YUV4MPEGPIPE_MUXER)+= y4m + +FATE_LAVF_VIDEO = $(FATE_LAVF_VIDEO-yes:%=fate-lavf-%) + +$(FATE_LAVF_VIDEO): CMD = lavf_video +$(FATE_LAVF_VIDEO): REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%) +$(FATE_LAVF_VIDEO): $(VREF) + +fate-lavf-gif: CMD = lavf_video "-pix_fmt rgb24" + +FATE_AVCONV += $(FATE_LAVF_VIDEO) +fate-lavf-video fate-lavf: $(FATE_LAVF_VIDEO) diff --git a/tests/fate/seek.mak b/tests/fate/seek.mak index 937d284a15..c7e56f811a 100644 --- a/tests/fate/seek.mak +++ b/tests/fate/seek.mak @@ -178,7 +178,7 @@ FATE_SEEK_LAVF-$(call ENCDEC, TIFF, IMAGE2) += tiff FATE_SEEK_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2, MPEGTS) += ts FATE_SEEK_LAVF-$(call ENCDEC, PCM_U8,VOC) += voc FATE_SEEK_LAVF-$(call ENCDEC, PCM_S16LE, WAV) += wav -FATE_SEEK_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER)+= yuv4mpeg +FATE_SEEK_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER)+= y4m fate-seek-lavf-aiff: SRC = lavf/lavf.aiff fate-seek-lavf-al: SRC = lavf/lavf.al @@ -214,7 +214,7 @@ fate-seek-lavf-tiff: SRC = images/tiff/%02d.tiff fate-seek-lavf-ts: SRC = lavf/lavf.ts fate-seek-lavf-voc: SRC = lavf/lavf.voc fate-seek-lavf-wav: SRC = lavf/lavf.wav -fate-seek-lavf-yuv4mpeg: SRC = lavf/lavf.y4m +fate-seek-lavf-y4m: SRC = lavf/lavf.y4m FATE_SEEK += $(FATE_SEEK_LAVF-yes:%=fate-seek-lavf-%) diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh deleted file mode 100755 index 4e346e2c07..00 --- a/tests/lavf-regression.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# automatic regression test for libavformat -# -# -#set
[libav-devel] [PATCH 10/11] tests: Convert lavf container tests away from legacy test scripts
Rename some tests in the process for consistency and simplicity. --- tests/Makefile| 1 + tests/fate-run.sh | 9 + tests/fate/avformat.mak | 14 --- tests/fate/lavf-container.mak | 37 + tests/fate/seek.mak | 8 ++-- tests/lavf-regression.sh | 67 --- tests/ref/lavf/asf| 6 +-- tests/ref/lavf/avi| 6 +-- tests/ref/lavf/dv | 3 ++ tests/ref/lavf/dv_fmt | 3 -- tests/ref/lavf/flv| 3 ++ tests/ref/lavf/flv_fmt| 3 -- tests/ref/lavf/gxf| 6 +-- tests/ref/lavf/mkv| 6 +-- tests/ref/lavf/mov| 6 +-- tests/ref/lavf/mpg| 6 +-- tests/ref/lavf/mxf| 6 +-- tests/ref/lavf/mxf_d10| 6 +-- tests/ref/lavf/nut| 6 +-- tests/ref/lavf/rm | 4 +- tests/ref/lavf/swf| 6 +-- tests/ref/lavf/ts | 6 +-- tests/ref/seek/{lavf-dv_fmt => lavf-dv} | 0 tests/ref/seek/{lavf-flv_fmt => lavf-flv} | 0 24 files changed, 92 insertions(+), 126 deletions(-) create mode 100644 tests/fate/lavf-container.mak create mode 100644 tests/ref/lavf/dv delete mode 100644 tests/ref/lavf/dv_fmt create mode 100644 tests/ref/lavf/flv delete mode 100644 tests/ref/lavf/flv_fmt rename tests/ref/seek/{lavf-dv_fmt => lavf-dv} (100%) rename tests/ref/seek/{lavf-flv_fmt => lavf-flv} (100%) diff --git a/tests/Makefile b/tests/Makefile index b64a8dc968..8a28cbf58a 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -62,6 +62,7 @@ include $(SRC_PATH)/tests/fate/vcodec.mak include $(SRC_PATH)/tests/fate/avformat.mak include $(SRC_PATH)/tests/fate/lavf-audio.mak +include $(SRC_PATH)/tests/fate/lavf-container.mak include $(SRC_PATH)/tests/fate/lavf-image.mak include $(SRC_PATH)/tests/fate/lavf-image2pipe.mak include $(SRC_PATH)/tests/fate/seek.mak diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 89eef1230f..c8ac6a1385 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -197,6 +197,15 @@ lavf_audio(){ do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file } +lavf_container(){ +t="${test#lavf-}" +outdir="tests/data/lavf" +file=${outdir}/lavf.$t +do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le $1 -i $pcm_src $ENC_OPTS -b:a 64k -t 1 -qscale:v 10 $2 +test $3 = "disable_crc" || +do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3 +} + lavf_image(){ t="${test#lavf-}" outdir="tests/data/images/$t" diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index 033e5c9199..7c984e4fcd 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -1,18 +1,4 @@ -FATE_LAVF-$(call ENCDEC2, MSMPEG4V3, MP2, ASF)+= asf -FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, AVI)+= avi -FATE_LAVF-$(call ENCDEC2, DVVIDEO,PCM_S16LE, AVI)+= dv_fmt -FATE_LAVF-$(call ENCDEC, FLV, FLV)+= flv_fmt FATE_LAVF-$(call ENCDEC, GIF, IMAGE2) += gif -FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, GXF)+= gxf -FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, MATROSKA) += mkv -FATE_LAVF-$(call ENCDEC2, MPEG4, PCM_ALAW, MOV)+= mov -FATE_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2, MPEG1SYSTEM MPEGPS) += mpg -FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF)+= mxf -FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF)+= mxf_d10 -FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT)+= nut -FATE_LAVF-$(call ENCMUX, RV10 AC3_FIXED,RM) += rm -FATE_LAVF-$(call ENCDEC, FLV, SWF)+= swf -FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2, MPEGTS) += ts FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += yuv4mpeg FATE_LAVF += $(FATE_LAVF-yes:%=fate-lavf-%) diff --git a/tests/fate/lavf-container.mak b/tests/fate/lavf-container.mak new file mode 100644 index 00..e1f91f1329 --- /dev/null +++ b/tests/fate/lavf-container.mak @@ -0,0 +1,37 @@ +FATE_LAVF_CONTAINER-$(call ENCDEC2, MSMPEG4V3, MP2, ASF) += asf +FATE_LAVF_CONTAINER-$(call ENCDEC2, MPEG4, MP2, AVI) += avi +FATE_LAVF_CONTAINER-$(call ENCDEC2, DVVIDEO,PCM_S16LE, AVI) += dv +FATE_LAVF_CONTAINER-$(call ENCDEC, FLV, FLV) += flv +FATE_LAVF_CONTAINER-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, GXF) += gxf +FATE_LAVF_CONTAINER-$(call ENCDEC2,
[libav-devel] [PATCH 01/11] build: Rename OBJDIRS variable to OUTDIRS
These directories are not just for object files. --- Makefile| 2 +- avbuild/common.mak | 2 +- avtools/Makefile| 2 +- doc/examples/Makefile | 2 +- tests/Makefile | 2 +- tests/checkasm/Makefile | 2 +- tools/Makefile | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index cbccfd6ec1..e1190377ab 100644 --- a/Makefile +++ b/Makefile @@ -184,7 +184,7 @@ check: all alltools checkheaders examples testprogs fate include $(SRC_PATH)/tests/Makefile -$(sort $(OBJDIRS)): +$(sort $(OUTDIRS)): $(Q)mkdir -p $@ # Dummy rule to stop make trying to rebuild removed or renamed headers diff --git a/avbuild/common.mak b/avbuild/common.mak index 17989533f9..9d137bd074 100644 --- a/avbuild/common.mak +++ b/avbuild/common.mak @@ -47,7 +47,7 @@ $(HOSTOBJS): | $(sort $(dir $(HOSTOBJS))) $(TESTOBJS): | $(sort $(dir $(TESTOBJS))) $(TOOLOBJS): | tools -OBJDIRS := $(OBJDIRS) $(dir $(OBJS) $(HOBJS) $(HOSTOBJS) $(TESTOBJS)) +OUTDIRS := $(OUTDIRS) $(dir $(OBJS) $(HOBJS) $(HOSTOBJS) $(TESTOBJS)) CLEANSUFFIXES = *.d *.gcda *.gcno *.h.c *.map *.o *.pc *.ver *.version *~ LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a diff --git a/avtools/Makefile b/avtools/Makefile index d95e2d9fc2..b9320572c6 100644 --- a/avtools/Makefile +++ b/avtools/Makefile @@ -28,7 +28,7 @@ $(foreach P,$(AVPROGS-yes),$(eval $(call DOAVTOOL,$(P all: $(AVPROGS) avtools/cmdutils.o: avversion.h | avtools -OBJDIRS += avtools +OUTDIRS += avtools ifdef AVPROGS install: install-progs install-data diff --git a/doc/examples/Makefile b/doc/examples/Makefile index 40c9557fbc..646867c734 100644 --- a/doc/examples/Makefile +++ b/doc/examples/Makefile @@ -18,7 +18,7 @@ $(EXAMPLES): %$(EXESUF): %.o examples: $(EXAMPLES) $(EXAMPLES:%$(EXESUF)=%.o): | doc/examples -OBJDIRS += doc/examples +OUTDIRS += doc/examples DOXY_INPUT += $(addprefix $(SRC_PATH)/, $(EXAMPLES:%$(EXESUF)=%.c)) diff --git a/tests/Makefile b/tests/Makefile index 9fec13211f..c3dd5879bf 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -2,7 +2,7 @@ THREADS = 1 VREF = tests/vsynth1/00.pgm AREF = tests/data/asynth1.sw -OBJDIRS += tests/data tests/vsynth1 tests/data/filtergraphs +OUTDIRS += tests/data tests/vsynth1 tests/data/filtergraphs $(VREF): tests/videogen$(HOSTEXESUF) | tests/vsynth1 $(M)./$< 'tests/vsynth1/' diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile index d5febec74c..debda7e9e2 100644 --- a/tests/checkasm/Makefile +++ b/tests/checkasm/Makefile @@ -30,7 +30,7 @@ CHECKASMOBJS := $(sort $(CHECKASMOBJS:%=tests/checkasm/%)) CHECKASMDIRS := $(sort $(dir $(CHECKASMOBJS))) $(CHECKASMOBJS): | $(CHECKASMDIRS) -OBJDIRS += $(CHECKASMDIRS) +OUTDIRS += $(CHECKASMDIRS) CHECKASM := tests/checkasm/checkasm$(EXESUF) diff --git a/tools/Makefile b/tools/Makefile index 372287b452..5eb8a3487a 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -3,7 +3,7 @@ TOOLS-$(CONFIG_ZLIB) += cws2fws tools/cws2fws$(EXESUF): ELIBS = $(ZLIB) -OBJDIRS += tools +OUTDIRS += tools clean:: $(RM) $(CLEANSUFFIXES:%=tools/%) -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 07/11] tests: Convert audio-only lavf tests away from legacy test scripts
Rename some tests in the process for consistency and simplicity. --- tests/Makefile | 1 + tests/fate-run.sh | 9 ++ tests/fate/avformat.mak| 11 --- tests/fate/lavf-audio.mak | 24 +++ tests/fate/seek.mak| 10 +++ tests/lavf-regression.sh | 53 -- tests/ref/lavf/aiff| 6 ++-- tests/ref/lavf/al | 3 ++ tests/ref/lavf/alaw| 3 -- tests/ref/lavf/au | 6 ++-- tests/ref/lavf/mmf | 6 ++-- tests/ref/lavf/mulaw | 3 -- tests/ref/lavf/ogg | 6 ++-- tests/ref/lavf/rso | 6 ++-- tests/ref/lavf/s16.voc | 3 ++ tests/ref/lavf/sox | 6 ++-- tests/ref/lavf/ul | 3 ++ tests/ref/lavf/voc | 6 ++-- tests/ref/lavf/voc_s16 | 3 -- tests/ref/lavf/wav | 6 ++-- tests/ref/seek/{lavf-alaw => lavf-al} | 0 tests/ref/seek/{lavf-mulaw => lavf-ul} | 0 22 files changed, 72 insertions(+), 102 deletions(-) create mode 100644 tests/fate/lavf-audio.mak create mode 100644 tests/ref/lavf/al delete mode 100644 tests/ref/lavf/alaw delete mode 100644 tests/ref/lavf/mulaw create mode 100644 tests/ref/lavf/s16.voc create mode 100644 tests/ref/lavf/ul delete mode 100644 tests/ref/lavf/voc_s16 rename tests/ref/seek/{lavf-alaw => lavf-al} (100%) rename tests/ref/seek/{lavf-mulaw => lavf-ul} (100%) diff --git a/tests/Makefile b/tests/Makefile index 1884f5e437..6ad54eba71 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -61,6 +61,7 @@ include $(SRC_PATH)/tests/fate/acodec.mak include $(SRC_PATH)/tests/fate/vcodec.mak include $(SRC_PATH)/tests/fate/avformat.mak +include $(SRC_PATH)/tests/fate/lavf-audio.mak include $(SRC_PATH)/tests/fate/lavf-image2pipe.mak include $(SRC_PATH)/tests/fate/seek.mak diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 0221e5c1dc..b20e013d6b 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -156,6 +156,7 @@ enc_dec(){ # functions above and below that should be refactored. avconv2="$target_exec ${target_path}/avconv" raw_src="${target_path}/tests/vsynth1/%02d.pgm" +pcm_src="${target_path}/tests/data/asynth1.sw" crcfile="tests/data/$test.lavf.crc" target_crcfile="${target_path}/$crcfile" @@ -188,6 +189,14 @@ do_avconv_crc(){ echo "$f $(cat $crcfile)" } +lavf_audio(){ +t="${test#lavf-}" +outdir="tests/data/lavf" +file=${outdir}/lavf.$t +do_avconv $file $DEC_OPTS $1 -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $2 +do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file +} + lavf_image2pipe(){ t="${test#lavf-}" t="${t%pipe}" diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index a4a0988bb2..d840227914 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -1,7 +1,4 @@ -FATE_LAVF-$(call ENCDEC, PCM_S16BE, AIFF) += aiff -FATE_LAVF-$(call ENCDEC, PCM_ALAW, PCM_ALAW) += alaw FATE_LAVF-$(call ENCDEC2, MSMPEG4V3, MP2, ASF)+= asf -FATE_LAVF-$(call ENCDEC, PCM_S16BE, AU) += au FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, AVI)+= avi FATE_LAVF-$(call ENCDEC, BMP, IMAGE2) += bmp FATE_LAVF-$(call ENCDEC, DPX, IMAGE2) += dpx @@ -11,31 +8,23 @@ FATE_LAVF-$(call ENCDEC, GIF, IMAGE2) += gif FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, GXF)+= gxf FATE_LAVF-$(call ENCDEC, MJPEG, IMAGE2) += jpg FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, MATROSKA) += mkv -FATE_LAVF-$(call ENCDEC, ADPCM_YAMAHA, MMF)+= mmf FATE_LAVF-$(call ENCDEC2, MPEG4, PCM_ALAW, MOV)+= mov FATE_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2, MPEG1SYSTEM MPEGPS) += mpg -FATE_LAVF-$(call ENCDEC, PCM_MULAW, PCM_MULAW) += mulaw FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF)+= mxf FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF)+= mxf_d10 FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT)+= nut -FATE_LAVF-$(call ENCDEC, FLAC, OGG)+= ogg FATE_LAVF-$(call ENCDEC, PAM, IMAGE2) += pam FATE_LAVF-$(call ENCDEC, PCX, IMAGE2) += pcx FATE_LAVF-$(call ENCDEC, PGM, IMAGE2) += pgm FATE_LAVF-$(call ENCDEC, PNG, IMAGE2) += png FATE_LAVF-$(call ENCDEC, PPM, IMAGE2) += ppm FATE_LAVF-$(call ENCMUX, RV10 AC3_FIXED,
Re: [libav-devel] [PATCH 01/19] libavcodec: vp8 neon optimizations for aarch64
On Fri, Feb 01, 2019 at 11:12:40AM +0200, Martin Storsjö wrote: > --- a/libavcodec/aarch64/Makefile > +++ b/libavcodec/aarch64/Makefile > @@ -44,6 +44,8 @@ NEON-OBJS-$(CONFIG_MPEGAUDIODSP)+= > aarch64/mpegaudiodsp_neon.o > NEON-OBJS-$(CONFIG_DCA_DECODER) += aarch64/dcadsp_neon.o > \ > aarch64/synth_filter_neon.o > NEON-OBJS-$(CONFIG_VORBIS_DECODER) += aarch64/vorbisdsp_neon.o > +NEON-OBJS-$(CONFIG_VP8DSP) += aarch64/vp8dsp_init_aarch64.o > \ > + aarch64/vp8dsp_neon.o This entry belongs with subsystems, not decoders. > --- /dev/null > +++ b/libavcodec/aarch64/vp8dsp_init_aarch64.c > @@ -0,0 +1,81 @@ > + > +av_cold void ff_vp78dsp_init_aarch64(VP8DSPContext *dsp) > +{ > +if (!have_neon(av_get_cpu_flags())) { > +return; > +} > +} > + > +av_cold void ff_vp8dsp_init_aarch64(VP8DSPContext *dsp) > +{ > +if (!have_neon(av_get_cpu_flags())) { > +return; > +} > +} nit: pointless {} > --- a/libavcodec/vp8dsp.c > +++ b/libavcodec/vp8dsp.c > @@ -685,6 +685,8 @@ av_cold void ff_vp78dsp_init(VP8DSPContext *dsp) > ff_vp78dsp_init_ppc(dsp); > if (ARCH_X86) > ff_vp78dsp_init_x86(dsp); > +if (ARCH_AARCH64) > +ff_vp78dsp_init_aarch64(dsp); > } > @@ -743,5 +745,7 @@ av_cold void ff_vp8dsp_init(VP8DSPContext *dsp) > ff_vp8dsp_init_arm(dsp); > if (ARCH_X86) > ff_vp8dsp_init_x86(dsp); > +if (ARCH_AARCH64) > +ff_vp8dsp_init_aarch64(dsp); order I see that a later patch reorders this, I would suggest squashing. All the non-assembly bits LGTM. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 02/19] aarch64: vp8: Fix the include guard
On Fri, Feb 01, 2019 at 11:12:41AM +0200, Martin Storsjö wrote: > From: Carl Eugen Hoyos > > --- > libavcodec/aarch64/vp8dsp.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) I suggest squashing this into 01/19. The change is OK, obviously. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] Using Co-authored-by instead of Signed-off-by
On Wed, Jan 09, 2019 at 11:29:16AM +0200, Martin Storsjö wrote: > On Wed, 9 Jan 2019, Luca Barbato wrote: > > > Since the start of the project we used Signed-off-by to signal that a > > patch had been edited. > > I'd like to point out that you might have had this interpretation of it and > used it in this way, but it hasn't been a written project wide rule that > this is the intended interpretation in this context. I've used it as a > general "I approve of"-mark. What Martin said; I have used s-o-b for patches from other people, not on my own stuff. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/1] h264/x86: sign extend int stride in deblock functions
On Sun, Jan 27, 2019 at 11:18:41AM +0100, Janne Grunau wrote: > Fixes checkasm errors after adding the h264 deblock tests. > --- > libavcodec/x86/h264_deblock.asm | 8 > libavcodec/x86/h264_deblock_10bit.asm | 9 + > 2 files changed, 17 insertions(+) Shouldn't some int types be converted to ptrdiff_t instead? Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 15/20] tests: Split monolithic lavf-pixfmt test into individual tests
*PLEASE* snip your quotes. On Mon, Sep 24, 2018 at 01:16:46PM +0200, Sean McGovern wrote: > On Thu, Sep 20, 2018, 10:47 Diego Biurrun wrote: > > [...] > > Thank you very much for completing this, Diego. > > Much appreciated, You are welcome :) Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 15/20] tests: Split monolithic lavf-pixfmt test into individual tests
On Mon, Sep 24, 2018 at 08:29:05AM +0200, Luca Barbato wrote: > On 20/09/2018 10:47, Diego Biurrun wrote: > > --- > > YES! :-) This had been a thorn in my side for a loong time... Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 16/20] tests: Move do_lavf() to fate-run.sh
On Fri, Sep 21, 2018 at 05:28:01PM +0200, Vittorio Giovara wrote: > On Fri, Sep 21, 2018 at 2:56 PM, Diego Biurrun wrote: > > On Thu, Sep 20, 2018 at 01:39:20PM +0200, Vittorio Giovara wrote: > > > On Thu, Sep 20, 2018 at 10:47 AM, Diego Biurrun > > wrote: > > > > --- a/tests/fate-run.sh > > > > +++ b/tests/fate-run.sh > > > > -FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT) > > += nut > > > > FATE_LAVF-$(call ENCMUX, RV10 AC3_FIXED,RM) > > += rm > > > > -FATE_LAVF-$(call ENCDEC, FLV, SWF) > > += swf > > > > -FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2, MPEGTS) > > += ts > > > > FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) > > += y4m > > > > > > > > + > > > > +FATE_LAVF_LAVF-$(call ENCDEC2, MSMPEG4V3, MP2, ASF) > > > > += asf > > > > > > LAVF_LAVF? :-/ > > > isn't there a way to prevent this duplication? > > > > Admittedly, this is not pretty. I'd have to rename the testing function as > > well, the Make variables match the testing function names. Suggestions? > > IMO renaming as you propose is fine I did not propose anything, I am waiting for suggestions ;-) Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 16/20] tests: Move do_lavf() to fate-run.sh
On Thu, Sep 20, 2018 at 01:39:20PM +0200, Vittorio Giovara wrote: > On Thu, Sep 20, 2018 at 10:47 AM, Diego Biurrun wrote: > > --- a/tests/fate-run.sh > > +++ b/tests/fate-run.sh > > -FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT)+= nut > > FATE_LAVF-$(call ENCMUX, RV10 AC3_FIXED,RM) += rm > > -FATE_LAVF-$(call ENCDEC, FLV, SWF)+= swf > > -FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2, MPEGTS) += ts > > FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += y4m > > > > + > > +FATE_LAVF_LAVF-$(call ENCDEC2, MSMPEG4V3, MP2, ASF) > > += asf > > LAVF_LAVF? :-/ > isn't there a way to prevent this duplication? Admittedly, this is not pretty. I'd have to rename the testing function as well, the Make variables match the testing function names. Suggestions? > > --- a/tests/ref/lavf/asf > > +++ b/tests/ref/lavf/asf > > @@ -1,3 +1,3 @@ > > -33e857a06b2b5dedce0bf76c9973944c *./tests/data/fate/lavf.asf > > -79 ./tests/data/fate/lavf.asf > > -./tests/data/fate/lavf.asf CRC=0xf6340a10 > > +33e857a06b2b5dedce0bf76c9973944c *tests/data/fate/lavf.asf > > +79 tests/data/fate/lavf.asf > > +tests/data/fate/lavf.asf CRC=0xf6340a10 > > is there a way to avoid having to modify these test files? Not really; the "./" is a remnant of the legacy test infrastructure. All the other reference files do not have it, so I think the change is actually an improvement. > or does changing the path (dropping "./") actually matter? It matters because the files are compared literally, character by character. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 02/20] tests: Enable CRC test for yuv4mpeg
On Thu, Sep 20, 2018 at 01:29:01PM +0200, Vittorio Giovara wrote: > On Thu, Sep 20, 2018 at 10:47 AM, Diego Biurrun wrote: > > --- a/tests/lavf-regression.sh > > +++ b/tests/lavf-regression.sh > > @@ -130,7 +130,7 @@ fi > > if [ -n "$do_y4m" ] ; then > > file=${outfile}lavf.$test > > do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t > > 1 -qscale 10 > > -#do_avconv_crc $file -i $target_path/$file > > +do_avconv_crc $file -i $target_path/$file > > fi > > > > --- a/tests/ref/lavf/y4m > > +++ b/tests/ref/lavf/y4m > > @@ -1,2 +1,3 @@ > > ec8178cb152f9cdbfd9cb724d977db2e *./tests/data/lavf/lavf.y4m > > 3801808 ./tests/data/lavf/lavf.y4m > > +./tests/data/lavf/lavf.y4m CRC=0x0a941f26 > > OK. Do you know why it was disabled? It was added disabled back in 2003. I think it passed oracle the last time around. Notice that the also-disabled lavf-rm CRC test is broken, it gives different results on many configurations. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 14/20] tests: Move lavf pixfmt conversion tests to fate-run.sh
--- tests/fate-run.sh| 17 +++ tests/fate/avformat.mak | 3 ++ tests/lavf-regression.sh | 17 --- tests/ref/lavf/pixfmt| 76 4 files changed, 58 insertions(+), 55 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 875b410305..1da1f599c8 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -220,6 +220,23 @@ lavftest(){ ${base}/lavf-regression.sh $t lavf tests/vsynth1 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags" } +pixfmt(){ +t="${test#lavf-}" +raw_dst="tests/data/$t.lavf.out.yuv" +outdir="tests/data/pixfmt" +mkdir -p "$outdir" +conversions="yuv420p yuv422p yuv444p yuyv422 yuv410p yuv411p yuvj420p \ + yuvj422p yuvj444p rgb24 bgr24 rgb32 rgb565 rgb555 gray monow \ + monob yuv440p yuvj440p" +for pix_fmt in $conversions ; do +file=${outdir}/${pix_fmt}.yuv +run_avconv $DEC_OPTS -r 1 -f image2 -c:v pgmyuv -i $raw_src \ + $ENC_OPTS -f rawvideo -t 1 -s 352x288 -pix_fmt $pix_fmt $target_path/$raw_dst +do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $target_path/$raw_dst \ + $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p +done +} + video_filter(){ filters=$1 shift diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index f35cdcdfea..59b46be54a 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -79,5 +79,8 @@ FATE_LAVF += fate-lavf-pixfmt $(FATE_LAVF): $(AREF) $(VREF) $(FATE_LAVF): CMD = lavftest +fate-lavf-pixfmt: REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%) +fate-lavf-pixfmt: CMD = pixfmt + FATE_AVCONV += $(FATE_LAVF) $(FATE_LAVF_AUDIO_ONLY) $(FATE_LAVF_IMAGES) $(FATE_LAVF_PIPE) fate-lavf: $(FATE_LAVF) $(FATE_LAVF_AUDIO_ONLY) $(FATE_LAVF_IMAGES) $(FATE_LAVF_PIPE) diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index d9759af1ef..8dd4164a94 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -95,20 +95,3 @@ file=${outdir}lavf.$test do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 do_avconv_crc $file -i $target_path/$file fi - -# pix_fmt conversions - -if [ -n "$do_pixfmt" ] ; then -outdir="$datadir/pixfmt/" -mkdir -p "$outdir" -conversions="yuv420p yuv422p yuv444p yuyv422 yuv410p yuv411p yuvj420p \ - yuvj422p yuvj444p rgb24 bgr24 rgb32 rgb565 rgb555 gray monow \ - monob yuv440p yuvj440p" -for pix_fmt in $conversions ; do -file=${outdir}${pix_fmt}.yuv -run_avconv $DEC_OPTS -r 1 -f image2 -c:v pgmyuv -i $raw_src \ - $ENC_OPTS -f rawvideo -t 1 -s 352x288 -pix_fmt $pix_fmt $target_path/$raw_dst -do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $target_path/$raw_dst \ -$ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p -done -fi diff --git a/tests/ref/lavf/pixfmt b/tests/ref/lavf/pixfmt index 186dde5ed3..f13f3dfb23 100644 --- a/tests/ref/lavf/pixfmt +++ b/tests/ref/lavf/pixfmt @@ -1,38 +1,38 @@ -5641dba168ff665af1cdb4a91e1afdd6 *./tests/data/pixfmt/yuv420p.yuv -304128 ./tests/data/pixfmt/yuv420p.yuv -ac68f9fdd9d55efd0306d9b004038761 *./tests/data/pixfmt/yuv422p.yuv -304128 ./tests/data/pixfmt/yuv422p.yuv -5641dba168ff665af1cdb4a91e1afdd6 *./tests/data/pixfmt/yuv444p.yuv -304128 ./tests/data/pixfmt/yuv444p.yuv -ac68f9fdd9d55efd0306d9b004038761 *./tests/data/pixfmt/yuyv422.yuv -304128 ./tests/data/pixfmt/yuyv422.yuv -507c7e9f0c97660385df977469ca9e6d *./tests/data/pixfmt/yuv410p.yuv -304128 ./tests/data/pixfmt/yuv410p.yuv -8594ea0b8d7c2c964525b0801b5351de *./tests/data/pixfmt/yuv411p.yuv -304128 ./tests/data/pixfmt/yuv411p.yuv -e176bd14185788110e055f945de7f95f *./tests/data/pixfmt/yuvj420p.yuv -304128 ./tests/data/pixfmt/yuvj420p.yuv -472028e46a81c98d9b2477507def4723 *./tests/data/pixfmt/yuvj422p.yuv -304128 ./tests/data/pixfmt/yuvj422p.yuv -c10442da177c9f1d12be3c53be6fa12c *./tests/data/pixfmt/yuvj444p.yuv -304128 ./tests/data/pixfmt/yuvj444p.yuv -c6e0f9b5817f484b175c1ec4ffb4e9c9 *./tests/data/pixfmt/rgb24.yuv -304128 ./tests/data/pixfmt/rgb24.yuv -c6e0f9b5817f484b175c1ec4ffb4e9c9 *./tests/data/pixfmt/bgr24.yuv -304128 ./tests/data/pixfmt/bgr24.yuv -c6e0f9b5817f484b175c1ec4ffb4e9c9 *./tests/data/pixfmt/rgb32.yuv -304128 ./tests/data/pixfmt/rgb32.yuv -66d39d464bd89ded2a124897f0a75ade *./tests/data/pixfmt/rgb565.yuv -304128 ./tests/data/pixfmt/rgb565.yuv -c894c3bd8d2631ed1964500b90a0c350 *./tests/data/pixfmt/rgb555.yuv -304128 ./tests/data/pixfmt/rgb555.yuv -6be306b0cce5f8e6c271ea17fef9745b *./tests/data/pixfmt/gray.yuv -304128 ./tests/data/pixfmt/gray.yuv -31398104d2349dd48328a6862bc6711f *./tests/data/pixfmt/monow.yuv -304128 ./tests/data/pixfmt/monow.yuv -31398104d2349dd48328a6862bc6711f *./tests/data/pixfmt/monob.yuv -304128 ./tests/data/pixfmt/monob.yuv -00b85790df5740bab95e2559d81603a7
[libav-devel] [PATCH 15/20] tests: Split monolithic lavf-pixfmt test into individual tests
--- tests/Makefile | 1 + tests/fate-run.sh | 18 +++--- tests/fate/avformat.mak| 4 tests/fate/pixfmt.mak | 27 +++ tests/ref/fate/pixfmt-bgr24| 2 ++ tests/ref/fate/pixfmt-gray | 2 ++ tests/ref/fate/pixfmt-monob| 2 ++ tests/ref/fate/pixfmt-monow| 2 ++ tests/ref/fate/pixfmt-rgb24| 2 ++ tests/ref/fate/pixfmt-rgb32| 2 ++ tests/ref/fate/pixfmt-rgb555 | 2 ++ tests/ref/fate/pixfmt-rgb565 | 2 ++ tests/ref/fate/pixfmt-yuv410p | 2 ++ tests/ref/fate/pixfmt-yuv411p | 2 ++ tests/ref/fate/pixfmt-yuv420p | 2 ++ tests/ref/fate/pixfmt-yuv422p | 2 ++ tests/ref/fate/pixfmt-yuv440p | 2 ++ tests/ref/fate/pixfmt-yuv444p | 2 ++ tests/ref/fate/pixfmt-yuvj420p | 2 ++ tests/ref/fate/pixfmt-yuvj422p | 2 ++ tests/ref/fate/pixfmt-yuvj440p | 2 ++ tests/ref/fate/pixfmt-yuvj444p | 2 ++ tests/ref/fate/pixfmt-yuyv422 | 2 ++ tests/ref/lavf/pixfmt | 38 -- 24 files changed, 73 insertions(+), 53 deletions(-) create mode 100644 tests/fate/pixfmt.mak create mode 100644 tests/ref/fate/pixfmt-bgr24 create mode 100644 tests/ref/fate/pixfmt-gray create mode 100644 tests/ref/fate/pixfmt-monob create mode 100644 tests/ref/fate/pixfmt-monow create mode 100644 tests/ref/fate/pixfmt-rgb24 create mode 100644 tests/ref/fate/pixfmt-rgb32 create mode 100644 tests/ref/fate/pixfmt-rgb555 create mode 100644 tests/ref/fate/pixfmt-rgb565 create mode 100644 tests/ref/fate/pixfmt-yuv410p create mode 100644 tests/ref/fate/pixfmt-yuv411p create mode 100644 tests/ref/fate/pixfmt-yuv420p create mode 100644 tests/ref/fate/pixfmt-yuv422p create mode 100644 tests/ref/fate/pixfmt-yuv440p create mode 100644 tests/ref/fate/pixfmt-yuv444p create mode 100644 tests/ref/fate/pixfmt-yuvj420p create mode 100644 tests/ref/fate/pixfmt-yuvj422p create mode 100644 tests/ref/fate/pixfmt-yuvj440p create mode 100644 tests/ref/fate/pixfmt-yuvj444p create mode 100644 tests/ref/fate/pixfmt-yuyv422 delete mode 100644 tests/ref/lavf/pixfmt diff --git a/tests/Makefile b/tests/Makefile index 9fec13211f..adca8ad172 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -105,6 +105,7 @@ include $(SRC_PATH)/tests/fate/mpc.mak include $(SRC_PATH)/tests/fate/mpeg4.mak include $(SRC_PATH)/tests/fate/opus.mak include $(SRC_PATH)/tests/fate/pcm.mak +include $(SRC_PATH)/tests/fate/pixfmt.mak include $(SRC_PATH)/tests/fate/probe.mak include $(SRC_PATH)/tests/fate/prores.mak include $(SRC_PATH)/tests/fate/qt.mak diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 1da1f599c8..f8c3444e29 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -220,21 +220,17 @@ lavftest(){ ${base}/lavf-regression.sh $t lavf tests/vsynth1 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags" } -pixfmt(){ +pixfmt_conversion(){ t="${test#lavf-}" +conversion="${t#pixfmt-}" raw_dst="tests/data/$t.lavf.out.yuv" outdir="tests/data/pixfmt" mkdir -p "$outdir" -conversions="yuv420p yuv422p yuv444p yuyv422 yuv410p yuv411p yuvj420p \ - yuvj422p yuvj444p rgb24 bgr24 rgb32 rgb565 rgb555 gray monow \ - monob yuv440p yuvj440p" -for pix_fmt in $conversions ; do -file=${outdir}/${pix_fmt}.yuv -run_avconv $DEC_OPTS -r 1 -f image2 -c:v pgmyuv -i $raw_src \ - $ENC_OPTS -f rawvideo -t 1 -s 352x288 -pix_fmt $pix_fmt $target_path/$raw_dst -do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $target_path/$raw_dst \ - $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p -done +file=${outdir}/${conversion}.yuv +run_avconv $DEC_OPTS -r 1 -f image2 -c:v pgmyuv -i $raw_src \ + $ENC_OPTS -f rawvideo -t 1 -s 352x288 -pix_fmt $conversion $target_path/$raw_dst +do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $conversion -i $target_path/$raw_dst \ + $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p } video_filter(){ diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index 59b46be54a..34292cf03c 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -74,13 +74,9 @@ $(FATE_LAVF_PIPE): REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%) $(FATE_LAVF_PIPE): $(VREF) FATE_LAVF += $(FATE_LAVF-yes:%=fate-lavf-%) -FATE_LAVF += fate-lavf-pixfmt $(FATE_LAVF): $(AREF) $(VREF) $(FATE_LAVF): CMD = lavftest -fate-lavf-pixfmt: REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%) -fate-lavf-pixfmt: CMD = pixfmt - FATE_AVCONV += $(FATE_LAVF) $(FATE_LAVF_AUDIO_ONLY) $(FATE_LAVF_IMAGES) $(FATE_LAVF_PIPE) fate-lavf: $(FATE_LAVF) $(FATE_LAVF_AUDIO_ONLY) $(FATE_LAVF_IMAGES) $(FATE_LAVF_PIPE) diff --git a/tests/fate/pixfmt.mak b/tests/fate/pixfmt.mak new file mode 100644 index 00..eaa4cb01bf --- /dev/null +++ b/tests/fate/pixfmt.mak @@ -0,0 +1,27 @@ +FATE_PIXFMT =
[libav-devel] [PATCH 18/20] tests: Use a predefined function for lavf-rm test
--- tests/fate-run.sh| 3 ++- tests/fate/avformat.mak | 4 +++- tests/lavf-regression.sh | 8 tests/ref/lavf/rm| 4 ++-- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index d6eb556dae..2626a894a0 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -210,7 +210,8 @@ lavf(){ t="${test#lavf-}" file=${outdir}/lavf.$t do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le $1 -i $pcm_src $ENC_OPTS -b:a 64k -t 1 -qscale:v 10 $2 -do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3 +test $3 = "disable_crc" || +do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3 } streamed_images(){ diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index d27de75185..4ecbb1d4bf 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -1,5 +1,4 @@ FATE_LAVF-$(call ENCDEC, GIF, IMAGE2) += gif -FATE_LAVF-$(call ENCMUX, RV10 AC3_FIXED,RM) += rm FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += y4m @@ -14,6 +13,7 @@ FATE_LAVF_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2, MPEG1SYSTEM MPEGPS) += mpg FATE_LAVF_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF)+= mxf FATE_LAVF_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF)+= mxf_d10 FATE_LAVF_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT)+= nut +FATE_LAVF_LAVF-$(call ENCMUX, RV10 AC3_FIXED,RM) += rm FATE_LAVF_LAVF-$(call ENCDEC, FLV, SWF)+= swf FATE_LAVF_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2, MPEGTS) += ts @@ -33,6 +33,8 @@ fate-lavf-mov: CMD = lavf "" "-c:a pcm_alaw -c:v mpeg4" fate-lavf-mpg: CMD = lavf "" "-ar 44100" fate-lavf-mxf: CMD = lavf "-ar 48000" "-bf 2 -timecode_frame_start 264363" fate-lavf-mxf_d10: CMD = lavf "-ar 48000 -ac 2" "-r 25 -vf scale=720:576,pad=720:608:0:32 -c:v mpeg2video -g 0 -flags +ildct+low_delay -dc 10 -non_linear_quant 1 -intra_vlc 1 -qscale 1 -ps 1 -qmin 1 -rc_max_vbv_use 1 -rc_min_vbv_use 1 -pix_fmt yuv422p -minrate 3k -maxrate 3k -b 3k -bufsize 120 -top 1 -rc_init_occupancy 120 -qmax 12 -f mxf_d10" +# The lavf-rm CRC test is broken +fate-lavf-rm: CMD = lavf "" "-c:a ac3_fixed" disable_crc fate-lavf-ts: CMD = lavf "" "-mpegts_transport_stream_id 42 -ar 44100" diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index 3d8f46d215..a82c23e809 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -11,14 +11,6 @@ set -e eval do_$test=y -if [ -n "$do_rm" ] ; then -file=${outdir}lavf.rm -do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 -c:a ac3_fixed -b:a 64k -# broken -#do_avconv_crc $file -i $target_path/$file -fi - - # streamed images # mjpeg #file=${outdir}lavf.mjpeg diff --git a/tests/ref/lavf/rm b/tests/ref/lavf/rm index 4793d67e75..d287309f29 100644 --- a/tests/ref/lavf/rm +++ b/tests/ref/lavf/rm @@ -1,2 +1,2 @@ -9eeb3b91c0a45f519fd7f2efea882cf4 *./tests/data/fate/lavf.rm -346414 ./tests/data/fate/lavf.rm +9eeb3b91c0a45f519fd7f2efea882cf4 *tests/data/fate/lavf.rm +346414 tests/data/fate/lavf.rm -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 17/20] tests: Refactor some variable settings
--- tests/fate/avformat.mak | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index 026f6e3084..d27de75185 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -24,17 +24,15 @@ $(FATE_LAVF_LAVF): REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%) $(FATE_LAVF_LAVF): $(AREF) $(VREF) fate-lavf-asf: CMD = lavf "" "-c:a mp2 -ar 44100" "-r 25" -fate-lavf-avi: CMD = lavf "" "-c:a mp2 -ar 44100" +fate-lavf-avi fate-lavf-nut: CMD = lavf "" "-c:a mp2 -ar 44100" fate-lavf-dv: CMD = lavf "-ar 48000 -channel_layout stereo" "-r 25 -s pal" -fate-lavf-flv: CMD = lavf "" "-an" +fate-lavf-flv fate-lavf-swf: CMD = lavf "" "-an" fate-lavf-gxf: CMD = lavf "-ar 48000" "-r 25 -s pal -ac 1" fate-lavf-mkv: CMD = lavf "" "-c:a mp2 -c:v mpeg4 -ar 44100" fate-lavf-mov: CMD = lavf "" "-c:a pcm_alaw -c:v mpeg4" fate-lavf-mpg: CMD = lavf "" "-ar 44100" fate-lavf-mxf: CMD = lavf "-ar 48000" "-bf 2 -timecode_frame_start 264363" fate-lavf-mxf_d10: CMD = lavf "-ar 48000 -ac 2" "-r 25 -vf scale=720:576,pad=720:608:0:32 -c:v mpeg2video -g 0 -flags +ildct+low_delay -dc 10 -non_linear_quant 1 -intra_vlc 1 -qscale 1 -ps 1 -qmin 1 -rc_max_vbv_use 1 -rc_min_vbv_use 1 -pix_fmt yuv422p -minrate 3k -maxrate 3k -b 3k -bufsize 120 -top 1 -rc_init_occupancy 120 -qmax 12 -f mxf_d10" -fate-lavf-nut: CMD = lavf "" "-c:a mp2 -ar 44100" -fate-lavf-swf: CMD = lavf "" "-an" fate-lavf-ts: CMD = lavf "" "-mpegts_transport_stream_id 42 -ar 44100" -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 19/20] tests: Add a convenience function for video-only lavf tests
--- tests/fate-run.sh | 7 +++ tests/fate/avformat.mak | 20 +++- tests/ref/lavf/gif | 6 +++--- tests/ref/lavf/y4m | 6 +++--- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 2626a894a0..cb44b21e0e 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -195,6 +195,13 @@ audio_only(){ do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file } +video_only(){ +t="${test#lavf-}" +file=${outdir}/lavf.$t +do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 $1 +do_avconv_crc $file $DEC_OPTS -i $target_path/$file $1 +} + image_formats(){ t="${test#lavf-}" outdir="tests/data/images/$t" diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index 4ecbb1d4bf..4c149817bb 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -1,7 +1,3 @@ -FATE_LAVF-$(call ENCDEC, GIF, IMAGE2) += gif -FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += y4m - - FATE_LAVF_LAVF-$(call ENCDEC2, MSMPEG4V3, MP2, ASF)+= asf FATE_LAVF_LAVF-$(call ENCDEC2, MPEG4, MP2, AVI)+= avi FATE_LAVF_LAVF-$(call ENCDEC2, DVVIDEO,PCM_S16LE, AVI)+= dv @@ -96,10 +92,16 @@ $(FATE_LAVF_PIPE): CMD = streamed_images $(FATE_LAVF_PIPE): REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%) $(FATE_LAVF_PIPE): $(VREF) -FATE_LAVF += $(FATE_LAVF-yes:%=fate-lavf-%) +FATE_LAVF_VIDEO_ONLY-$(call ENCDEC, GIF,IMAGE2) += gif +FATE_LAVF_VIDEO_ONLY-$(CONFIG_YUV4MPEGPIPE_MUXER)+= y4m + +FATE_LAVF_VIDEO_ONLY = $(FATE_LAVF_VIDEO_ONLY-yes:%=fate-lavf-%) + +$(FATE_LAVF_VIDEO_ONLY): CMD = video_only +$(FATE_LAVF_VIDEO_ONLY): REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%) +$(FATE_LAVF_VIDEO_ONLY): $(VREF) -$(FATE_LAVF): $(AREF) $(VREF) -$(FATE_LAVF): CMD = lavftest +fate-lavf-gif: CMD = video_only "-pix_fmt rgb24" -FATE_AVCONV += $(FATE_LAVF) $(FATE_LAVF_AUDIO_ONLY) $(FATE_LAVF_IMAGES) $(FATE_LAVF_LAVF) $(FATE_LAVF_PIPE) -fate-lavf: $(FATE_LAVF) $(FATE_LAVF_AUDIO_ONLY) $(FATE_LAVF_IMAGES) $(FATE_LAVF_LAVF) $(FATE_LAVF_PIPE) +FATE_AVCONV += $(FATE_LAVF_AUDIO_ONLY) $(FATE_LAVF_IMAGES) $(FATE_LAVF_LAVF) $(FATE_LAVF_PIPE) $(FATE_LAVF_VIDEO_ONLY) +fate-lavf: $(FATE_LAVF_AUDIO_ONLY) $(FATE_LAVF_IMAGES) $(FATE_LAVF_LAVF) $(FATE_LAVF_PIPE) $(FATE_LAVF_VIDEO_ONLY) diff --git a/tests/ref/lavf/gif b/tests/ref/lavf/gif index ca6eb1c1fd..fbec091b83 100644 --- a/tests/ref/lavf/gif +++ b/tests/ref/lavf/gif @@ -1,3 +1,3 @@ -e6089fd4ef3b9df44090ab3650bdd810 *./tests/data/fate/lavf.gif -2906401 ./tests/data/fate/lavf.gif -./tests/data/fate/lavf.gif CRC=0xe5605ff6 +e6089fd4ef3b9df44090ab3650bdd810 *tests/data/fate/lavf.gif +2906401 tests/data/fate/lavf.gif +tests/data/fate/lavf.gif CRC=0xe5605ff6 diff --git a/tests/ref/lavf/y4m b/tests/ref/lavf/y4m index c130e1c7cc..d1b077db3e 100644 --- a/tests/ref/lavf/y4m +++ b/tests/ref/lavf/y4m @@ -1,3 +1,3 @@ -ec8178cb152f9cdbfd9cb724d977db2e *./tests/data/fate/lavf.y4m -3801808 ./tests/data/fate/lavf.y4m -./tests/data/fate/lavf.y4m CRC=0x0a941f26 +ec8178cb152f9cdbfd9cb724d977db2e *tests/data/fate/lavf.y4m +3801808 tests/data/fate/lavf.y4m +tests/data/fate/lavf.y4m CRC=0x0a941f26 -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 20/20] tests: Remove the remnants of now-unused lavf regression test scripts
--- tests/fate-run.sh | 6 - tests/lavf-regression.sh | 30 - tests/regression-funcs.sh | 67 --- 3 files changed, 103 deletions(-) delete mode 100755 tests/lavf-regression.sh delete mode 100755 tests/regression-funcs.sh diff --git a/tests/fate-run.sh b/tests/fate-run.sh index cb44b21e0e..60417a9414 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -229,12 +229,6 @@ streamed_images(){ do_avconv_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file } -lavftest(){ -t="${test#lavf-}" -ref=${base}/ref/lavf/$t -${base}/lavf-regression.sh $t lavf tests/vsynth1 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags" -} - pixfmt_conversion(){ t="${test#lavf-}" conversion="${t#pixfmt-}" diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh deleted file mode 100755 index a82c23e809..00 --- a/tests/lavf-regression.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# automatic regression test for libavformat -# -# -#set -x - -set -e - -. $(dirname $0)/regression-funcs.sh - -eval do_$test=y - -# streamed images -# mjpeg -#file=${outdir}lavf.mjpeg -#do_avconv $file -t 1 -qscale 10 -f image2 -c:v pgmyuv -i $raw_src -#do_avconv_crc $file -i $target_path/$file - -if [ -n "$do_gif" ] ; then -file=${outdir}lavf.gif -do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 -pix_fmt rgb24 -do_avconv_crc $file $DEC_OPTS -i $target_path/$file -pix_fmt rgb24 -fi - -if [ -n "$do_y4m" ] ; then -file=${outdir}lavf.$test -do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 -do_avconv_crc $file -i $target_path/$file -fi diff --git a/tests/regression-funcs.sh b/tests/regression-funcs.sh deleted file mode 100755 index 9247139386..00 --- a/tests/regression-funcs.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -# -# common regression functions for avconv -# -# - -test="${1#regtest-}" -test_ref=$2 -raw_src_dir=$3 -target_exec=$4 -target_path=$5 -threads=${6:-1} -cpuflags=${8:-all} - -datadir="./tests/data" -target_datadir="${target_path}/${datadir}" - -this="$test.$test_ref" -outdir="$datadir/fate/" - -# various files -avconv="$target_exec ${target_path}/avconv" -raw_src="${target_path}/$raw_src_dir/%02d.pgm" -raw_dst="$datadir/$this.out.yuv" -pcm_src="$target_datadir/asynth1.sw" -crcfile="$datadir/$this.crc" -target_crcfile="$target_datadir/$this.crc" - -cleanfiles="$raw_dst $crcfile" -trap 'rm -f -- $cleanfiles' EXIT - -[ "${V-0}" -gt 0 ] && echov=echov || echov=: - -echov(){ -echo "$@" >&3 -} - -. $(dirname $0)/md5.sh - -AVCONV_OPTS="-nostats -y -cpuflags $cpuflags" -COMMON_OPTS="-flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -fflags +bitexact" -DEC_OPTS="$COMMON_OPTS -threads $threads" -ENC_OPTS="$COMMON_OPTS -threads 1 -dct fastint" - -run_avconv() -{ -$echov $avconv $AVCONV_OPTS $* -$avconv $AVCONV_OPTS $* -} - -do_avconv() -{ -f="$1" -shift -set -- $* ${target_path}/$f -run_avconv $* -do_md5sum $f -echo $(wc -c $f) -} - -do_avconv_crc() -{ -f="$1" -shift -run_avconv $* -f crc "$target_crcfile" -echo "$f $(cat $crcfile)" -} -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 03/20] tests/lavf-regression: Rename some variables for greater clarity
--- tests/lavf-regression.sh | 30 +++--- tests/regression-funcs.sh | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index fc9869cb9d..5c9a510403 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -13,32 +13,32 @@ eval do_$test=y do_lavf() { -file=${outfile}lavf.$1 +file=${outdir}lavf.$1 do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le $2 -i $pcm_src $ENC_OPTS -b:a 64k -t 1 -qscale:v 10 $3 do_avconv_crc $file $DEC_OPTS -i $target_path/$file $4 } do_streamed_images() { -file=${outfile}${1}pipe.$1 +file=${outdir}${1}pipe.$1 do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src -f image2pipe $ENC_OPTS -t 1 -qscale 10 do_avconv_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file } do_image_formats() { -outfile="$datadir/images/$1/" -mkdir -p "$outfile" -file=${outfile}%02d.$1 +outdir="$datadir/images/$1/" +mkdir -p "$outdir" +file=${outdir}%02d.$1 run_avconv $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $2 $ENC_OPTS $3 -frames 12 -y -qscale 10 $target_path/$file -do_md5sum ${outfile}02.$1 +do_md5sum ${outdir}02.$1 do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file -echo $(wc -c ${outfile}02.$1) +echo $(wc -c ${outdir}02.$1) } do_audio_only() { -file=${outfile}lavf.$1 +file=${outdir}lavf.$1 do_avconv $file $DEC_OPTS $2 -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $3 do_avconv_crc $file $DEC_OPTS $4 -i $target_path/$file } @@ -52,7 +52,7 @@ do_lavf asf "" "-c:a mp2 -ar 44100" "-r 25" fi if [ -n "$do_rm" ] ; then -file=${outfile}lavf.rm +file=${outdir}lavf.rm do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 -c:a ac3_fixed -b:a 64k # broken #do_avconv_crc $file -i $target_path/$file @@ -105,7 +105,7 @@ fi # streamed images # mjpeg -#file=${outfile}lavf.mjpeg +#file=${outdir}lavf.mjpeg #do_avconv $file -t 1 -qscale 10 -f image2 -c:v pgmyuv -i $raw_src #do_avconv_crc $file -i $target_path/$file @@ -122,13 +122,13 @@ do_streamed_images ppm fi if [ -n "$do_gif" ] ; then -file=${outfile}lavf.gif +file=${outdir}lavf.gif do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 -pix_fmt rgb24 do_avconv_crc $file $DEC_OPTS -i $target_path/$file -pix_fmt rgb24 fi if [ -n "$do_y4m" ] ; then -file=${outfile}lavf.$test +file=${outdir}lavf.$test do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 do_avconv_crc $file -i $target_path/$file fi @@ -236,13 +236,13 @@ fi # pix_fmt conversions if [ -n "$do_pixfmt" ] ; then -outfile="$datadir/pixfmt/" -mkdir -p "$outfile" +outdir="$datadir/pixfmt/" +mkdir -p "$outdir" conversions="yuv420p yuv422p yuv444p yuyv422 yuv410p yuv411p yuvj420p \ yuvj422p yuvj444p rgb24 bgr24 rgb32 rgb565 rgb555 gray monow \ monob yuv440p yuvj440p" for pix_fmt in $conversions ; do -file=${outfile}${pix_fmt}.yuv +file=${outdir}${pix_fmt}.yuv run_avconv $DEC_OPTS -r 1 -f image2 -c:v pgmyuv -i $raw_src \ $ENC_OPTS -f rawvideo -t 1 -s 352x288 -pix_fmt $pix_fmt $target_path/$raw_dst do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $target_path/$raw_dst \ diff --git a/tests/regression-funcs.sh b/tests/regression-funcs.sh index 3728d44980..4dffd55221 100755 --- a/tests/regression-funcs.sh +++ b/tests/regression-funcs.sh @@ -16,7 +16,7 @@ datadir="./tests/data" target_datadir="${target_path}/${datadir}" this="$test.$test_ref" -outfile="$datadir/$test_ref/" +outdir="$datadir/$test_ref/" # various files avconv="$target_exec ${target_path}/avconv" @@ -30,7 +30,7 @@ cleanfiles="$raw_dst $crcfile" trap 'rm -f -- $cleanfiles' EXIT mkdir -p "$datadir" -mkdir -p "$outfile" +mkdir -p "$outdir" [ "${V-0}" -gt 0 ] && echov=echov || echov=: -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 11/20] tests: Refactor some variable settings
--- tests/fate-run.sh | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 74efa66057..603860b81d 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -152,27 +152,19 @@ enc_dec(){ tests/tiny_psnr $srcfile $decfile $cmp_unit $cmp_shift } -datadir="tests/data" -target_datadir="${target_path}/${datadir}" - -this="$test.lavf" - # various files avconv2="$target_exec ${target_path}/avconv" raw_src="${target_path}/tests/vsynth1/%02d.pgm" -raw_dst="$datadir/$this.out.yuv" -pcm_src="$target_datadir/asynth1.sw" -crcfile="$datadir/$this.crc" -target_crcfile="$target_datadir/$this.crc" +crcfile="tests/data/$test.lavf.crc" +target_crcfile="${target_path}/$crcfile" echov(){ echo "$@" >&3 } -AVCONV_OPTS="-nostats -y -cpuflags $cpuflags" -COMMON_OPTS="-flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -fflags +bitexact" -DEC_OPTS="$COMMON_OPTS -threads $threads" -ENC_OPTS="$COMMON_OPTS -threads 1 -dct fastint" +AVCONV_OPTS="-nostats -y -cpuflags $cpuflags -threads $threads" +DEC_OPTS="-flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -fflags +bitexact" +ENC_OPTS="$DEC_OPTS -threads 1 -dct fastint" run_avconv(){ $echov $avconv2 $AVCONV_OPTS $* -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 09/20] tests: Move streamed_images() to fate-run.sh
--- tests/fate-run.sh| 51 tests/fate/avformat.mak | 17 +++- tests/lavf-regression.sh | 20 --- tests/ref/lavf/pbmpipe | 6 +++--- tests/ref/lavf/pgmpipe | 6 +++--- tests/ref/lavf/ppmpipe | 6 +++--- 6 files changed, 72 insertions(+), 34 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 8de749d4a7..41cb2be1fb 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -152,6 +152,57 @@ enc_dec(){ tests/tiny_psnr $srcfile $decfile $cmp_unit $cmp_shift } +datadir="tests/data" +target_datadir="${target_path}/${datadir}" + +this="$test.lavf" + +# various files +avconv2="$target_exec ${target_path}/avconv" +raw_src="${target_path}/tests/vsynth1/%02d.pgm" +raw_dst="$datadir/$this.out.yuv" +pcm_src="$target_datadir/asynth1.sw" +crcfile="$datadir/$this.crc" +target_crcfile="$target_datadir/$this.crc" + +echov(){ +echo "$@" >&3 +} + +AVCONV_OPTS="-nostats -y -cpuflags $cpuflags" +COMMON_OPTS="-flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -fflags +bitexact" +DEC_OPTS="$COMMON_OPTS -threads $threads" +ENC_OPTS="$COMMON_OPTS -threads 1 -dct fastint" + +run_avconv(){ +$echov $avconv2 $AVCONV_OPTS $* +$avconv2 $AVCONV_OPTS $* +} + +do_avconv(){ +f="$1" +shift +set -- $* ${target_path}/$f +run_avconv $* +do_md5sum $f +echo $(wc -c $f) +} + +do_avconv_crc(){ +f="$1" +shift +run_avconv $* -f crc "$target_crcfile" +echo "$f $(cat $crcfile)" +} + +streamed_images(){ +t="${test#lavf-}" +t="${t%pipe}" +file=${outdir}/${t}pipe.$t +do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src -f image2pipe $ENC_OPTS -t 1 -qscale 10 +do_avconv_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file +} + lavftest(){ t="${test#lavf-}" ref=${base}/ref/lavf/$t diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index 6ffcde3f2b..51a9e2acaf 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -20,13 +20,10 @@ FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF)+= mxf_d10 FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT)+= nut FATE_LAVF-$(call ENCDEC, FLAC, OGG)+= ogg FATE_LAVF-$(call ENCDEC, PAM, IMAGE2) += pam -FATE_LAVF-$(call ENCDEC, PBM, IMAGE2PIPE) += pbmpipe FATE_LAVF-$(call ENCDEC, PCX, IMAGE2) += pcx FATE_LAVF-$(call ENCDEC, PGM, IMAGE2) += pgm -FATE_LAVF-$(call ENCDEC, PGM, IMAGE2PIPE) += pgmpipe FATE_LAVF-$(call ENCDEC, PNG, IMAGE2) += png FATE_LAVF-$(call ENCDEC, PPM, IMAGE2) += ppm -FATE_LAVF-$(call ENCDEC, PPM, IMAGE2PIPE) += ppmpipe FATE_LAVF-$(call ENCMUX, RV10 AC3_FIXED,RM) += rm FATE_LAVF-$(call ENCDEC, PCM_U8,RSO)+= rso FATE_LAVF-$(call ENCDEC, SGI, IMAGE2) += sgi @@ -42,11 +39,21 @@ FATE_LAVF-$(call ENCDEC, PCM_S16LE, WAV) += wav FATE_LAVF-$(call ENCDEC, XWD, IMAGE2) += xwd FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += y4m +FATE_LAVF_PIPE-$(call ENCDEC, PBM, IMAGE2PIPE) += pbmpipe +FATE_LAVF_PIPE-$(call ENCDEC, PGM, IMAGE2PIPE) += pgmpipe +FATE_LAVF_PIPE-$(call ENCDEC, PPM, IMAGE2PIPE) += ppmpipe + +FATE_LAVF_PIPE = $(FATE_LAVF_PIPE-yes:%=fate-lavf-%) + +$(FATE_LAVF_PIPE): CMD = streamed_images +$(FATE_LAVF_PIPE): REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%) +$(FATE_LAVF_PIPE): $(VREF) + FATE_LAVF += $(FATE_LAVF-yes:%=fate-lavf-%) FATE_LAVF += fate-lavf-pixfmt $(FATE_LAVF): $(AREF) $(VREF) $(FATE_LAVF): CMD = lavftest -FATE_AVCONV += $(FATE_LAVF) -fate-lavf: $(FATE_LAVF) +FATE_AVCONV += $(FATE_LAVF) $(FATE_LAVF_PIPE) +fate-lavf: $(FATE_LAVF) $(FATE_LAVF_PIPE) diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index c6fbf68c31..dd73476669 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -18,14 +18,6 @@ do_lavf() do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3 } -do_streamed_images() -{ -t="${test%pipe}" -file=${outdir}${t}pipe.$t -do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src -f image2pipe $ENC_OPTS -t 1 -qscale 10 -do_avconv_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file -} - do_image_formats() { outdir="$datadir/images/$test/" @@ -110,18 +102,6 @@ fi #do_avconv $file -t 1 -qscale 10 -f image2 -c:v pgmyuv -i $raw_src #do_avconv_crc $file -i $target_path/$file -if [ -n "$do_pbmpipe" ] ; then -do_streamed_images -fi - -if [ -n "$do_pgmpipe" ] ; then -do_streamed_images -fi - -if [ -n
[libav-devel] [PATCH 04/20] tests: Simplify do_streamed_images()
--- tests/lavf-regression.sh | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index 5c9a510403..10fbe4cbeb 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -20,7 +20,8 @@ do_lavf() do_streamed_images() { -file=${outdir}${1}pipe.$1 +t="${test%pipe}" +file=${outdir}${t}pipe.$t do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src -f image2pipe $ENC_OPTS -t 1 -qscale 10 do_avconv_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file } @@ -110,15 +111,15 @@ fi #do_avconv_crc $file -i $target_path/$file if [ -n "$do_pbmpipe" ] ; then -do_streamed_images pbm +do_streamed_images fi if [ -n "$do_pgmpipe" ] ; then -do_streamed_images pgm +do_streamed_images fi if [ -n "$do_ppmpipe" ] ; then -do_streamed_images ppm +do_streamed_images fi if [ -n "$do_gif" ] ; then -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 13/20] tests: Move do_image_formats() to fate-run.sh
--- tests/fate-run.sh| 11 tests/fate/avformat.mak | 43 +--- tests/lavf-regression.sh | 65 tests/ref/lavf/bmp | 6 ++--- tests/ref/lavf/dpx | 6 ++--- tests/ref/lavf/jpg | 6 ++--- tests/ref/lavf/pam | 6 ++--- tests/ref/lavf/pcx | 6 ++--- tests/ref/lavf/pgm | 6 ++--- tests/ref/lavf/png | 6 ++--- tests/ref/lavf/ppm | 6 ++--- tests/ref/lavf/sgi | 6 ++--- tests/ref/lavf/sun | 6 ++--- tests/ref/lavf/tga | 6 ++--- tests/ref/lavf/tiff | 6 ++--- tests/ref/lavf/xwd | 6 ++--- 16 files changed, 78 insertions(+), 119 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 63fc9662b7..875b410305 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -195,6 +195,17 @@ audio_only(){ do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file } +image_formats(){ +t="${test#lavf-}" +outdir="tests/data/images/$t" +mkdir -p "$outdir" +file=${outdir}/%02d.$t +run_avconv $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $1 $ENC_OPTS $2 -frames 12 -y -qscale 10 $target_path/$file +do_md5sum ${outdir}/02.$t +do_avconv_crc $file $DEC_OPTS $2 -i $target_path/$file +echo $(wc -c ${outdir}/02.$t) +} + streamed_images(){ t="${test#lavf-}" t="${t%pipe}" diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index e677a21df5..f35cdcdfea 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -1,31 +1,18 @@ FATE_LAVF-$(call ENCDEC2, MSMPEG4V3, MP2, ASF)+= asf FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, AVI)+= avi -FATE_LAVF-$(call ENCDEC, BMP, IMAGE2) += bmp -FATE_LAVF-$(call ENCDEC, DPX, IMAGE2) += dpx FATE_LAVF-$(call ENCDEC2, DVVIDEO,PCM_S16LE, AVI)+= dv FATE_LAVF-$(call ENCDEC, FLV, FLV)+= flv FATE_LAVF-$(call ENCDEC, GIF, IMAGE2) += gif FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, GXF)+= gxf -FATE_LAVF-$(call ENCDEC, MJPEG, IMAGE2) += jpg FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, MATROSKA) += mkv FATE_LAVF-$(call ENCDEC2, MPEG4, PCM_ALAW, MOV)+= mov FATE_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2, MPEG1SYSTEM MPEGPS) += mpg FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF)+= mxf FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF)+= mxf_d10 FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT)+= nut -FATE_LAVF-$(call ENCDEC, PAM, IMAGE2) += pam -FATE_LAVF-$(call ENCDEC, PCX, IMAGE2) += pcx -FATE_LAVF-$(call ENCDEC, PGM, IMAGE2) += pgm -FATE_LAVF-$(call ENCDEC, PNG, IMAGE2) += png -FATE_LAVF-$(call ENCDEC, PPM, IMAGE2) += ppm FATE_LAVF-$(call ENCMUX, RV10 AC3_FIXED,RM) += rm -FATE_LAVF-$(call ENCDEC, SGI, IMAGE2) += sgi -FATE_LAVF-$(call ENCDEC, SUNRAST, IMAGE2) += sun FATE_LAVF-$(call ENCDEC, FLV, SWF)+= swf -FATE_LAVF-$(call ENCDEC, TARGA, IMAGE2) += tga -FATE_LAVF-$(call ENCDEC, TIFF, IMAGE2) += tiff FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2, MPEGTS) += ts -FATE_LAVF-$(call ENCDEC, XWD, IMAGE2) += xwd FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += y4m FATE_LAVF_AUDIO_ONLY-$(call ENCDEC, PCM_S16BE,AIFF) += aiff @@ -50,6 +37,32 @@ fate-lavf-al fate-lavf-ul: CMD = audio_only "" "" "-ar 44100" fate-lavf-ogg: CMD = audio_only "" "-c:a flac" fate-lavf-voc_s16: CMD = audio_only "-ac 2" "-c:a pcm_s16le -f voc" + + +FATE_LAVF_IMAGES-$(call ENCDEC, BMP,IMAGE2) += bmp +FATE_LAVF_IMAGES-$(call ENCDEC, DPX,IMAGE2) += dpx +FATE_LAVF_IMAGES-$(call ENCDEC, MJPEG, IMAGE2) += jpg +FATE_LAVF_IMAGES-$(call ENCDEC, PAM,IMAGE2) += pam +FATE_LAVF_IMAGES-$(call ENCDEC, PCX,IMAGE2) += pcx +FATE_LAVF_IMAGES-$(call ENCDEC, PGM,IMAGE2) += pgm +FATE_LAVF_IMAGES-$(call ENCDEC, PNG,IMAGE2) += png +FATE_LAVF_IMAGES-$(call ENCDEC, PPM,IMAGE2) += ppm +FATE_LAVF_IMAGES-$(call ENCDEC, SGI,IMAGE2) += sgi +FATE_LAVF_IMAGES-$(call ENCDEC, SUNRAST,IMAGE2) += sun +FATE_LAVF_IMAGES-$(call ENCDEC, TARGA, IMAGE2) += tga +FATE_LAVF_IMAGES-$(call ENCDEC, TIFF,
[libav-devel] [PATCH 06/20] tests: Simplify do_lavf()
--- tests/lavf-regression.sh | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index 8eb5bf1fdf..992973b37c 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -13,9 +13,9 @@ eval do_$test=y do_lavf() { -file=${outdir}lavf.$1 -do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le $2 -i $pcm_src $ENC_OPTS -b:a 64k -t 1 -qscale:v 10 $3 -do_avconv_crc $file $DEC_OPTS -i $target_path/$file $4 +file=${outdir}lavf.$test +do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le $1 -i $pcm_src $ENC_OPTS -b:a 64k -t 1 -qscale:v 10 $2 +do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3 } do_streamed_images() @@ -45,11 +45,11 @@ do_audio_only() } if [ -n "$do_avi" ] ; then -do_lavf avi "" "-c:a mp2 -ar 44100" +do_lavf "" "-c:a mp2 -ar 44100" fi if [ -n "$do_asf" ] ; then -do_lavf asf "" "-c:a mp2 -ar 44100" "-r 25" +do_lavf "" "-c:a mp2 -ar 44100" "-r 25" fi if [ -n "$do_rm" ] ; then @@ -60,47 +60,47 @@ do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 fi if [ -n "$do_mpg" ] ; then -do_lavf mpg "" "-ar 44100" +do_lavf "" "-ar 44100" fi if [ -n "$do_mxf" ] ; then -do_lavf mxf "-ar 48000" "-bf 2 -timecode_frame_start 264363" +do_lavf "-ar 48000" "-bf 2 -timecode_frame_start 264363" fi if [ -n "$do_mxf_d10" ]; then -do_lavf mxf_d10 "-ar 48000 -ac 2" "-r 25 -vf scale=720:576,pad=720:608:0:32 -c:v mpeg2video -g 0 -flags +ildct+low_delay -dc 10 -non_linear_quant 1 -intra_vlc 1 -qscale 1 -ps 1 -qmin 1 -rc_max_vbv_use 1 -rc_min_vbv_use 1 -pix_fmt yuv422p -minrate 3k -maxrate 3k -b 3k -bufsize 120 -top 1 -rc_init_occupancy 120 -qmax 12 -f mxf_d10" +do_lavf "-ar 48000 -ac 2" "-r 25 -vf scale=720:576,pad=720:608:0:32 -c:v mpeg2video -g 0 -flags +ildct+low_delay -dc 10 -non_linear_quant 1 -intra_vlc 1 -qscale 1 -ps 1 -qmin 1 -rc_max_vbv_use 1 -rc_min_vbv_use 1 -pix_fmt yuv422p -minrate 3k -maxrate 3k -b 3k -bufsize 120 -top 1 -rc_init_occupancy 120 -qmax 12 -f mxf_d10" fi if [ -n "$do_ts" ] ; then -do_lavf ts "" "-mpegts_transport_stream_id 42 -ar 44100" +do_lavf "" "-mpegts_transport_stream_id 42 -ar 44100" fi if [ -n "$do_swf" ] ; then -do_lavf swf "" "-an" +do_lavf "" "-an" fi if [ -n "$do_flv" ] ; then -do_lavf flv "" "-an" +do_lavf "" "-an" fi if [ -n "$do_mov" ] ; then -do_lavf mov "" "-c:a pcm_alaw -c:v mpeg4" +do_lavf "" "-c:a pcm_alaw -c:v mpeg4" fi if [ -n "$do_dv" ] ; then -do_lavf dv "-ar 48000 -channel_layout stereo" "-r 25 -s pal" +do_lavf "-ar 48000 -channel_layout stereo" "-r 25 -s pal" fi if [ -n "$do_gxf" ] ; then -do_lavf gxf "-ar 48000" "-r 25 -s pal -ac 1" +do_lavf "-ar 48000" "-r 25 -s pal -ac 1" fi if [ -n "$do_nut" ] ; then -do_lavf nut "" "-c:a mp2 -ar 44100" +do_lavf "" "-c:a mp2 -ar 44100" fi if [ -n "$do_mkv" ] ; then -do_lavf mkv "" "-c:a mp2 -c:v mpeg4 -ar 44100" +do_lavf "" "-c:a mp2 -c:v mpeg4 -ar 44100" fi -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 07/20] tests: Simplify do_audio_only()
--- tests/lavf-regression.sh | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index 992973b37c..c6fbf68c31 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -39,9 +39,9 @@ do_image_formats() do_audio_only() { -file=${outdir}lavf.$1 -do_avconv $file $DEC_OPTS $2 -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $3 -do_avconv_crc $file $DEC_OPTS $4 -i $target_path/$file +file=${outdir}lavf.$test +do_avconv $file $DEC_OPTS $1 -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $2 +do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file } if [ -n "$do_avi" ] ; then @@ -191,47 +191,47 @@ fi # audio only if [ -n "$do_wav" ] ; then -do_audio_only wav +do_audio_only fi if [ -n "$do_al" ] ; then -do_audio_only al "" "" "-ar 44100" +do_audio_only "" "" "-ar 44100" fi if [ -n "$do_ul" ] ; then -do_audio_only ul "" "" "-ar 44100" +do_audio_only "" "" "-ar 44100" fi if [ -n "$do_au" ] ; then -do_audio_only au +do_audio_only fi if [ -n "$do_mmf" ] ; then -do_audio_only mmf +do_audio_only fi if [ -n "$do_aiff" ] ; then -do_audio_only aiff +do_audio_only fi if [ -n "$do_voc" ] ; then -do_audio_only voc +do_audio_only fi if [ -n "$do_voc_s16" ] ; then -do_audio_only voc_s16 "-ac 2" "-c:a pcm_s16le -f voc" +do_audio_only "-ac 2" "-c:a pcm_s16le -f voc" fi if [ -n "$do_ogg" ] ; then -do_audio_only ogg "" "-c:a flac" +do_audio_only "" "-c:a flac" fi if [ -n "$do_rso" ] ; then -do_audio_only rso +do_audio_only fi if [ -n "$do_sox" ] ; then -do_audio_only sox +do_audio_only fi # pix_fmt conversions -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 16/20] tests: Move do_lavf() to fate-run.sh
--- tests/fate-run.sh| 7 ++ tests/fate/avformat.mak | 53 +++ tests/lavf-regression.sh | 59 tests/ref/lavf/asf | 6 ++--- tests/ref/lavf/avi | 6 ++--- tests/ref/lavf/dv| 6 ++--- tests/ref/lavf/flv | 6 ++--- tests/ref/lavf/gxf | 6 ++--- tests/ref/lavf/mkv | 6 ++--- tests/ref/lavf/mov | 6 ++--- tests/ref/lavf/mpg | 6 ++--- tests/ref/lavf/mxf | 6 ++--- tests/ref/lavf/mxf_d10 | 6 ++--- tests/ref/lavf/nut | 6 ++--- tests/ref/lavf/swf | 6 ++--- tests/ref/lavf/ts| 6 ++--- 16 files changed, 84 insertions(+), 113 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index f8c3444e29..d6eb556dae 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -206,6 +206,13 @@ image_formats(){ echo $(wc -c ${outdir}/02.$t) } +lavf(){ +t="${test#lavf-}" +file=${outdir}/lavf.$t +do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le $1 -i $pcm_src $ENC_OPTS -b:a 64k -t 1 -qscale:v 10 $2 +do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3 +} + streamed_images(){ t="${test#lavf-}" t="${t%pipe}" diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index 34292cf03c..026f6e3084 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -1,20 +1,43 @@ -FATE_LAVF-$(call ENCDEC2, MSMPEG4V3, MP2, ASF)+= asf -FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, AVI)+= avi -FATE_LAVF-$(call ENCDEC2, DVVIDEO,PCM_S16LE, AVI)+= dv -FATE_LAVF-$(call ENCDEC, FLV, FLV)+= flv FATE_LAVF-$(call ENCDEC, GIF, IMAGE2) += gif -FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, GXF)+= gxf -FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, MATROSKA) += mkv -FATE_LAVF-$(call ENCDEC2, MPEG4, PCM_ALAW, MOV)+= mov -FATE_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2, MPEG1SYSTEM MPEGPS) += mpg -FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF)+= mxf -FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF)+= mxf_d10 -FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT)+= nut FATE_LAVF-$(call ENCMUX, RV10 AC3_FIXED,RM) += rm -FATE_LAVF-$(call ENCDEC, FLV, SWF)+= swf -FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2, MPEGTS) += ts FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += y4m + +FATE_LAVF_LAVF-$(call ENCDEC2, MSMPEG4V3, MP2, ASF)+= asf +FATE_LAVF_LAVF-$(call ENCDEC2, MPEG4, MP2, AVI)+= avi +FATE_LAVF_LAVF-$(call ENCDEC2, DVVIDEO,PCM_S16LE, AVI)+= dv +FATE_LAVF_LAVF-$(call ENCDEC, FLV, FLV)+= flv +FATE_LAVF_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, GXF)+= gxf +FATE_LAVF_LAVF-$(call ENCDEC2, MPEG4, MP2, MATROSKA) += mkv +FATE_LAVF_LAVF-$(call ENCDEC2, MPEG4, PCM_ALAW, MOV)+= mov +FATE_LAVF_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2, MPEG1SYSTEM MPEGPS) += mpg +FATE_LAVF_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF)+= mxf +FATE_LAVF_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF)+= mxf_d10 +FATE_LAVF_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT)+= nut +FATE_LAVF_LAVF-$(call ENCDEC, FLV, SWF)+= swf +FATE_LAVF_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2, MPEGTS) += ts + +FATE_LAVF_LAVF = $(FATE_LAVF_LAVF-yes:%=fate-lavf-%) + +$(FATE_LAVF_LAVF): CMD = lavf +$(FATE_LAVF_LAVF): REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%) +$(FATE_LAVF_LAVF): $(AREF) $(VREF) + +fate-lavf-asf: CMD = lavf "" "-c:a mp2 -ar 44100" "-r 25" +fate-lavf-avi: CMD = lavf "" "-c:a mp2 -ar 44100" +fate-lavf-dv: CMD = lavf "-ar 48000 -channel_layout stereo" "-r 25 -s pal" +fate-lavf-flv: CMD = lavf "" "-an" +fate-lavf-gxf: CMD = lavf "-ar 48000" "-r 25 -s pal -ac 1" +fate-lavf-mkv: CMD = lavf "" "-c:a mp2 -c:v mpeg4 -ar 44100" +fate-lavf-mov: CMD = lavf "" "-c:a pcm_alaw -c:v mpeg4" +fate-lavf-mpg: CMD = lavf "" "-ar 44100" +fate-lavf-mxf: CMD = lavf "-ar 48000" "-bf 2 -timecode_frame_start 264363" +fate-lavf-mxf_d10: CMD = lavf "-ar 48000 -ac 2" "-r 25 -vf scale=720:576,pad=720:608:0:32 -c:v mpeg2video -g 0 -flags +ildct+low_delay -dc 10 -non_linear_quant 1 -intra_vlc 1 -qscale 1 -ps 1 -qmin 1 -rc_max_vbv_use 1 -rc_min_vbv_use 1 -pix_fmt yuv422p -minrate 3k -maxrate 3k -b 3k -bufsize 120 -top 1 -rc_init_occupancy 120 -qmax 12 -f mxf_d10" +fate-lavf-nut: CMD = lavf "" "-c:a mp2 -ar 44100" +fate-lavf-swf: CMD = lavf "" "-an" +fate-lavf-ts: CMD = lavf ""
[libav-devel] [PATCH 01/20] tests: Use more consistent names for tests
This will help refactor the test infrastructure. --- tests/fate/avformat.mak| 12 ++-- tests/fate/seek.mak| 22 +++--- tests/lavf-regression.sh | 18 +- tests/ref/lavf/aiff| 6 +++--- tests/ref/lavf/{alaw => al}| 0 tests/ref/lavf/{dv_fmt => dv} | 0 tests/ref/lavf/{flv_fmt => flv}| 0 tests/ref/lavf/{sunrast => sun}| 0 tests/ref/lavf/{mulaw => ul} | 0 tests/ref/lavf/voc_s16 | 6 +++--- tests/ref/lavf/{yuv4mpeg => y4m} | 0 tests/ref/seek/{lavf-alaw => lavf-al} | 0 tests/ref/seek/{lavf-dv_fmt => lavf-dv}| 0 tests/ref/seek/{lavf-flv_fmt => lavf-flv} | 0 tests/ref/seek/{lavf-mulaw => lavf-ul} | 0 tests/ref/seek/{lavf-yuv4mpeg => lavf-y4m} | 0 16 files changed, 32 insertions(+), 32 deletions(-) rename tests/ref/lavf/{alaw => al} (100%) rename tests/ref/lavf/{dv_fmt => dv} (100%) rename tests/ref/lavf/{flv_fmt => flv} (100%) rename tests/ref/lavf/{sunrast => sun} (100%) rename tests/ref/lavf/{mulaw => ul} (100%) rename tests/ref/lavf/{yuv4mpeg => y4m} (100%) rename tests/ref/seek/{lavf-alaw => lavf-al} (100%) rename tests/ref/seek/{lavf-dv_fmt => lavf-dv} (100%) rename tests/ref/seek/{lavf-flv_fmt => lavf-flv} (100%) rename tests/ref/seek/{lavf-mulaw => lavf-ul} (100%) rename tests/ref/seek/{lavf-yuv4mpeg => lavf-y4m} (100%) diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index 458ae7cae9..6ffcde3f2b 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -1,12 +1,12 @@ FATE_LAVF-$(call ENCDEC, PCM_S16BE, AIFF) += aiff -FATE_LAVF-$(call ENCDEC, PCM_ALAW, PCM_ALAW) += alaw +FATE_LAVF-$(call ENCDEC, PCM_ALAW, PCM_ALAW) += al FATE_LAVF-$(call ENCDEC2, MSMPEG4V3, MP2, ASF)+= asf FATE_LAVF-$(call ENCDEC, PCM_S16BE, AU) += au FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, AVI)+= avi FATE_LAVF-$(call ENCDEC, BMP, IMAGE2) += bmp FATE_LAVF-$(call ENCDEC, DPX, IMAGE2) += dpx -FATE_LAVF-$(call ENCDEC2, DVVIDEO,PCM_S16LE, AVI)+= dv_fmt -FATE_LAVF-$(call ENCDEC, FLV, FLV)+= flv_fmt +FATE_LAVF-$(call ENCDEC2, DVVIDEO,PCM_S16LE, AVI)+= dv +FATE_LAVF-$(call ENCDEC, FLV, FLV)+= flv FATE_LAVF-$(call ENCDEC, GIF, IMAGE2) += gif FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, GXF)+= gxf FATE_LAVF-$(call ENCDEC, MJPEG, IMAGE2) += jpg @@ -14,7 +14,7 @@ FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, MATROSKA) += mkv FATE_LAVF-$(call ENCDEC, ADPCM_YAMAHA, MMF)+= mmf FATE_LAVF-$(call ENCDEC2, MPEG4, PCM_ALAW, MOV)+= mov FATE_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2, MPEG1SYSTEM MPEGPS) += mpg -FATE_LAVF-$(call ENCDEC, PCM_MULAW, PCM_MULAW) += mulaw +FATE_LAVF-$(call ENCDEC, PCM_MULAW, PCM_MULAW) += ul FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF)+= mxf FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF)+= mxf_d10 FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT)+= nut @@ -31,7 +31,7 @@ FATE_LAVF-$(call ENCMUX, RV10 AC3_FIXED,RM) += rm FATE_LAVF-$(call ENCDEC, PCM_U8,RSO)+= rso FATE_LAVF-$(call ENCDEC, SGI, IMAGE2) += sgi FATE_LAVF-$(call ENCDEC, PCM_S16LE, SOX)+= sox -FATE_LAVF-$(call ENCDEC, SUNRAST, IMAGE2) += sunrast +FATE_LAVF-$(call ENCDEC, SUNRAST, IMAGE2) += sun FATE_LAVF-$(call ENCDEC, FLV, SWF)+= swf FATE_LAVF-$(call ENCDEC, TARGA, IMAGE2) += tga FATE_LAVF-$(call ENCDEC, TIFF, IMAGE2) += tiff @@ -40,7 +40,7 @@ FATE_LAVF-$(call ENCDEC, PCM_U8,VOC) += voc FATE_LAVF-$(call ENCDEC, PCM_S16LE, VOC)+= voc_s16 FATE_LAVF-$(call ENCDEC, PCM_S16LE, WAV)+= wav FATE_LAVF-$(call ENCDEC, XWD, IMAGE2) += xwd -FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += yuv4mpeg +FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += y4m FATE_LAVF += $(FATE_LAVF-yes:%=fate-lavf-%) FATE_LAVF += fate-lavf-pixfmt diff --git a/tests/fate/seek.mak b/tests/fate/seek.mak index 60adab2085..c7e56f811a 100644 --- a/tests/fate/seek.mak +++ b/tests/fate/seek.mak @@
[libav-devel] [PATCH 02/20] tests: Enable CRC test for yuv4mpeg
--- tests/lavf-regression.sh | 2 +- tests/ref/lavf/y4m | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index 18f000bbea..fc9869cb9d 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -130,7 +130,7 @@ fi if [ -n "$do_y4m" ] ; then file=${outfile}lavf.$test do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 -#do_avconv_crc $file -i $target_path/$file +do_avconv_crc $file -i $target_path/$file fi # image formats diff --git a/tests/ref/lavf/y4m b/tests/ref/lavf/y4m index 8c1566ea0d..367b37621d 100644 --- a/tests/ref/lavf/y4m +++ b/tests/ref/lavf/y4m @@ -1,2 +1,3 @@ ec8178cb152f9cdbfd9cb724d977db2e *./tests/data/lavf/lavf.y4m 3801808 ./tests/data/lavf/lavf.y4m +./tests/data/lavf/lavf.y4m CRC=0x0a941f26 -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [RFC] the great lavf-tests cleanup
Hello world! I got bored/motivated while travelling a few weeks ago and finally tackled this thing that I had been planning since forever. The fate-lavf tests still use the legacy staged shellscript infrastructure and are not properly managed through the Makefiles. This set fixes that issue and eliminates the old legacy scripts, resulting in a simpler and more maintainable test infrastructure. It also splits the huge monolithic lavf-pixfmt test into small pieces, resulting in more detailed error messages and a huge speedup when using multiple cores. This still has some rough edges here and there that show how the set evolved initially. I could possibly squash some of the patches. For example, I could drop the elimination of the silly first arguments of the do_foo() helper functions and drop the argument as part of the move to fate-run.sh. It is, however, ripe for a first round of comments. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 08/20] tests: Store intermediate files for lavf tests in tests/data/fate subdir
--- tests/fate/seek.mak | 55 --- tests/ref/lavf/aiff | 6 +++--- tests/ref/lavf/al | 6 +++--- tests/ref/lavf/asf| 6 +++--- tests/ref/lavf/au | 6 +++--- tests/ref/lavf/avi| 6 +++--- tests/ref/lavf/dv | 6 +++--- tests/ref/lavf/flv| 6 +++--- tests/ref/lavf/gif| 6 +++--- tests/ref/lavf/gxf| 6 +++--- tests/ref/lavf/mkv| 6 +++--- tests/ref/lavf/mmf| 6 +++--- tests/ref/lavf/mov| 6 +++--- tests/ref/lavf/mpg| 6 +++--- tests/ref/lavf/mxf| 6 +++--- tests/ref/lavf/mxf_d10| 6 +++--- tests/ref/lavf/nut| 6 +++--- tests/ref/lavf/ogg| 6 +++--- tests/ref/lavf/pbmpipe| 6 +++--- tests/ref/lavf/pgmpipe| 6 +++--- tests/ref/lavf/ppmpipe| 6 +++--- tests/ref/lavf/rm | 4 ++-- tests/ref/lavf/rso| 6 +++--- tests/ref/lavf/sox| 6 +++--- tests/ref/lavf/swf| 6 +++--- tests/ref/lavf/ts | 6 +++--- tests/ref/lavf/ul | 6 +++--- tests/ref/lavf/voc| 6 +++--- tests/ref/lavf/voc_s16| 6 +++--- tests/ref/lavf/wav| 6 +++--- tests/ref/lavf/y4m| 6 +++--- tests/regression-funcs.sh | 5 + 32 files changed, 118 insertions(+), 120 deletions(-) diff --git a/tests/fate/seek.mak b/tests/fate/seek.mak index c7e56f811a..23adb50254 100644 --- a/tests/fate/seek.mak +++ b/tests/fate/seek.mak @@ -180,41 +180,42 @@ FATE_SEEK_LAVF-$(call ENCDEC, PCM_U8, VOC) += voc FATE_SEEK_LAVF-$(call ENCDEC, PCM_S16LE, WAV) += wav FATE_SEEK_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER)+= y4m -fate-seek-lavf-aiff: SRC = lavf/lavf.aiff -fate-seek-lavf-al: SRC = lavf/lavf.al -fate-seek-lavf-asf: SRC = lavf/lavf.asf -fate-seek-lavf-au: SRC = lavf/lavf.au -fate-seek-lavf-avi: SRC = lavf/lavf.avi +fate-seek-lavf-aiff: SRC = fate/lavf.aiff +fate-seek-lavf-al: SRC = fate/lavf.al +fate-seek-lavf-asf: SRC = fate/lavf.asf +fate-seek-lavf-au: SRC = fate/lavf.au +fate-seek-lavf-avi: SRC = fate/lavf.avi +fate-seek-lavf-dv: SRC = fate/lavf.dv +fate-seek-lavf-flv: SRC = fate/lavf.flv +fate-seek-lavf-gif: SRC = fate/lavf.gif +fate-seek-lavf-gxf: SRC = fate/lavf.gxf +fate-seek-lavf-mkv: SRC = fate/lavf.mkv +fate-seek-lavf-mmf: SRC = fate/lavf.mmf +fate-seek-lavf-mov: SRC = fate/lavf.mov +fate-seek-lavf-mpg: SRC = fate/lavf.mpg +fate-seek-lavf-mxf: SRC = fate/lavf.mxf +fate-seek-lavf-mxf_d10: SRC = fate/lavf.mxf_d10 +fate-seek-lavf-nut: SRC = fate/lavf.nut +fate-seek-lavf-ogg: SRC = fate/lavf.ogg +fate-seek-lavf-pbmpipe: SRC = fate/pbmpipe.pbm +fate-seek-lavf-pgmpipe: SRC = fate/pgmpipe.pgm +fate-seek-lavf-ppmpipe: SRC = fate/ppmpipe.ppm +fate-seek-lavf-rm: SRC = fate/lavf.rm +fate-seek-lavf-swf: SRC = fate/lavf.swf +fate-seek-lavf-ts: SRC = fate/lavf.ts +fate-seek-lavf-ul: SRC = fate/lavf.ul +fate-seek-lavf-voc: SRC = fate/lavf.voc +fate-seek-lavf-wav: SRC = fate/lavf.wav +fate-seek-lavf-y4m: SRC = fate/lavf.y4m + fate-seek-lavf-bmp: SRC = images/bmp/%02d.bmp -fate-seek-lavf-dv: SRC = lavf/lavf.dv -fate-seek-lavf-flv: SRC = lavf/lavf.flv -fate-seek-lavf-gif: SRC = lavf/lavf.gif -fate-seek-lavf-gxf: SRC = lavf/lavf.gxf fate-seek-lavf-jpg: SRC = images/jpg/%02d.jpg -fate-seek-lavf-mkv: SRC = lavf/lavf.mkv -fate-seek-lavf-mmf: SRC = lavf/lavf.mmf -fate-seek-lavf-mov: SRC = lavf/lavf.mov -fate-seek-lavf-mpg: SRC = lavf/lavf.mpg -fate-seek-lavf-ul: SRC = lavf/lavf.ul -fate-seek-lavf-mxf: SRC = lavf/lavf.mxf -fate-seek-lavf-mxf_d10: SRC = lavf/lavf.mxf_d10 -fate-seek-lavf-nut: SRC = lavf/lavf.nut -fate-seek-lavf-ogg: SRC = lavf/lavf.ogg -fate-seek-lavf-pbmpipe: SRC = lavf/pbmpipe.pbm fate-seek-lavf-pcx: SRC = images/pcx/%02d.pcx fate-seek-lavf-pgm: SRC = images/pgm/%02d.pgm -fate-seek-lavf-pgmpipe: SRC = lavf/pgmpipe.pgm fate-seek-lavf-ppm: SRC = images/ppm/%02d.ppm -fate-seek-lavf-ppmpipe: SRC = lavf/ppmpipe.ppm -fate-seek-lavf-rm: SRC = lavf/lavf.rm fate-seek-lavf-sgi: SRC = images/sgi/%02d.sgi -fate-seek-lavf-swf: SRC = lavf/lavf.swf fate-seek-lavf-tga: SRC = images/tga/%02d.tga fate-seek-lavf-tiff: SRC = images/tiff/%02d.tiff -fate-seek-lavf-ts: SRC = lavf/lavf.ts -fate-seek-lavf-voc: SRC = lavf/lavf.voc -fate-seek-lavf-wav: SRC = lavf/lavf.wav -fate-seek-lavf-y4m: SRC = lavf/lavf.y4m FATE_SEEK += $(FATE_SEEK_LAVF-yes:%=fate-seek-lavf-%) diff --git a/tests/ref/lavf/aiff b/tests/ref/lavf/aiff index e0b0edee5e..4e4c25e2e7 100644 --- a/tests/ref/lavf/aiff +++ b/tests/ref/lavf/aiff @@ -1,3 +1,3 @@ -9d9e55431800bf6aea46a7d67509da4e *./tests/data/lavf/lavf.aiff -88254 ./tests/data/lavf/lavf.aiff
[libav-devel] [PATCH 05/20] tests: Simplify do_image_formats()
--- tests/lavf-regression.sh | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index 10fbe4cbeb..8eb5bf1fdf 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -28,13 +28,13 @@ do_streamed_images() do_image_formats() { -outdir="$datadir/images/$1/" +outdir="$datadir/images/$test/" mkdir -p "$outdir" -file=${outdir}%02d.$1 -run_avconv $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $2 $ENC_OPTS $3 -frames 12 -y -qscale 10 $target_path/$file -do_md5sum ${outdir}02.$1 -do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file -echo $(wc -c ${outdir}02.$1) +file=${outdir}%02d.$test +run_avconv $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $1 $ENC_OPTS $2 -frames 12 -y -qscale 10 $target_path/$file +do_md5sum ${outdir}02.$test +do_avconv_crc $file $DEC_OPTS $2 -i $target_path/$file +echo $(wc -c ${outdir}02.$test) } do_audio_only() @@ -137,55 +137,55 @@ fi # image formats if [ -n "$do_pgm" ] ; then -do_image_formats pgm +do_image_formats fi if [ -n "$do_ppm" ] ; then -do_image_formats ppm +do_image_formats fi if [ -n "$do_png" ] ; then -do_image_formats png +do_image_formats fi if [ -n "$do_bmp" ] ; then -do_image_formats bmp +do_image_formats fi if [ -n "$do_tga" ] ; then -do_image_formats tga +do_image_formats fi if [ -n "$do_tiff" ] ; then -do_image_formats tiff "-pix_fmt rgb24" +do_image_formats "-pix_fmt rgb24" fi if [ -n "$do_sgi" ] ; then -do_image_formats sgi +do_image_formats fi if [ -n "$do_jpg" ] ; then -do_image_formats jpg "-pix_fmt yuvj420p" "-f image2" +do_image_formats "-pix_fmt yuvj420p" "-f image2" fi if [ -n "$do_pam" ] ; then -do_image_formats pam +do_image_formats fi if [ -n "$do_pcx" ] ; then -do_image_formats pcx +do_image_formats fi if [ -n "$do_xwd" ] ; then -do_image_formats xwd +do_image_formats fi if [ -n "$do_dpx" ] ; then -do_image_formats dpx +do_image_formats fi if [ -n "$do_sun" ] ; then -do_image_formats sun +do_image_formats fi # audio only -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 12/20] tests: Move do_audio_only() to fate-run.sh
--- tests/fate-run.sh| 8 tests/fate/avformat.mak | 37 + tests/lavf-regression.sh | 53 tests/ref/lavf/aiff | 6 +++--- tests/ref/lavf/al| 6 +++--- tests/ref/lavf/au| 6 +++--- tests/ref/lavf/mmf | 6 +++--- tests/ref/lavf/ogg | 6 +++--- tests/ref/lavf/rso | 6 +++--- tests/ref/lavf/sox | 6 +++--- tests/ref/lavf/ul| 6 +++--- tests/ref/lavf/voc | 6 +++--- tests/ref/lavf/voc_s16 | 6 +++--- tests/ref/lavf/wav | 6 +++--- 14 files changed, 65 insertions(+), 99 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 603860b81d..63fc9662b7 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -155,6 +155,7 @@ enc_dec(){ # various files avconv2="$target_exec ${target_path}/avconv" raw_src="${target_path}/tests/vsynth1/%02d.pgm" +pcm_src="${target_path}/tests/data/asynth1.sw" crcfile="tests/data/$test.lavf.crc" target_crcfile="${target_path}/$crcfile" @@ -187,6 +188,13 @@ do_avconv_crc(){ echo "$f $(cat $crcfile)" } +audio_only(){ +t="${test#lavf-}" +file=${outdir}/lavf.$t +do_avconv $file $DEC_OPTS $1 -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $2 +do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file +} + streamed_images(){ t="${test#lavf-}" t="${t%pipe}" diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index 51a9e2acaf..e677a21df5 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -1,7 +1,4 @@ -FATE_LAVF-$(call ENCDEC, PCM_S16BE, AIFF) += aiff -FATE_LAVF-$(call ENCDEC, PCM_ALAW, PCM_ALAW) += al FATE_LAVF-$(call ENCDEC2, MSMPEG4V3, MP2, ASF)+= asf -FATE_LAVF-$(call ENCDEC, PCM_S16BE, AU) += au FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, AVI)+= avi FATE_LAVF-$(call ENCDEC, BMP, IMAGE2) += bmp FATE_LAVF-$(call ENCDEC, DPX, IMAGE2) += dpx @@ -11,34 +8,48 @@ FATE_LAVF-$(call ENCDEC, GIF, IMAGE2) += gif FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, GXF)+= gxf FATE_LAVF-$(call ENCDEC, MJPEG, IMAGE2) += jpg FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, MATROSKA) += mkv -FATE_LAVF-$(call ENCDEC, ADPCM_YAMAHA, MMF)+= mmf FATE_LAVF-$(call ENCDEC2, MPEG4, PCM_ALAW, MOV)+= mov FATE_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2, MPEG1SYSTEM MPEGPS) += mpg -FATE_LAVF-$(call ENCDEC, PCM_MULAW, PCM_MULAW) += ul FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF)+= mxf FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF)+= mxf_d10 FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT)+= nut -FATE_LAVF-$(call ENCDEC, FLAC, OGG)+= ogg FATE_LAVF-$(call ENCDEC, PAM, IMAGE2) += pam FATE_LAVF-$(call ENCDEC, PCX, IMAGE2) += pcx FATE_LAVF-$(call ENCDEC, PGM, IMAGE2) += pgm FATE_LAVF-$(call ENCDEC, PNG, IMAGE2) += png FATE_LAVF-$(call ENCDEC, PPM, IMAGE2) += ppm FATE_LAVF-$(call ENCMUX, RV10 AC3_FIXED,RM) += rm -FATE_LAVF-$(call ENCDEC, PCM_U8,RSO)+= rso FATE_LAVF-$(call ENCDEC, SGI, IMAGE2) += sgi -FATE_LAVF-$(call ENCDEC, PCM_S16LE, SOX)+= sox FATE_LAVF-$(call ENCDEC, SUNRAST, IMAGE2) += sun FATE_LAVF-$(call ENCDEC, FLV, SWF)+= swf FATE_LAVF-$(call ENCDEC, TARGA, IMAGE2) += tga FATE_LAVF-$(call ENCDEC, TIFF, IMAGE2) += tiff FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2, MPEGTS) += ts -FATE_LAVF-$(call ENCDEC, PCM_U8,VOC)+= voc -FATE_LAVF-$(call ENCDEC, PCM_S16LE, VOC)+= voc_s16 -FATE_LAVF-$(call ENCDEC, PCM_S16LE, WAV)+= wav FATE_LAVF-$(call ENCDEC, XWD, IMAGE2) += xwd FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += y4m +FATE_LAVF_AUDIO_ONLY-$(call ENCDEC, PCM_S16BE,AIFF) += aiff +FATE_LAVF_AUDIO_ONLY-$(call ENCDEC, PCM_ALAW, PCM_ALAW) += al +FATE_LAVF_AUDIO_ONLY-$(call ENCDEC, PCM_S16BE,AU) += au +FATE_LAVF_AUDIO_ONLY-$(call ENCDEC, ADPCM_YAMAHA, MMF) += mmf +FATE_LAVF_AUDIO_ONLY-$(call ENCDEC, FLAC, OGG) += ogg +FATE_LAVF_AUDIO_ONLY-$(call ENCDEC, PCM_U8, RSO)
[libav-devel] [PATCH 10/20] tests: Drop duplicate variable declaration
--- tests/fate-run.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 41cb2be1fb..74efa66057 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -213,7 +213,6 @@ video_filter(){ filters=$1 shift label=${test#filter-} -raw_src="${target_path}/tests/vsynth1/%02d.pgm" printf '%-20s' $label avconv $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src \ $FLAGS $ENC_OPTS -vf "$filters" -c:v rawvideo -frames:v 5 $* -f nut md5: -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/3] configure: speed up flatten_extralibs_wrapper()
On Sun, Sep 16, 2018 at 11:52:59PM -0300, James Almer wrote: > From: Avi Halachmi > > x50 - x200 faster. The set looks very interesting. I've had some ideas on how to speed up this part of configure already, so I'm doubly happy to see some work done in that area. At a first glance these patches seem to apply several optimizations at once. I'll have to study them in detail. There is no flatten_extralibs_wrapper() though... Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] qsv: enforcing continuous memory layout
On Sun, Jul 29, 2018 at 12:50:42AM +0200, Maxym Dmytrychenko wrote: > On Sat, Jul 28, 2018 at 12:20 PM Diego Biurrun wrote: > > On Sat, Jul 28, 2018 at 10:53:54AM +0200, maxim_d33 wrote: > > > --- > > > libavcodec/qsvenc.c | 34 -- > > > 1 file changed, 24 insertions(+), 10 deletions(-) > > > > Looks like your Git is not set up properly. > > > > > what do you mean exactly, Diego? > I was squashing it before sending - may be because of this. The Git author name looks strange: maxim_d33. Probably because your Git user.name is not set and falls back on your username. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] qsv: enforcing continuous memory layout
On Sat, Jul 28, 2018 at 10:53:54AM +0200, maxim_d33 wrote: > --- > libavcodec/qsvenc.c | 34 -- > 1 file changed, 24 insertions(+), 10 deletions(-) Looks like your Git is not set up properly. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] configure: fix inline asm checks
On Mon, Jun 25, 2018 at 02:41:30PM +0300, Martin Storsjö wrote: > On Fri, 8 Jun 2018, Diego Biurrun wrote: > > > On Thu, Jun 07, 2018 at 11:05:26PM -0300, James Almer wrote: > > > On 6/7/2018 6:01 PM, Diego Biurrun wrote: > > > > On Thu, Jun 07, 2018 at 03:03:21PM +0300, Martin Storsjö wrote: > > > >> Commit 8c893aa3cd5 removed quotes that were required to detect > > > >> inline asm: > > > >> > > > >> check_insn armv5te qadd r0, r0, r0 > > > >> .../test.c:1:34: error: expected string literal in 'asm' > > > >> void foo(void){ __asm__ volatile(qadd r0, r0, r0); } > > > >> > > > >> The correct code is: > > > >> > > > >> void foo(void){ __asm__ volatile("qadd r0, r0, r0"); } > > > >> --- a/configure > > > >> +++ b/configure > > > >> @@ -866,7 +866,7 @@ EOF > > > >> check_insn(){ > > > >> log check_insn "$@" > > > >> -check_inline_asm ${1}_inline "$2" > > > >> +check_inline_asm ${1}_inline "\"$2\"" > > > >> check_as ${1}_external "$2" > > > >> } > > > > > This does not look like the correct fix to me. The required > > > quotes > > > > should be part of the convenience function instead. Notice how calls > > > > to check_insn and check_inline_asm differ in the way they quote their > > > > arguments. There should be no need for this inconsistency. > > > > > I'll look into it. > > > > > > Changing all the calls from check_insn name 'insn' to check_insn name > > > '"insn"' would probably fix the check_inline_asm tests, but may break > > > the check_as tests. > > > > Complicating the function calls is not the right way to go. The helper > > function should take care of the required quoting and not rely on the > > callers to pass arguments in nested quotes. > > Ping; whoever is waiting for the other, please pick the thread up again. Feel free to push this, I'll come up with a better fix later. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] configure: fix inline asm checks
On Thu, Jun 07, 2018 at 11:05:26PM -0300, James Almer wrote: > On 6/7/2018 6:01 PM, Diego Biurrun wrote: > > On Thu, Jun 07, 2018 at 03:03:21PM +0300, Martin Storsjö wrote: > >> Commit 8c893aa3cd5 removed quotes that were required to detect > >> inline asm: > >> > >> check_insn armv5te qadd r0, r0, r0 > >> .../test.c:1:34: error: expected string literal in 'asm' > >> void foo(void){ __asm__ volatile(qadd r0, r0, r0); } > >> > >> The correct code is: > >> > >> void foo(void){ __asm__ volatile("qadd r0, r0, r0"); } > >> --- a/configure > >> +++ b/configure > >> @@ -866,7 +866,7 @@ EOF > >> check_insn(){ > >> log check_insn "$@" > >> -check_inline_asm ${1}_inline "$2" > >> +check_inline_asm ${1}_inline "\"$2\"" > >> check_as ${1}_external "$2" > >> } > > > > This does not look like the correct fix to me. The required quotes > > should be part of the convenience function instead. Notice how calls > > to check_insn and check_inline_asm differ in the way they quote their > > arguments. There should be no need for this inconsistency. > > > > I'll look into it. > > Changing all the calls from check_insn name 'insn' to check_insn name > '"insn"' would probably fix the check_inline_asm tests, but may break > the check_as tests. Complicating the function calls is not the right way to go. The helper function should take care of the required quoting and not rely on the callers to pass arguments in nested quotes. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] configure: fix inline asm checks
On Thu, Jun 07, 2018 at 03:03:21PM +0300, Martin Storsjö wrote: > Commit 8c893aa3cd5 removed quotes that were required to detect > inline asm: > > check_insn armv5te qadd r0, r0, r0 > .../test.c:1:34: error: expected string literal in 'asm' > void foo(void){ __asm__ volatile(qadd r0, r0, r0); } > > The correct code is: > > void foo(void){ __asm__ volatile("qadd r0, r0, r0"); } > --- a/configure > +++ b/configure > @@ -866,7 +866,7 @@ EOF > check_insn(){ > log check_insn "$@" > -check_inline_asm ${1}_inline "$2" > +check_inline_asm ${1}_inline "\"$2\"" > check_as ${1}_external "$2" > } This does not look like the correct fix to me. The required quotes should be part of the convenience function instead. Notice how calls to check_insn and check_inline_asm differ in the way they quote their arguments. There should be no need for this inconsistency. I'll look into it. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [libva-devel] [PATCH] avformat/libsrt: add payload size and latency option / deprecate ts
> From 47e1d01b08494d5745d35f7a701059230c78671a Mon Sep 17 00:00:00 2001 > From: Nablet Developer Somebody still needs to set up their Git? :) > Date: Mon, 21 May 2018 13:55:25 +0700 > Subject: [PATCH 1/2] avformat/libsrt: add payload size option > > Signed-off-by: Nablet Developer > --- > doc/protocols.texi | 10 ++ > libavformat/libsrt.c | 19 ++- > 2 files changed, 28 insertions(+), 1 deletion(-) > > diff --git a/doc/protocols.texi b/doc/protocols.texi > index e2d06a067..247734cd8 100644 > --- a/doc/protocols.texi > +++ b/doc/protocols.texi > @@ -755,6 +755,16 @@ only if @option{pbkeylen} is non-zero. It is used on > the receiver only if the received data is encrypted. > The configured passphrase cannot be recovered (write-only). > > +@item payloadsize=@var{bytes} > +Sets the maximum declared size of a single call to sending > +function in Live mode. Apart from - I think - a missing "the" in "to the sending" this sentence confuses me. What is the size of a function call? Or is it something else that size refers to? > +Default value is for MPEG TS; if you are going to use SRT MPEG-TS > --- a/libavformat/libsrt.c > +++ b/libavformat/libsrt.c > @@ -34,6 +34,16 @@ > > +/* This is for MPEG TS and it's a default SRTO_PAYLOADSIZE for SRTT_LIVE (8 > TS packets) */ same > +/* This is the maximum payload size for Live mode, should you have a > different payload type than MPEG TS */ same > @@ -86,6 +97,7 @@ static const AVOption libsrt_options[] = { > +{ "payload size", "maximum declared size of a single call to sending > function", OFFSET(payload_size), AV_OPT_TYPE_INT, { .i64 = > SRT_LIVE_DEFAULT_PAYLOAD_SIZE }, -1, SRT_LIVE_MAX_PAYLOAD_SIZE, .flags = D|E > }, see above > @@ -276,7 +288,8 @@ static int libsrt_set_options_pre(URLContext *h, int fd) > (s->nakreport >= 0 && libsrt_setsockopt(h, fd, SRTO_NAKREPORT, > "SRTO_NAKREPORT", >nakreport, sizeof(s->nakreport)) < 0) || > -(connect_timeout >= 0 && libsrt_setsockopt(h, fd, SRTO_CONNTIMEO, > "SRTO_CONNTIMEO", _timeout, sizeof(connect_timeout)) <0 )) { > +(connect_timeout >= 0 && libsrt_setsockopt(h, fd, SRTO_CONNTIMEO, > "SRTO_CONNTIMEO", _timeout, sizeof(connect_timeout)) <0 ) || > +(s->payload_size >= 0 && libsrt_setsockopt(h, fd, SRTO_PAYLOADSIZE, > "SRTO_PAYLOADSIZE", >payload_size, sizeof(s->payload_size)) <0 )) { Add a space after '<' please. > @@ -454,6 +467,9 @@ static int libsrt_open(URLContext *h, const char *uri, > int flags) > } > + if (av_find_info_tag(buf, sizeof(buf), "payload_size", p)) { > + s->payload_size = strtol(buf, NULL, 10); > + } stray tabs > @@ -466,6 +482,7 @@ static int libsrt_open(URLContext *h, const char *uri, > int flags) > } > } > } > +h->max_packet_size = s->payload_size > 0 ? s->payload_size > :SRT_LIVE_DEFAULT_PAYLOAD_SIZE; odd spacing around : > From af93164c05eeb62c37c21cc7a9a3cd43c6c0c4a7 Mon Sep 17 00:00:00 2001 > From: Nablet Developer odd developer name > --- a/doc/protocols.texi > +++ b/doc/protocols.texi > @@ -710,6 +710,17 @@ IP Type of Service. Applies to sender only. Default > value is 0xB8. > > +@item latency > +Timestamp-based Packet Delivery Delay. > +Used to absorb burst of missed packet retransmission. burstS, retransmissionS > +This flag sets both @option{rcvlatency} and @option{peerlatency} > +to the same value. Note that prior to version 1.3.0 > +this is the only flag to set the latency, however > +this is effectively equivalent to setting @option{peerlatency}, > +when the side is sender and @option{rcvlatency} > +when the side is receiver, and the bidirectional > +stream sending is not supported. "the side"? > + > @item pbkeylen=@var{bytes} > Sender encryption key length, in bytes. > Only can be set to 0, 16, 24 and 32. > @@ -773,6 +788,18 @@ Not required on receiver (set to 0), > key size obtained from sender in HaiCrypt handshake. > Default value is 0. > > +@item rcvlatency > +The time that should elapse since the moment when the > +packet was sent and the moment when it's delivered to > +the receiver application in the receiving function. > +This time should be a buffer time large enough to cover > +the time spent for sending, unexpectedly extended RTT > +time, and the time needed to retransmit the lost UDP > +packet. The effective latency value will be the maximum > +of this options' value and the value of @option{perrlatency} pe_E_rlatency > +set by the peer side. This option in pre-1.3.0 version > +is available only as @option{latency}. Before version 1.3.0 this option is only available as .. > --- a/libavformat/libsrt.c > +++ b/libavformat/libsrt.c > @@ -93,7 +95,9 @@ static const AVOption libsrt_options[] = { > { "oheadbw","MaxBW ceiling based on % over input stream rate", >OFFSET(oheadbw), AV_OPT_TYPE_INT, { .i64 = > -1 }, -1, 100, .flags =
Re: [libav-devel] [PATCH V2] lavc/qsvenc: add an option to disable MFE mode
On Wed, May 23, 2018 at 03:15:14AM +, Li, Zhong wrote: > > From: libav-devel [mailto:libav-devel-boun...@libav.org] On Behalf Of > > Diego Biurrun > > Sent: Tuesday, May 22, 2018 6:30 PM > > To: libav development <libav-devel@libav.org> > > Subject: Re: [libav-devel] [PATCH V2] lavc/qsvenc: add an option to disable > > MFE mode > > > > On Tue, May 22, 2018 at 08:03:00AM +, Li, Zhong wrote: > > > > -Original Message- > > > > From: libav-devel [mailto:libav-devel-boun...@libav.org] On Behalf > > > > Of Diego Biurrun > > > > Sent: Monday, May 21, 2018 11:17 PM > > > > To: libav development <libav-devel@libav.org> > > > > Subject: Re: [libav-devel] [PATCH V2] lavc/qsvenc: add an option to > > > > disable MFE mode > > > > > > > > On Mon, May 21, 2018 at 02:33:28PM +0800, Zhong Li wrote: > > > > > > > > > > V2: remove the manual option since it is not supported now. > > > > > > > > This looks like a patch annotation that should not be part of the > > > > log message. > > > > > > MFE manual mode hasn't been implemented in libav right now, so the > > option shouldn't been exposed. I am not sure where the better place is to > > give such an annotation. > > > I am ok to send an updated patch to remove it if without any other > > changes required. Or anyone can help to modify the log message when > > merge this patch? > > > > Use the --annotate option to git-send-email and add the annotation below > > the "---". > > Thanks for your explanation and I understand it now. > But I prefer to keep it in log message because I want to explain why MSDK has > MFX_MF_MANUAL but we don't expose it. > And it also can remind developer if he want to add such an option, he need to > change current MFE implantation. > If the log message is not very clear, I can update it, but I don't think take > it as an annotation is a good idea since it will be lost when patch applied. > How do you think? As part of the log message it does not make any sense as currently written. The patch does not remove the manual option. If you feel it is valuable to add something like the text above into the log message, go right ahead. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH V2] lavc/qsvenc: add an option to disable MFE mode
On Tue, May 22, 2018 at 08:03:00AM +, Li, Zhong wrote: > > -Original Message- > > From: libav-devel [mailto:libav-devel-boun...@libav.org] On Behalf Of > > Diego Biurrun > > Sent: Monday, May 21, 2018 11:17 PM > > To: libav development <libav-devel@libav.org> > > Subject: Re: [libav-devel] [PATCH V2] lavc/qsvenc: add an option to disable > > MFE mode > > > > On Mon, May 21, 2018 at 02:33:28PM +0800, Zhong Li wrote: > > > > > > V2: remove the manual option since it is not supported now. > > > > This looks like a patch annotation that should not be part of the log > > message. > > MFE manual mode hasn't been implemented in libav right now, so the option > shouldn't been exposed. I am not sure where the better place is to give such > an annotation. > I am ok to send an updated patch to remove it if without any other changes > required. Or anyone can help to modify the log message when merge this patch? Use the --annotate option to git-send-email and add the annotation below the "---". Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH V2] lavc/qsvenc: add an option to disable MFE mode
On Mon, May 21, 2018 at 02:33:28PM +0800, Zhong Li wrote: > > V2: remove the manual option since it is not supported now. This looks like a patch annotation that should not be part of the log message. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] tls_mbedtls: Use non-deprecated header file
/usr/include/mbedtls/net.h:29:2: warning: #warning "Deprecated header file: Superseded by mbedtls/net_sockets.h" [-Wcpp] --- libavformat/tls_mbedtls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/tls_mbedtls.c b/libavformat/tls_mbedtls.c index 5e01af8162..6eba090402 100644 --- a/libavformat/tls_mbedtls.c +++ b/libavformat/tls_mbedtls.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] configure: Rename require_header() --> require_headers()
This renaming was overlooked in the previous check_header() rename. --- Gosh, I had this in my branch ready for squashing and then forgot to actually squash it before sending the check_header() rename .. m( configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 848fe4881f..f5e7f1578c 100755 --- a/configure +++ b/configure @@ -1184,8 +1184,8 @@ require_cc(){ check_cc "$@" || die "ERROR: $name failed" } -require_header(){ -log require_header "$@" +require_headers(){ +log require_headers "$@" headers="$1" check_headers "$@" || die "ERROR: $headers not found" } -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] libavformat: Add mbedTLS based TLS support
On Tue, Apr 24, 2018 at 10:00:00AM +0200, Luca Barbato wrote: > --- a/Changelog > +++ b/Changelog > @@ -24,6 +24,7 @@ version : > - Haivision SRT protocol via libsrt > - Dropped support for building for Windows XP. The minimum supported Windows >version is Windows Vista. > +- support mbedTLS based TLS mbedTLS-based > --- a/configure > +++ b/configure > @@ -2507,7 +2509,7 @@ xcbgrab_indev_suggest="libxcb_shm libxcb_xfixes" > > # protocols > ffrtmpcrypt_protocol_conflict="librtmp_protocol" > -ffrtmpcrypt_protocol_deps_any="gmp openssl" > +ffrtmpcrypt_protocol_deps_any="gmp openssl mbedtls" order > @@ -2547,7 +2549,7 @@ sctp_protocol_deps="struct_sctp_event_subscribe" > tcp_protocol_select="network" > -tls_protocol_deps_any="gnutls openssl" > +tls_protocol_deps_any="gnutls openssl mbedtls" same > --- a/libavformat/rtmpdh.c > +++ b/libavformat/rtmpdh.c > @@ -38,6 +38,11 @@ > > +#if CONFIG_MBEDTLS > +#include > +#include > +#endif For the other external crypto libs these #includes are in rtmpdh.h. > --- /dev/null > +++ b/libavformat/tls_mbedtls.c > @@ -0,0 +1,351 @@ > + * This file is part of FFmpeg. Nah. > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "avformat.h" > +#include "internal.h" > +#include "url.h" > +#include "tls.h" > +#include "libavutil/parseutils.h" Move the libavutil #include into canonical order. > +static int mbedtls_recv(void *ctx, unsigned char *buf, size_t len) > +{ > +URLContext *h = (URLContext*) ctx; pointless void* cast > +static void handle_handshake_error(URLContext *h, int ret) > +{ > +switch (ret) { > +case MBEDTLS_ERR_SSL_NO_USABLE_CIPHERSUITE: > +av_log(h, AV_LOG_ERROR, "None of the common ciphersuites is usable. > Was the local certificate correctly set?\n"); set correctly > +break; > +case MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE: > +av_log(h, AV_LOG_ERROR, "A fatal alert message was received from the > peer, has the peer a correct certificate?\n"); does the peer have a correct certificate > +break; > +case MBEDTLS_ERR_SSL_CA_CHAIN_REQUIRED: > +av_log(h, AV_LOG_ERROR, "No CA chain is set, but required to > operate. Was the CA correctly set?\n"); set correctly > +// set I/O functions to use FFmpeg internal code for transport layer libavformat-internal > +static int handle_tls_error(URLContext *h, const char* func_name, int ret) *func_name > +static const AVOption options[] = { > +TLS_COMMON_OPTIONS(TLSContext, tls_shared), \ > +{"key_password", "Password for the private key file", > OFFSET(priv_key_pw), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \ space after { > +const URLProtocol ff_tls_protocol = { > +.name = "tls", > +.url_open2 = tls_open, > +.url_read = tls_read, > +.url_write = tls_write, > +.url_close = tls_close, > +.url_get_file_handle = tls_get_file_handle, > +.priv_data_size = sizeof(TLSContext), > +.flags = URL_PROTOCOL_FLAG_NETWORK, > +.priv_data_class = _class, > +}; nit: align Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] the big configure cleanup (act VIII)
On Tue, Apr 17, 2018 at 10:16:26AM +0200, Diego Biurrun wrote: > Today comes the day of the big shuffle. After some preliminaries that > add consistency and (thus) simplify internal API I move the helper > functions around into a sensible order to simplify finding them and > make more sense in general. Functions are grouped by their category, > i.e. test_foo/check_foo/require_foo, and placed in toolchain order > within that category. All patches OKed by James on IRC. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 04/12] configure: Group toolchain parameter mangling functions together
--- configure | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/configure b/configure index fca311ae59..06e8716c95 100755 --- a/configure +++ b/configure @@ -769,12 +769,32 @@ test_cmd(){ "$@" >> $logfile 2>&1 } +cc_e(){ +eval printf '%s\\n' $CC_E +} + cc_o(){ eval printf '%s\\n' $CC_O } -cc_e(){ -eval printf '%s\\n' $CC_E +as_o(){ +eval printf '%s\\n' $AS_O +} + +x86asm_o(){ +eval printf '%s\\n' $X86ASM_O +} + +ld_o(){ +eval printf '%s\\n' $LD_O +} + +hostcc_e(){ +eval printf '%s\\n' $HOSTCC_E +} + +hostcc_o(){ +eval printf '%s\\n' $HOSTCC_O } test_cc(){ @@ -798,10 +818,6 @@ test_cpp(){ test_cmd $cc $CPPFLAGS $CFLAGS "$@" $(cc_e $TMPO) $TMPC } -as_o(){ -eval printf '%s\\n' $AS_O -} - test_as(){ log test_as "$@" cat > $TMPS @@ -809,10 +825,6 @@ test_as(){ test_cmd $as $CPPFLAGS $ASFLAGS "$@" $AS_C $(as_o $TMPO) $TMPS } -x86asm_o(){ -eval printf '%s\\n' $X86ASM_O -} - test_x86asm(){ log test_x86asm "$@" echo "$1" > $TMPASM @@ -865,10 +877,6 @@ check_x86asm(){ test_x86asm "$@" && enable $name } -ld_o(){ -eval printf '%s\\n' $LD_O -} - test_ld(){ log test_ld "$@" flags=$(filter_out '-l*' "$@") @@ -1193,14 +1201,6 @@ require_pkg_config(){ check_pkg_config "$@" || die "ERROR: $pkg_version not found" } -hostcc_e(){ -eval printf '%s\\n' $HOSTCC_E -} - -hostcc_o(){ -eval printf '%s\\n' $HOSTCC_O -} - test_host_cc(){ log test_host_cc "$@" cat > $TMPC -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 02/12] configure: Make require_cc() and require_cpp_condition() functions consistent
Their API and implementation is different from other require_foo() functions, which violates the rule of least astonishment. --- configure | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/configure b/configure index a6dc2efc52..4610321bb2 100755 --- a/configure +++ b/configure @@ -1172,8 +1172,7 @@ require(){ require_cc(){ log require_cc "$@" name="$1" -shift -test_code cc "$@" || die "ERROR: $name failed" +check_cc "$@" || die "ERROR: $name failed" } require_header(){ @@ -1185,7 +1184,7 @@ require_header(){ require_cpp_condition(){ log require_cpp_condition "$@" condition="$2" -test_cpp_condition "$@" || die "ERROR: $condition not satisfied" +check_cpp_condition "$@" || die "ERROR: $condition not satisfied" } require_pkg_config(){ @@ -4648,7 +4647,7 @@ for func in $MATH_FUNCS; do done # these are off by default, so fail if requested and not available -enabled amf && require_cpp_condition AMF/core/Version.h "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x0001000400040001" +enabled amf && require_cpp_condition amf AMF/core/Version.h "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x0001000400040001" enabled avisynth && require_header avisynth/avisynth_c.h enabled avxsynth && require_header avxsynth/avxsynth_c.h enabled cuda && require cuda cuda.h cuInit -lcuda @@ -4704,10 +4703,10 @@ enabled libvpx&& require_pkg_config libvpx "vpx >= 1.3.0" vpx/vpx_co enabled libwavpack&& require libwavpack wavpack/wavpack.h WavpackOpenFileOutput -lwavpack enabled libwebp && require_pkg_config libwebp libwebp webp/encode.h WebPGetEncoderVersion enabled libx264 && require_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode && - require_cpp_condition x264.h "X264_BUILD >= 118" && + require_cpp_condition libx264 x264.h "X264_BUILD >= 118" && check_cpp_condition libx262 x264.h "X264_MPEG2" enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get && - require_cpp_condition x265.h "X265_BUILD >= 57" + require_cpp_condition libx265 x265.h "X265_BUILD >= 57" enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode -lxavs enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore enabled mmal && { check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host || @@ -4717,7 +4716,7 @@ enabled mmal && { check_lib mmal interface/mmal/mmal.h mmal_port_co check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host; } || die "ERROR: mmal not found" && check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; } -enabled nvenc && require_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 6" +enabled nvenc && require_cpp_condition nvenc nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 6" enabled omx && require_header OMX_Core.h enabled omx_rpi && { check_header OMX_Core.h || { ! enabled cross_compile && add_cflags -isystem/opt/vc/include/IL && check_header OMX_Core.h ; } || -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] the big configure cleanup (act VIII)
Today comes the day of the big shuffle. After some preliminaries that add consistency and (thus) simplify internal API I move the helper functions around into a sensible order to simplify finding them and make more sense in general. Functions are grouped by their category, i.e. test_foo/check_foo/require_foo, and placed in toolchain order within that category. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 12/12] configure: Move test_cmd() into canonical order
--- configure | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index f6042937e1..95c4a2b7da 100755 --- a/configure +++ b/configure @@ -768,11 +768,6 @@ add_compat(){ map 'add_cppflags -D$v' "$@" } -test_cmd(){ -log "$@" -"$@" >> $logfile 2>&1 -} - cc_e(){ eval printf '%s\\n' $CC_E } @@ -801,6 +796,11 @@ hostcc_o(){ eval printf '%s\\n' $HOSTCC_O } +test_cmd(){ +log "$@" +"$@" >> $logfile 2>&1 +} + test_cpp(){ log test_cpp "$@" cat > $TMPC -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 10/12] configure: Move test_host_cpp()/test_host_cc() into canonical order
--- configure | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 48d2a8497b..45cfea889f 100755 --- a/configure +++ b/configure @@ -930,6 +930,20 @@ test_exec(){ test_ld "$@" && { enabled cross_compile || $TMPE >> $logfile 2>&1; } } +test_host_cpp(){ +log test_host_cpp "$@" +cat > $TMPC +log_file $TMPC +test_cmd $host_cc $host_cppflags $host_cflags "$@" $(hostcc_e $TMPO) $TMPC +} + +test_host_cc(){ +log test_host_cc "$@" +cat > $TMPC +log_file $TMPC +test_cmd $host_cc $host_cflags "$@" $HOSTCC_C $(hostcc_o $TMPO) $TMPC +} + test_host_cpp_condition(){ log test_host_cpp_condition "$@" header=$1 @@ -1186,20 +1200,6 @@ check_cc(){ test_code cc "$@" && enable "$name" } -test_host_cc(){ -log test_host_cc "$@" -cat > $TMPC -log_file $TMPC -test_cmd $host_cc $host_cflags "$@" $HOSTCC_C $(hostcc_o $TMPO) $TMPC -} - -test_host_cpp(){ -log test_host_cpp "$@" -cat > $TMPC -log_file $TMPC -test_cmd $host_cc $host_cppflags $host_cflags "$@" $(hostcc_e $TMPO) $TMPC -} - check_host_cppflags(){ log check_host_cppflags "$@" test_host_cpp "$@"
[libav-devel] [PATCH 03/12] configure: Rename check_header() --> check_headers()
The plural in the name clarifies the fact that the function can check for multiple headers at once. --- configure | 74 +++ 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/configure b/configure index 4610321bb2..fca311ae59 100755 --- a/configure +++ b/configure @@ -968,8 +968,8 @@ check_stripflags(){ test_stripflags "$@" && add_stripflags "$@" } -check_header(){ -log check_header "$@" +check_headers(){ +log check_headers "$@" headers=$1 shift disable_sanitized $headers @@ -1178,7 +1178,7 @@ require_cc(){ require_header(){ log require_header "$@" headers="$1" -check_header "$@" || die "ERROR: $headers not found" +check_headers "$@" || die "ERROR: $headers not found" } require_cpp_condition(){ @@ -3942,7 +3942,7 @@ case $target_os in enabled x86_64 && objformat="macho64" || objformat="macho32" enabled_any pic shared || { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; } -check_header dispatch/dispatch.h && +check_headers dispatch/dispatch.h && add_cppflags '-I\$(SRC_PATH)/compat/dispatch_semaphore' if test -n "$sysroot"; then is_in -isysroot $cc $CPPFLAGS $CFLAGS || check_cppflags -isysroot $sysroot @@ -4478,9 +4478,9 @@ if ! disabled network; then check_type "sys/types.h sys/socket.h" socklen_t # Prefer arpa/inet.h over winsock2 -if check_header arpa/inet.h ; then +if check_headers arpa/inet.h ; then check_func closesocket -elif check_header winsock2.h ; then +elif check_headers winsock2.h ; then check_func_headers winsock2.h closesocket -lws2 && network_extralibs="-lws2" || { check_func_headers winsock2.h closesocket -lws2_32 && @@ -4558,22 +4558,22 @@ check_func_headers windows.h SetConsoleTextAttribute check_func_headers windows.h Sleep check_func_headers windows.h VirtualAlloc -check_header direct.h -check_header dxgidebug.h -check_header dxva.h -check_header dxva2api.h -check_header io.h -check_header malloc.h -check_header poll.h -check_header sys/param.h -check_header sys/resource.h -check_header sys/select.h -check_header sys/time.h -check_header sys/un.h -check_header unistd.h -check_header valgrind/valgrind.h -check_header VideoDecodeAcceleration/VDADecoder.h -check_header windows.h +check_headers direct.h +check_headers dxgidebug.h +check_headers dxva.h +check_headers dxva2api.h +check_headers io.h +check_headers malloc.h +check_headers poll.h +check_headers sys/param.h +check_headers sys/resource.h +check_headers sys/select.h +check_headers sys/time.h +check_headers sys/un.h +check_headers unistd.h +check_headers valgrind/valgrind.h +check_headers VideoDecodeAcceleration/VDADecoder.h +check_headers windows.h # it seems there are versions of clang in some distros that try to use the # gcc headers, which explodes for stdatomic @@ -4648,11 +4648,11 @@ done # these are off by default, so fail if requested and not available enabled amf && require_cpp_condition amf AMF/core/Version.h "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x0001000400040001" -enabled avisynth && require_header avisynth/avisynth_c.h -enabled avxsynth && require_header avxsynth/avxsynth_c.h +enabled avisynth && require_headers avisynth/avisynth_c.h +enabled avxsynth && require_headers avxsynth/avxsynth_c.h enabled cuda && require cuda cuda.h cuInit -lcuda enabled cuvid && require cuvid cuviddec.h cuvidCreateDecoder -lnvcuvid -enabled frei0r&& require_header frei0r.h +enabled frei0r&& require_headers frei0r.h enabled gnutls&& require_pkg_config gnutls gnutls gnutls/gnutls.h gnutls_global_init && check_lib gmp gmp.h mpz_export -lgmp enabled libaom&& require_pkg_config libaom "aom >= 0.1.0" aom/aom_codec.h aom_codec_version @@ -4717,9 +4717,9 @@ enabled mmal && { check_lib mmal interface/mmal/mmal.h mmal_port_co die "ERROR: mmal not found" && check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; } enabled nvenc && require_cpp_condition nvenc nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 6" -enabled omx && require_header OMX_Core.h -enabled omx_rpi && { check_header OMX_Core.h || - { ! enabled cross_compile && add_cflags -isystem/opt/vc/include/IL && check_header OMX_Core.h ; } || +enabled omx && require_headers OMX_Core.h +enabled omx_rpi && { check_headers OMX_Core.h || + { ! enabled cross_compile && add_cflags -isystem/opt/vc/include/IL && check_headers OMX_Core.h ; } ||
[libav-devel] [PATCH 08/12] configure: Move print_3_columns() to a more suitable place
--- configure | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 1afb03b9ce..77601c8b02 100755 --- a/configure +++ b/configure @@ -400,6 +400,10 @@ EOF exit 1 } +print_3_columns() { +printf "%-25s %-25s %-25s\n" $(cat | tr ' ' '\n' | sort) +} + # Avoid locale weirdness, besides we really just want to translate ASCII. toupper(){ echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ @@ -2824,10 +2828,6 @@ die_unknown(){ exit 1 } -print_3_columns() { -printf "%-25s %-25s %-25s\n" $(cat | tr ' ' '\n' | sort) -} - show_list() { suffix=_$1 shift -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 05/12] configure: Move add_fooflags() helper functions into canonical order
--- configure | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 06e8716c95..0267ad02e2 100755 --- a/configure +++ b/configure @@ -718,14 +718,14 @@ add_cflags_headers(){ append CFLAGS_HEADERS $($cflags_filter "$@") } -add_asflags(){ -append ASFLAGS $($asflags_filter "$@") -} - add_objcflags(){ append OBJCFLAGS $($objcflags_filter "$@") } +add_asflags(){ +append ASFLAGS $($asflags_filter "$@") +} + add_ldflags(){ append LDFLAGS $($ldflags_filter "$@") } @@ -738,14 +738,14 @@ add_ldsoflags(){ append LDSOFLAGS $($ldflags_filter "$@") } -add_stripflags(){ -append STRIPFLAGS "$@" -} - add_extralibs(){ prepend extralibs $($ldflags_filter "$@") } +add_stripflags(){ +append STRIPFLAGS "$@" +} + add_host_cppflags(){ append host_cppflags "$@" } -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 09/12] configure: Move pushvar/popvar to a more sensible place
--- configure | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/configure b/configure index 77601c8b02..48d2a8497b 100755 --- a/configure +++ b/configure @@ -485,25 +485,6 @@ get_sanitized(){ eval echo \$$(sanitize_var_name "$1") } -pushvar(){ -for pvar in $*; do -eval level=\${${pvar}_level:=0} -eval ${pvar}_${level}="\$$pvar" -eval ${pvar}_level=$(($level+1)) -done -} - -popvar(){ -for pvar in $*; do -eval level=\${${pvar}_level:-0} -test $level = 0 && continue -eval level=$(($level-1)) -eval $pvar="\${${pvar}_${level}}" -eval ${pvar}_level=$level -eval unset ${pvar}_${level} -done -} - enable(){ set_all yes $* } @@ -532,6 +513,25 @@ disable_sanitized(){ done } +pushvar(){ +for pvar in $*; do +eval level=\${${pvar}_level:=0} +eval ${pvar}_${level}="\$$pvar" +eval ${pvar}_level=$(($level+1)) +done +} + +popvar(){ +for pvar in $*; do +eval level=\${${pvar}_level:-0} +test $level = 0 && continue +eval level=$(($level-1)) +eval $pvar="\${${pvar}_${level}}" +eval ${pvar}_level=$level +eval unset ${pvar}_${level} +done +} + do_enable_deep(){ for var; do enabled $var && continue -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 11/12] configure: Move print_include() to a more suitable place
--- configure | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 45cfea889f..f6042937e1 100755 --- a/configure +++ b/configure @@ -880,6 +880,13 @@ EOF test_cmd $strip $STRIPFLAGS "$@" $TMPO } +print_include(){ +hdr=$1 +test "${hdr%.h}" = "${hdr}" && +echo "#include $hdr"|| +echo "#include <$hdr>" +} + test_code(){ log test_code "$@" check=$1 @@ -1009,13 +1016,6 @@ check_ld(){ test_ld $@ && enable $name } -print_include(){ -hdr=$1 -test "${hdr%.h}" = "${hdr}" && -echo "#include $hdr"|| -echo "#include <$hdr>" -} - check_cppflags(){ log check_cppflags "$@" test_cpp "$@"
[libav-devel] [PATCH 07/12] configure: Move test_foo() and require_foo() helper functions into canonical order
--- configure | 190 +++--- 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/configure b/configure index 7c79d80b6e..1afb03b9ce 100755 --- a/configure +++ b/configure @@ -876,6 +876,69 @@ EOF test_cmd $strip $STRIPFLAGS "$@" $TMPO } +test_code(){ +log test_code "$@" +check=$1 +headers=$2 +code=$3 +shift 3 +{ +for hdr in $headers; do +print_include $hdr +done +echo "int main(void) { $code; return 0; }" +} | test_$check "$@" +} + +test_cpp_condition(){ +log test_cpp_condition "$@" +header=$1 +condition=$2 +shift 2 +test_cpp "$@" < +#if !($condition) +#error "unsatisfied condition: $condition" +#endif +EOF +} + +test_pkg_config(){ +log test_pkg_config "$@" +name="$1" +pkg_version="$2" +pkg="${2%% *}" +headers="$3" +funcs="$4" +shift 4 +disable $name +test_cmd $pkg_config --exists --print-errors $pkg_version || return +pkg_cflags=$($pkg_config --cflags $pkg_config_flags $pkg) +pkg_libs=$($pkg_config --libs $pkg_config_flags $pkg) +check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" && +enable $name && +set_sanitized "${name}_cflags"$pkg_cflags && +set_sanitized "${name}_extralibs" $pkg_libs +} + +test_exec(){ +log test_exec "$@" +test_ld "$@" && { enabled cross_compile || $TMPE >> $logfile 2>&1; } +} + +test_host_cpp_condition(){ +log test_host_cpp_condition "$@" +header=$1 +condition=$2 +shift 2 +test_host_cpp "$@" < +#if !($condition) +#error "unsatisfied condition: $condition" +#endif +EOF +} + check_cmd(){ log check_cmd "$@" cmd=$1 @@ -935,20 +998,6 @@ print_include(){ echo "#include <$hdr>" } -test_code(){ -log test_code "$@" -check=$1 -headers=$2 -code=$3 -shift 3 -{ -for hdr in $headers; do -print_include $hdr -done -echo "int main(void) { $code; return 0; }" -} | test_$check "$@" -} - check_cppflags(){ log check_cppflags "$@" test_cpp "$@" < -#if !($condition) -#error "unsatisfied condition: $condition" -#endif -EOF -} - check_cpp_condition(){ log check_cpp_condition "$@" name=$1 @@ -1062,24 +1098,6 @@ check_lib(){ enable $name && eval ${name}_extralibs="\$@" } -test_pkg_config(){ -log test_pkg_config "$@" -name="$1" -pkg_version="$2" -pkg="${2%% *}" -headers="$3" -funcs="$4" -shift 4 -disable $name -test_cmd $pkg_config --exists --print-errors $pkg_version || return -pkg_cflags=$($pkg_config --cflags $pkg_config_flags $pkg) -pkg_libs=$($pkg_config --libs $pkg_config_flags $pkg) -check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" && -enable $name && -set_sanitized "${name}_cflags"$pkg_cflags && -set_sanitized "${name}_extralibs" $pkg_libs -} - check_pkg_config(){ log check_pkg_config "$@" name="$1" @@ -1087,11 +1105,6 @@ check_pkg_config(){ eval add_cflags \$${name}_cflags } -test_exec(){ -log test_exec "$@" -test_ld "$@" && { enabled cross_compile || $TMPE >> $logfile 2>&1; } -} - check_exec_crash(){ log check_exec_crash "$@" code=$(cat) @@ -1169,38 +1182,6 @@ check_cc(){ test_code cc "$@" && enable "$name" } -require(){ -log require "$@" -name_version="$1" -name="${1%% *}" -shift -check_lib $name "$@" || die "ERROR: $name_version not found" -} - -require_cc(){ -log require_cc "$@" -name="$1" -check_cc "$@" || die "ERROR: $name failed" -} - -require_header(){ -log require_header "$@" -headers="$1" -check_headers "$@" || die "ERROR: $headers not found" -} - -require_cpp_condition(){ -log require_cpp_condition "$@" -condition="$2" -check_cpp_condition "$@" || die "ERROR: $condition not satisfied" -} - -require_pkg_config(){ -log require_pkg_config "$@" -pkg_version="$2" -check_pkg_config "$@" || die "ERROR: $pkg_version not found" -} - test_host_cc(){ log test_host_cc "$@" cat > $TMPC @@ -1230,19 +1211,6 @@ int x; EOF } -test_host_cpp_condition(){ -log test_host_cpp_condition "$@" -header=$1 -condition=$2 -shift 2 -test_host_cpp "$@" < -#if !($condition) -#error "unsatisfied condition: $condition" -#endif -EOF -} - check_host_cpp_condition(){ log check_host_cpp_condition "$@" name=$1 @@ -1251,6 +1219,38 @@ check_host_cpp_condition(){ test_host_cpp_condition "$@" && enable $name } +require(){ +log require "$@" +name_version="$1" +name="${1%% *}" +shift +check_lib $name "$@" || die "ERROR: $name_version not found" +} + +require_cc(){ +log require_cc "$@" +name="$1" +check_cc "$@" || die "ERROR: $name failed" +} + +require_header(){ +log require_header "$@" +headers="$1" +check_headers "$@" || die "ERROR:
[libav-devel] [PATCH 01/12] build: Group external library protocols separately
--- configure| 16 +--- libavformat/Makefile | 6 +++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/configure b/configure index 3c7b6a0981..a6dc2efc52 100755 --- a/configure +++ b/configure @@ -2519,15 +2519,8 @@ httpproxy_protocol_suggest="zlib" https_protocol_select="tls_protocol" https_protocol_suggest="zlib" icecast_protocol_select="http_protocol" -librtmp_protocol_deps="librtmp" -librtmpe_protocol_deps="librtmp" -librtmps_protocol_deps="librtmp" -librtmpt_protocol_deps="librtmp" -librtmpte_protocol_deps="librtmp" mmsh_protocol_select="http_protocol" mmst_protocol_select="network" -libsrt_protocol_deps="libsrt" -libsrt_protocol_select="network" rtmp_protocol_conflict="librtmp_protocol" rtmp_protocol_select="tcp_protocol" rtmp_protocol_suggest="zlib" @@ -2553,6 +2546,15 @@ udp_protocol_select="network" unix_protocol_deps="sys_un_h" unix_protocol_select="network" +# external library protocols +librtmp_protocol_deps="librtmp" +librtmpe_protocol_deps="librtmp" +librtmps_protocol_deps="librtmp" +librtmpt_protocol_deps="librtmp" +librtmpte_protocol_deps="librtmp" +libsrt_protocol_deps="libsrt" +libsrt_protocol_select="network" + # filters asyncts_filter_deps="avresample" blackframe_filter_deps="gpl" diff --git a/libavformat/Makefile b/libavformat/Makefile index 96085d20c6..4f1e9bae85 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -377,9 +377,8 @@ OBJS-$(CONFIG_YOP_DEMUXER) += yop.o OBJS-$(CONFIG_YUV4MPEGPIPE_DEMUXER) += yuv4mpegdec.o OBJS-$(CONFIG_YUV4MPEGPIPE_MUXER)+= yuv4mpegenc.o -# external libraries +# external library muxers/demuxers OBJS-$(CONFIG_AVISYNTH_DEMUXER) += avisynth.o -OBJS-$(CONFIG_LIBRTMP) += librtmp.o # protocols I/O OBJS-$(CONFIG_APPLEHTTP_PROTOCOL)+= hlsproto.o @@ -414,7 +413,8 @@ OBJS-$(CONFIG_TLS_PROTOCOL) += tls.o $(TLS-OBJS-yes) OBJS-$(CONFIG_UDP_PROTOCOL) += udp.o OBJS-$(CONFIG_UNIX_PROTOCOL) += unix.o -# external libraries +# external library protocols +OBJS-$(CONFIG_LIBRTMP) += librtmp.o OBJS-$(CONFIG_LIBSRT_PROTOCOL) += libsrt.o SKIPHEADERS-$(CONFIG_FFRTMPCRYPT_PROTOCOL) += rtmpdh.h -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 06/12] configure: Move test_foo() helper functions into canonical order
--- configure | 100 +++--- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/configure b/configure index 0267ad02e2..7c79d80b6e 100755 --- a/configure +++ b/configure @@ -797,6 +797,13 @@ hostcc_o(){ eval printf '%s\\n' $HOSTCC_O } +test_cpp(){ +log test_cpp "$@" +cat > $TMPC +log_file $TMPC +test_cmd $cc $CPPFLAGS $CFLAGS "$@" $(cc_e $TMPO) $TMPC +} + test_cc(){ log test_cc "$@" cat > $TMPC @@ -811,13 +818,6 @@ test_objcc(){ test_cmd $objcc $CPPFLAGS $CFLAGS $OBJCFLAGS "$@" $OBJCC_C $(cc_o $TMPO) $TMPC } -test_cpp(){ -log test_cpp "$@" -cat > $TMPC -log_file $TMPC -test_cmd $cc $CPPFLAGS $CFLAGS "$@" $(cc_e $TMPO) $TMPC -} - test_as(){ log test_as "$@" cat > $TMPS @@ -833,6 +833,49 @@ test_x86asm(){ test_cmd $x86asmexe $X86ASMFLAGS "$@" $(x86asm_o $TMPO) $TMPASM } +test_ld(){ +log test_ld "$@" +flags=$(filter_out '-l*' "$@") +libs=$(filter '-l*' "$@") +test_cc $($cflags_filter $flags) || return +flags=$($ldflags_filter $flags) +libs=$($ldflags_filter $libs) +test_cmd $ld $LDFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs +} + +test_cflags(){ +log test_cflags "$@" +set -- $($cflags_filter "$@") +test_cc "$@"
Re: [libav-devel] [PATCH] random_seed: use bcrypt instead of the old wincrypt API
On Mon, Apr 16, 2018 at 05:50:04PM +0300, Martin Storsjö wrote: > From: Steve Lhomme> > Remove the wincrypt API calls since we don't support XP anymore and > bcrypt is available since Vista, even on Windows Store builds. > --- > Now with avutil_extralibs sorted alphabetically, and James' extended > configure check included. > > --- a/configure > +++ b/configure > @@ -4579,9 +4579,10 @@ check_header windows.h > > +check_lib bcrypt "windows.h bcrypt.h" BCryptGenRandom -lbcrypt && > +check_cpp_condition bcrypt bcrypt.h "defined BCRYPT_RNG_ALGORITHM" This is a workaround for an old, already-obsolete version of mingw64. Before this shows up in a release it will be even more obsolete. IMO such workarounds are not worth the trouble; let the breakage occur where the actual bugs are and do the fixes at the root. I consider that the saner longterm strategy. Your call; push whichever version you prefer. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] random_seed: use bcrypt instead of the old wincrypt API
On Sun, Apr 15, 2018 at 11:17:40PM +0300, Martin Storsjö wrote: > --- a/configure > +++ b/configure > @@ -2610,7 +2610,7 @@ avdevice_extralibs="libm_extralibs" > -avutil_extralibs="clock_gettime_extralibs cuda_extralibs cuvid_extralibs > d3d11va_extralibs libm_extralibs libmfx_extralibs nanosleep_extralibs > pthreads_extralibs user32_extralibs vaapi_extralibs vaapi_drm_extralibs > vaapi_x11_extralibs vdpau_x11_extralibs wincrypt_extralibs" > +avutil_extralibs="clock_gettime_extralibs cuda_extralibs cuvid_extralibs > d3d11va_extralibs libm_extralibs libmfx_extralibs nanosleep_extralibs > pthreads_extralibs user32_extralibs vaapi_extralibs vaapi_drm_extralibs > vaapi_x11_extralibs vdpau_x11_extralibs bcrypt_extralibs" This was previously sorted. OK Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] x86: Don't declare a non-static function as inline
On Sat, Apr 14, 2018 at 10:40:26PM +0300, Martin Storsjö wrote: > This fixes building with clang in msvc mode, which does support > gcc style inline assembly. > --- > libavcodec/x86/xvididct_sse2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) probably OK Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] x86: Don't declare a non-static function as inline
On Sat, Apr 14, 2018 at 01:38:30PM +0300, Martin Storsjö wrote: > Make the actual implementation static inline, but add a non-static > non-inline frontend for it. > > This fixes building with clang in msvc mode, which does support > gcc style inline assembly. > --- a/libavcodec/x86/xvididct_sse2.c > +++ b/libavcodec/x86/xvididct_sse2.c > @@ -342,7 +342,7 @@ DECLARE_ASM_CONST(16, int32_t, walkenIdctRounders)[] = { > > -inline void ff_xvid_idct_sse2(short *block) > +static inline void xvid_idct_sse2(short *block) > { > __asm__ volatile ( > "movq "MANGLE (m127) ", %%mm0 \n\t" > @@ -390,15 +390,20 @@ inline void ff_xvid_idct_sse2(short *block) > > +void ff_xvid_idct_sse2(short *block) > +{ > +xvid_idct_sse2(block); > +} Why not simply drop the inline and be done with it? I notice that the MMX version of this does not have the inline keyword. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] lavc/amfenc: Retain a reference to D3D frames used as input during the encoding process
On Wed, Apr 11, 2018 at 07:31:19PM +0300, Alexander Kravchenko wrote: > > > > Your mailer mangled the patch, could you please resend it attached? > > It would be nice if you recommend some good simple mailer or to do I use git-send-email, works fine here. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] lavc/amfenc: Retain a reference to D3D frames used as input during the encoding process
On Wed, Apr 11, 2018 at 06:02:32PM +0300, Alexander Kravchenko wrote: > This fixes frame corruption issue when decoder started reusing frames while > they are still in use of encoding process > > Issue with frame corruption was reproduced using: > avconv.exe -y -hwaccel d3d11va -hwaccel_output_format d3d11 -i input.h264 > -an -c:v h264_amf output.mkv > > it is recommended to use -extra_hw_frames 16 option in case if hw frames > number in pool is not enough > > --- > libavcodec/amfenc.c | 95 > - > libavcodec/amfenc.h | 3 ++ > 2 files changed, 97 insertions(+), 1 deletion(-) Your mailer mangled the patch, could you please resend it attached? Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 2/2] Drop Windows XP support remnants
--- libavcodec/dxva2_h264.c | 6 +- libavcodec/dxva2_hevc.c | 6 +- libavcodec/dxva2_mpeg2.c | 7 ++- libavcodec/dxva2_vc1.c| 6 +- libavutil/hwcontext_d3d11va.c | 9 + libavutil/hwcontext_dxva2.c | 4 6 files changed, 6 insertions(+), 32 deletions(-) diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c index 50e7863bf2..790e4a214b 100644 --- a/libavcodec/dxva2_h264.c +++ b/libavcodec/dxva2_h264.c @@ -20,16 +20,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "dxva2_internal.h" #include "h264dec.h" #include "h264data.h" #include "h264_ps.h" #include "mpegutils.h" -// The headers above may include w32threads.h, which uses the original -// _WIN32_WINNT define, while dxva2_internal.h redefines it to target a -// potentially newer version. -#include "dxva2_internal.h" - struct dxva2_picture_context { DXVA_PicParams_H264 pp; DXVA_Qmatrix_H264 qm; diff --git a/libavcodec/dxva2_hevc.c b/libavcodec/dxva2_hevc.c index 02d3b9b152..d2d80802a2 100644 --- a/libavcodec/dxva2_hevc.c +++ b/libavcodec/dxva2_hevc.c @@ -22,14 +22,10 @@ #include "libavutil/avassert.h" +#include "dxva2_internal.h" #include "hevc_data.h" #include "hevcdec.h" -// The headers above may include w32threads.h, which uses the original -// _WIN32_WINNT define, while dxva2_internal.h redefines it to target a -// potentially newer version. -#include "dxva2_internal.h" - #define MAX_SLICES 256 struct hevc_dxva2_picture_context { diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c index 6e5dff308f..5cc8128100 100644 --- a/libavcodec/dxva2_mpeg2.c +++ b/libavcodec/dxva2_mpeg2.c @@ -21,13 +21,10 @@ */ #include "libavutil/log.h" -#include "mpegutils.h" -#include "mpegvideo.h" -// The headers above may include w32threads.h, which uses the original -// _WIN32_WINNT define, while dxva2_internal.h redefines it to target a -// potentially newer version. #include "dxva2_internal.h" +#include "mpegutils.h" +#include "mpegvideo.h" #define MAX_SLICES 1024 struct dxva2_picture_context { diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c index 247ea47825..fc09f88f05 100644 --- a/libavcodec/dxva2_vc1.c +++ b/libavcodec/dxva2_vc1.c @@ -20,15 +20,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "dxva2_internal.h" #include "mpegutils.h" #include "vc1.h" #include "vc1data.h" -// The headers above may include w32threads.h, which uses the original -// _WIN32_WINNT define, while dxva2_internal.h redefines it to target a -// potentially newer version. -#include "dxva2_internal.h" - struct dxva2_picture_context { DXVA_PictureParameters pp; DXVA_SliceInfo si; diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c index 0a8cc5bc21..6488fc2203 100644 --- a/libavutil/hwcontext_d3d11va.c +++ b/libavutil/hwcontext_d3d11va.c @@ -20,14 +20,6 @@ #include -// Include thread.h before redefining _WIN32_WINNT, to get -// the right implementation for AVOnce -#include "thread.h" - -#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600 -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0600 -#endif #define COBJMACROS #include @@ -46,6 +38,7 @@ #include "imgutils.h" #include "pixdesc.h" #include "pixfmt.h" +#include "thread.h" typedef HRESULT(WINAPI *PFN_CREATE_DXGI_FACTORY)(REFIID riid, void **ppFactory); diff --git a/libavutil/hwcontext_dxva2.c b/libavutil/hwcontext_dxva2.c index d1b19ab237..bf9a3a9c11 100644 --- a/libavutil/hwcontext_dxva2.c +++ b/libavutil/hwcontext_dxva2.c @@ -18,10 +18,6 @@ #include -#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600 -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0600 -#endif #define DXVA2API_USE_BITFIELDS #define COBJMACROS -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/2] w32pthreads: always use Vista+ API, drop XP support
From: wm4 <nfx...@googlemail.com> This removes the XP compatibility code, and switches entirely to SRW locks, which are available starting at Windows Vista. This removes CRITICAL_SECTION use, which allows us to add PTHREAD_MUTEX_INITIALIZER, which will be useful later. Windows XP is hereby not a supported build target anymore. Signed-off-by: Diego Biurrun <di...@biurrun.de> --- Changes to original patch: - proper w32threads dependencies - added missing Cygwin flags Changelog | 2 + compat/w32pthreads.h | 269 ++--- configure | 19 ++-- libavcodec/pthread_frame.c | 4 - libavcodec/pthread_slice.c | 4 - libavfilter/pthread.c | 4 - 6 files changed, 23 insertions(+), 279 deletions(-) diff --git a/Changelog b/Changelog index 53562a1aa0..35b6c066a7 100644 --- a/Changelog +++ b/Changelog @@ -22,6 +22,8 @@ version : - Intel QSV-accelerated overlay filter - AV1 Support through libaom - Haivision SRT protocol via libsrt +- Dropped support for building for Windows XP. The minimum supported Windows + version is Windows Vista. version 12: diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h index f38f767d8f..c5699830e2 100644 --- a/compat/w32pthreads.h +++ b/compat/w32pthreads.h @@ -39,11 +39,6 @@ #include #include -#if _WIN32_WINNT < 0x0600 && defined(__MINGW32__) -#undef MemoryBarrier -#define MemoryBarrier __sync_synchronize -#endif - #include "libavutil/attributes.h" #include "libavutil/internal.h" #include "libavutil/mem.h" @@ -55,24 +50,15 @@ typedef struct pthread_t { void *ret; } pthread_t; -/* the conditional variable api for windows 6.0+ uses critical sections and - * not mutexes */ -typedef CRITICAL_SECTION pthread_mutex_t; - -/* This is the CONDITION_VARIABLE typedef for using Windows' native - * conditional variables on kernels 6.0+. */ -#if HAVE_CONDITION_VARIABLE_PTR +/* use lightweight mutex/condition variable API for Windows Vista and later */ +typedef SRWLOCK pthread_mutex_t; typedef CONDITION_VARIABLE pthread_cond_t; -#else -typedef struct pthread_cond_t { -void *Ptr; -} pthread_cond_t; -#endif -#if _WIN32_WINNT >= 0x0600 +#define PTHREAD_MUTEX_INITIALIZER SRWLOCK_INIT +#define PTHREAD_COND_INITIALIZER CONDITION_VARIABLE_INIT + #define InitializeCriticalSection(x) InitializeCriticalSectionEx(x, 0, 0) #define WaitForSingleObject(a, b) WaitForSingleObjectEx(a, b, FALSE) -#endif static av_unused unsigned __stdcall attribute_align_arg win32thread_worker(void *arg) { @@ -103,26 +89,25 @@ static av_unused void pthread_join(pthread_t thread, void **value_ptr) static inline int pthread_mutex_init(pthread_mutex_t *m, void* attr) { -InitializeCriticalSection(m); +InitializeSRWLock(m); return 0; } static inline int pthread_mutex_destroy(pthread_mutex_t *m) { -DeleteCriticalSection(m); +/* Unlocked SWR locks use no resources */ return 0; } static inline int pthread_mutex_lock(pthread_mutex_t *m) { -EnterCriticalSection(m); +AcquireSRWLockExclusive(m); return 0; } static inline int pthread_mutex_unlock(pthread_mutex_t *m) { -LeaveCriticalSection(m); +ReleaseSRWLockExclusive(m); return 0; } -#if _WIN32_WINNT >= 0x0600 typedef INIT_ONCE pthread_once_t; #define PTHREAD_ONCE_INIT INIT_ONCE_STATIC_INIT @@ -155,7 +140,7 @@ static inline void pthread_cond_broadcast(pthread_cond_t *cond) static inline int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) { -SleepConditionVariableCS(cond, mutex, INFINITE); +SleepConditionVariableSRW(cond, mutex, INFINITE, 0); return 0; } @@ -164,238 +149,4 @@ static inline void pthread_cond_signal(pthread_cond_t *cond) WakeConditionVariable(cond); } -#else // _WIN32_WINNT < 0x0600 - -/* atomic init state of dynamically loaded functions */ -static LONG w32thread_init_state = 0; -static av_unused void w32thread_init(void); - -/* for pre-Windows 6.0 platforms, define INIT_ONCE struct, - * compatible to the one used in the native API */ - -typedef union pthread_once_t { -void * Ptr;///< For the Windows 6.0+ native functions -LONG state;///< For the pre-Windows 6.0 compat code -} pthread_once_t; - -#define PTHREAD_ONCE_INIT {0} - -/* function pointers to init once API on windows 6.0+ kernels */ -static BOOL (WINAPI *initonce_begin)(pthread_once_t *lpInitOnce, DWORD dwFlags, BOOL *fPending, void **lpContext); -static BOOL (WINAPI *initonce_complete)(pthread_once_t *lpInitOnce, DWORD dwFlags, void *lpContext); - -/* pre-Windows 6.0 compat using a spin-lock */ -static inline void w32thread_once_fallback(LONG volatile *state, void (*init_routine)(void)) -{ -switch (InterlockedCompareExchange(state, 1, 0)) { -/* Initial run */ -case 0: -init_routine(); -InterlockedExchange(state, 2); -break; -
Re: [libav-devel] [PATCH] use bcrypt instead of the old wincrypt API
On Fri, Mar 30, 2018 at 04:58:29PM +0300, Martin Storsjö wrote: > On Fri, 30 Mar 2018, Diego Biurrun wrote: > > On Fri, Mar 30, 2018 at 12:38:05PM +0200, Steve Lhomme wrote: > > > Le 30/03/2018 à 10:46, Diego Biurrun a écrit : > > > > On Fri, Mar 30, 2018 at 09:36:05AM +0200, Steve Lhomme wrote: > > > > > --- a/configure > > > > > +++ b/configure > > > > > @@ -4581,6 +4582,7 @@ check_lib ole32"windows.h" > > > > > CoTaskMemFree-lole32 > > > > > check_lib shell32 "windows.h shellapi.h" CommandLineToArgvW > > > > > -lshell32 > > > > > check_lib wincrypt "windows.h wincrypt.h" CryptGenRandom > > > > > -ladvapi32 > > > > > check_lib psapi"windows.h psapi.h"GetProcessMemoryInfo > > > > > -lpsapi > > > > > +check_cpp_condition Vista+ windows.h "_WIN32_WINNT >= 0x0600" && > > > > > check_lib bcrypt "windows.h bcrypt.h" BCryptGenRandom -lbcrypt > > > > Do you really need to check the Vista condition? What about using bcrypt > > > > unconditionally if available? > > > > > > Yes, you need to use it only on builds that won't run on XP. Otherwise it > > > will fail to load the bcrypt.dll and the whole libavutil DLL (or whatever > > > its form) will fail to load. It would be possible to do it dynamically but > > > IMO it's overkill. It's not really a critical component. > > > > Is bcrypt available on XP? If no then the CPP condition check would seem > > unnecessary. You could just check for bcrypt and bcrypt being available > > would imply Vista. I think I'm missing something. > > > > > But with time if XP support is dropped this check can go and wincrypt > > > dropped entirely. > > > > Is it maybe time to consider dropping XP support? > > I wouldn't mind. Let's go ahead then. > See e.g. 9b121dfc32810250938021952aab4172a988cb56 in ffmpeg; dropping XP > support simplifies the w32pthreads wrapper and allows using better > synchronization primitives, that allow e.g. static initialization of > mutexes. Do we need to do more changes apart from importing that commit? Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] use bcrypt instead of the old wincrypt API
On Fri, Mar 30, 2018 at 10:43:27AM -0300, James Almer wrote: > On 3/30/2018 10:38 AM, Diego Biurrun wrote: > > On Fri, Mar 30, 2018 at 12:38:05PM +0200, Steve Lhomme wrote: > >> Le 30/03/2018 à 10:46, Diego Biurrun a écrit : > >>> On Fri, Mar 30, 2018 at 09:36:05AM +0200, Steve Lhomme wrote: > >>>> --- a/configure > >>>> +++ b/configure > >>>> @@ -4581,6 +4582,7 @@ check_lib ole32"windows.h" > >>>> CoTaskMemFree-lole32 > >>>> check_lib shell32 "windows.h shellapi.h" CommandLineToArgvW > >>>> -lshell32 > >>>> check_lib wincrypt "windows.h wincrypt.h" CryptGenRandom > >>>> -ladvapi32 > >>>> check_lib psapi"windows.h psapi.h"GetProcessMemoryInfo -lpsapi > >>>> +check_cpp_condition Vista+ windows.h "_WIN32_WINNT >= 0x0600" && > >>>> check_lib bcrypt "windows.h bcrypt.h" BCryptGenRandom -lbcrypt > > If you don't need to set any variable then just use test_cpp_condition() Yes, good point. > >>> Do you really need to check the Vista condition? What about using bcrypt > >>> unconditionally if available? > >> > >> Yes, you need to use it only on builds that won't run on XP. Otherwise it > >> will fail to load the bcrypt.dll and the whole libavutil DLL (or whatever > >> its form) will fail to load. It would be possible to do it dynamically but > >> IMO it's overkill. It's not really a critical component. > > > > Is bcrypt available on XP? If no then the CPP condition check would seem > > unnecessary. You could just check for bcrypt and bcrypt being available > > would imply Vista. I think I'm missing something. > > check_lib bcrypt "windows.h bcrypt.h" BCryptGenRandom -lbcrypt > > Seems to succeed even if targeting XP, at least on mingw-w64. Isn't that wrong then? Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] use bcrypt instead of the old wincrypt API
On Fri, Mar 30, 2018 at 12:38:05PM +0200, Steve Lhomme wrote: > Le 30/03/2018 à 10:46, Diego Biurrun a écrit : > > On Fri, Mar 30, 2018 at 09:36:05AM +0200, Steve Lhomme wrote: > > > --- a/configure > > > +++ b/configure > > > @@ -4581,6 +4582,7 @@ check_lib ole32"windows.h" > > > CoTaskMemFree-lole32 > > > check_lib shell32 "windows.h shellapi.h" CommandLineToArgvW -lshell32 > > > check_lib wincrypt "windows.h wincrypt.h" CryptGenRandom > > > -ladvapi32 > > > check_lib psapi"windows.h psapi.h"GetProcessMemoryInfo -lpsapi > > > +check_cpp_condition Vista+ windows.h "_WIN32_WINNT >= 0x0600" && > > > check_lib bcrypt "windows.h bcrypt.h" BCryptGenRandom -lbcrypt > > Do you really need to check the Vista condition? What about using bcrypt > > unconditionally if available? > > Yes, you need to use it only on builds that won't run on XP. Otherwise it > will fail to load the bcrypt.dll and the whole libavutil DLL (or whatever > its form) will fail to load. It would be possible to do it dynamically but > IMO it's overkill. It's not really a critical component. Is bcrypt available on XP? If no then the CPP condition check would seem unnecessary. You could just check for bcrypt and bcrypt being available would imply Vista. I think I'm missing something. > But with time if XP support is dropped this check can go and wincrypt > dropped entirely. Is it maybe time to consider dropping XP support? > > The variable name with an uppercase letter > > and a '+' is slightly odd. I'm not sure if it can cause problems but I > > cannot rule it out offhand either. > > It seems the same is only used in config.log. And the + didn't cause any > problem for me. I remain sceptical; "it worked for me" is usually not a good argument when considering edge cases ;) Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] use bcrypt instead of the old wincrypt API
On Fri, Mar 30, 2018 at 09:36:05AM +0200, Steve Lhomme wrote: > --- a/configure > +++ b/configure > @@ -1708,6 +1708,7 @@ SYSTEM_LIBRARIES=" > vaapi_x11 > vdpau_x11 > +bcrypt > wincrypt > " This should be ordered. > @@ -2611,7 +2612,7 @@ avdevice_extralibs="libm_extralibs" > avfilter_extralibs="pthreads_extralibs libm_extralibs" > avresample_extralibs="libm_extralibs" > -avutil_extralibs="clock_gettime_extralibs cuda_extralibs cuvid_extralibs > d3d11va_extralibs libm_extralibs libmfx_extralibs nanosleep_extralibs > pthreads_extralibs user32_extralibs vaapi_extralibs vaapi_drm_extralibs > vaapi_x11_extralibs vdpau_x11_extralibs wincrypt_extralibs" > +avutil_extralibs="clock_gettime_extralibs cuda_extralibs cuvid_extralibs > d3d11va_extralibs libm_extralibs libmfx_extralibs nanosleep_extralibs > pthreads_extralibs user32_extralibs vaapi_extralibs vaapi_drm_extralibs > vaapi_x11_extralibs vdpau_x11_extralibs bcrypt_extralibs wincrypt_extralibs" same > @@ -4581,6 +4582,7 @@ check_lib ole32"windows.h"CoTaskMemFree >-lole32 > check_lib shell32 "windows.h shellapi.h" CommandLineToArgvW -lshell32 > check_lib wincrypt "windows.h wincrypt.h" CryptGenRandom -ladvapi32 > check_lib psapi"windows.h psapi.h"GetProcessMemoryInfo -lpsapi > +check_cpp_condition Vista+ windows.h "_WIN32_WINNT >= 0x0600" && check_lib > bcrypt "windows.h bcrypt.h" BCryptGenRandom -lbcrypt Do you really need to check the Vista condition? What about using bcrypt unconditionally if available? The variable name with an uppercase letter and a '+' is slightly odd. I'm not sure if it can cause problems but I cannot rule it out offhand either. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] configure: Revert some incorrect uses of check_cc()
--- Thanks to James for pointing this out. configure | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 90fb6f07ca..a64f241560 100755 --- a/configure +++ b/configure @@ -4841,7 +4841,9 @@ check_disable_warning_headers -Wno-unused-variable check_objcflags -fobjc-arc && enable objc_arc -check_cc blocks_extension "" "void (^block)(void)" +test_cc
Re: [libav-devel] [PATCH] Add Haivision Open SRT protocol
On Mon, Mar 26, 2018 at 11:37:49AM -0400, Sven Dueking wrote: > protocol requires libsrt (https://github.com/Haivision/srt) to be > installed Luca and I pushed a cleaned-up version of this yesterday. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] lavf/qsvvpp: bypass vpp is not needed.
On Wed, Mar 28, 2018 at 05:40:07PM +0800, Zhong Li wrote: > It is benefit to performance for specific case. "i_F_ not needed" is what you were trying to say I guess. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] lavc/qsvdec: expose frame pic_type
On Wed, Mar 28, 2018 at 04:50:10PM +0800, Zhong Li wrote: > Currently pict_type are unset. > Add an extra param to fetch the picture type from qsv decoder > > v2: fix the compile error since AV_PICTURE_TYPE_NONE is not existed in libav. > v3: remove the key_frame setting because the judgement “key frame is equal > to IDR frame” only suitable for H264. These look like sensible patch annotations that you can add with --annotate when using git-send-email, but they should not be part of the log message. How you fixed compilation failures needs not be preserved for posterity ;) > --- a/libavcodec/qsv.c > +++ b/libavcodec/qsv.c > @@ -195,6 +195,30 @@ int ff_qsv_find_surface_idx(QSVFramesContext *ctx, > QSVFrame *frame) > > +enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type) > +{ > +enum AVPictureType type; > +switch (mfx_pic_type & 0x7) { > +case MFX_FRAMETYPE_I: Please indent switch and case at the same level. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/7] configure: Add check_x86asm() helper function to simplify some expressions
On Thu, Mar 22, 2018 at 11:00:52AM -0300, James Almer wrote: > On 3/20/2018 6:49 AM, Diego Biurrun wrote: > > --- a/configure > > +++ b/configure > > @@ -844,12 +852,12 @@ check_insn(){ > > > > +check_x86asm(){ > > +log check_x86asm "$@" > > +name=$1 > > +shift > > Maybe be explicit it should shift 1. No, I'd rather drop the '1', most places don't add the redundant '1' to the shift invocations. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Add Haivision Open SRT protocol
On Mon, Mar 26, 2018 at 10:16:06PM +0700, nablet developer wrote: > On 26-Mar-18 22:14, Diego Biurrun wrote: > > On Mon, Mar 26, 2018 at 11:37:49AM -0400, Sven Dueking wrote: > > > --- a/configure > > > +++ b/configure > > > @@ -4710,6 +4714,7 @@ enabled omx && require_header > > > OMX_Core.h > > > +enabled opensrt && require_pkg_config libsrt "srt >= 1.2.0" > > > srt/srt.h srt_socket > > Why do you call this thing opensrt when it calls itself libsrt? > > > names srt and libsrt were found confusing and misleading, because of > similar acronyms used for other multimedia related things which are > pretty well-known and wide-spread already (e.g. SRT subtitles or SRTP > protocol). as result, maintainers/reviewers asked to change name to > avoid confusion, and Haivision recommended to use "opensrt" naming in > order to distinguish from other similar acronyms. The problem is that Haivision does not use "opensrt" as name, they use "SRT/srt" and libsrt. Using a different name inside libav does not really help in reducing that potential for confusion. If Haivision recommends "opensrt", why don't they change the name of their library? Better yet, why don't they change the name of the protocol? Notice that what I gathered from the discussion was people complaining about the bad naming choice, not suggesting "opensrt" as the alternative. I have asked this before: what is your relationship to Haivision? Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Add Haivision Open SRT protocol
On Mon, Mar 26, 2018 at 11:37:49AM -0400, Sven Dueking wrote: > --- a/configure > +++ b/configure > @@ -4710,6 +4714,7 @@ enabled omx && require_header OMX_Core.h > +enabled opensrt && require_pkg_config libsrt "srt >= 1.2.0" > srt/srt.h srt_socket Why do you call this thing opensrt when it calls itself libsrt? Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 4/7] configure: Use indirection for -o assembler flag also for x86asm
On Tue, Mar 20, 2018 at 10:49:27AM +0100, Diego Biurrun wrote: > --- a/configure > +++ b/configure > @@ -808,12 +808,16 @@ test_as(){ > +x86asm_o(){ > +eval printf '%s\\n' $X86ASM_O > +} > + > test_x86asm(){ > log test_x86asm "$@" > echo "$1" > $TMPASM > log_file $TMPASM > shift 1 > -test_cmd $x86asmexe $X86ASMFLAGS "$@" -o $TMPO $TMPASM > +test_cmd $x86asmexe $X86ASMFLAGS "$@" $(x86asm_o $TMPO) $TMPASM > } OKed by James on IRC. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Add Haivision Open SRT protocol
On Thu, Mar 22, 2018 at 02:03:03PM +0100, wm4 wrote: > On Thu, 22 Mar 2018 13:17:16 +0100 > Diego Biurrun <di...@biurrun.de> wrote: > > > On Thu, Mar 22, 2018 at 12:34:29PM +0100, Sven Dueking wrote: > > > > On Wed, Mar 21, 2018 at 04:03:18PM +0100, Sven Dueking wrote: > > > > > > On Wed, Mar 21, 2018 at 03:00:37PM +0100, Luca Barbato wrote: > > > > > > > On 21/03/2018 11:46, Diego Biurrun wrote: > > > > > > > > What is it? libsrt or opensrt? > > > > > > > > > > > > > > You have an opensource implementation of the protocol SRT. > > > > > > > > > > > > > > I prefer to call it libsrt as configure option. > > > > > > > > > > > > > > > Where does the opensrt name come from? > > > > > > > > > > > > > > The protocol is srt (secure reliable transport), the support for > > > > > > > it uses an external opensource implementation, as mentioned in > > > > > > > many > > > > > > places. > > > > > > > > > > > > > > I edited opensrt to libsrt for the configuration option since it > > > > > > > fits the normal pattern better. Probably to be consistent > > > > renaming > > > > > > > all the other occurrences of opensrt to libsrt would be an > > > > option. > > > > > > > > > > > > I don't see the opensrt name appearing anywhere. Plain srt should > > > > be > > > > > > the name for an internal implementation, for external-library- > > > > backed > > > > > > ones a lib prefix to the name of the protocol is appropriate. > > > > > > > > > > Haivison calls the packet OpenSRT and I think that´s a good idea to > > > > > avoid any conflicts with SRT (subtitle). > > > > > > > > Umm, no? > > > > > > > > libav@libav-fate:/tmp$ git clone git://github.com/Haivision/srt Cloning > > > > into 'srt'... > > > > remote: Counting objects: 1565, done. > > > > remote: Compressing objects: 100% (34/34), done. > > > > remote: Total 1565 (delta 15), reused 16 (delta 8), pack-reused 1523 > > > > Receiving objects: 100% (1565/1565), 1.80 MiB | 1.44 MiB/s, done. > > > > Resolving deltas: 100% (1042/1042), done. > > > > libav@libav-fate:/tmp$ cd srt/ > > > > libav@libav-fate:/tmp/srt$ git grep -i "opensrt" > > > > libav@libav-fate:/tmp/srt$ git grep -i "open srt" > > > > libav@libav-fate:/tmp/srt$ > > > > > > > > The library calls itself libsrt, the namespace prefix for API functions > > > > it uses is "srt_". Following that naming scheme on our side makes > > > > sense, let's just drop the "open" from file names, protocol names, and > > > > function names. We do that for all other, similar, external libraries. > > > > > > We will change the name back to opensrt in all places. > > > > Thus completely breaking backwards compatibility and API? Then we should > > wait with this wrapper until that change in libsrt is done. > > > > Notice that protocols and (subtitle) demuxers live in different namespaces. > > There is no conflict between an "srt" protocol (should be "libsrt" in this > > case) and an "srt" demuxer. > > But it's hellish confusing. Even opensrt is confusing, though. Where exactly is the confusion? The file name(s)? Getting similar hits when doing git-grep? Some other thing? Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Add Haivision Open SRT protocol
On Thu, Mar 22, 2018 at 02:24:08PM +0100, Sven Dueking wrote: > > > On Thu, Mar 22, 2018 at 12:34:29PM +0100, Sven Dueking wrote: > > > > > On Wed, Mar 21, 2018 at 04:03:18PM +0100, Sven Dueking wrote: > > > > > > > On Wed, Mar 21, 2018 at 03:00:37PM +0100, Luca Barbato wrote: > > > > > > > > On 21/03/2018 11:46, Diego Biurrun wrote: > > > > > > > > > What is it? libsrt or opensrt? > > > > > > > > > > > > > > > > You have an opensource implementation of the protocol SRT. > > > > > > > > > > > > > > > > I prefer to call it libsrt as configure option. > > > > > > > > > > > > > > > > > Where does the opensrt name come from? > > > > > > > > > > > > > > > > The protocol is srt (secure reliable transport), the > > support > > > > > > > > for it uses an external opensource implementation, as > > > > > > > > mentioned in many > > > > > > > places. > > > > > > > > > > > > > > > > I edited opensrt to libsrt for the configuration option > > > > > > > > since it fits the normal pattern better. Probably to be > > > > > > > > consistent > > > > > renaming > > > > > > > > all the other occurrences of opensrt to libsrt would be an > > > > > option. > > > > > > > > > > > > > > I don't see the opensrt name appearing anywhere. Plain srt > > > > > > > should > > > > > be > > > > > > > the name for an internal implementation, for external- > > library- > > > > > backed > > > > > > > ones a lib prefix to the name of the protocol is appropriate. > > > > > > > > > > > > Haivison calls the packet OpenSRT and I think that´s a good > > idea > > > > > > to avoid any conflicts with SRT (subtitle). > > > > > > > > > > Umm, no? > > > > > > > > > > libav@libav-fate:/tmp$ git clone git://github.com/Haivision/srt > > > > > Cloning into 'srt'... > > > > > remote: Counting objects: 1565, done. > > > > > remote: Compressing objects: 100% (34/34), done. > > > > > remote: Total 1565 (delta 15), reused 16 (delta 8), pack-reused > > > > > 1523 Receiving objects: 100% (1565/1565), 1.80 MiB | 1.44 MiB/s, > > done. > > > > > Resolving deltas: 100% (1042/1042), done. > > > > > libav@libav-fate:/tmp$ cd srt/ > > > > > libav@libav-fate:/tmp/srt$ git grep -i "opensrt" > > > > > libav@libav-fate:/tmp/srt$ git grep -i "open srt" > > > > > libav@libav-fate:/tmp/srt$ > > > > > > > > > > The library calls itself libsrt, the namespace prefix for API > > > > > functions it uses is "srt_". Following that naming scheme on our > > > > > side makes sense, let's just drop the "open" from file names, > > > > > protocol names, and function names. We do that for all other, > > similar, external libraries. > > > > > > > > We will change the name back to opensrt in all places. > > > > > > Thus completely breaking backwards compatibility and API? Then we > > > should wait with this wrapper until that change in libsrt is done. > > > > > > Notice that protocols and (subtitle) demuxers live in different > > namespaces. > > > There is no conflict between an "srt" protocol (should be "libsrt" in > > > this > > > case) and an "srt" demuxer. > > > > But it's hellish confusing. Even opensrt is confusing, though. > > Any idea for a better name or shell we discuss this for the next days ? Let me first state what the general naming scheme is: external wrappers for "foo" get a "lib" prefix to "foo", e.g.: gsmdec.c: AVCodec ff_gsm_decoder = { .name = "gsm", libgsmdec.c: AVCodec ff_libgsm_decoder = { .name = "libgsm", So here it should be libsrt.c and ff_libsrt_protocol and .name="libsrt". Is there a problem with that naming scheme? To clarify another question I have: Do you work on the Haivision SRT implementation? Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Add Haivision Open SRT protocol
On Thu, Mar 22, 2018 at 02:03:03PM +0100, wm4 wrote: > On Thu, 22 Mar 2018 13:17:16 +0100 Diego Biurrun <di...@biurrun.de> wrote: > > On Thu, Mar 22, 2018 at 12:34:29PM +0100, Sven Dueking wrote: > > > > On Wed, Mar 21, 2018 at 04:03:18PM +0100, Sven Dueking wrote: > > > > > > On Wed, Mar 21, 2018 at 03:00:37PM +0100, Luca Barbato wrote: > > > > > > > On 21/03/2018 11:46, Diego Biurrun wrote: > > > > > > > > What is it? libsrt or opensrt? > > > > > > > > > > > > > > You have an opensource implementation of the protocol SRT. > > > > > > > > > > > > > > I prefer to call it libsrt as configure option. > > > > > > > > > > > > > > > Where does the opensrt name come from? > > > > > > > > > > > > > > The protocol is srt (secure reliable transport), the support for > > > > > > > it uses an external opensource implementation, as mentioned in > > > > > > > many > > > > > > places. > > > > > > > > > > > > > > I edited opensrt to libsrt for the configuration option since it > > > > > > > fits the normal pattern better. Probably to be consistent > > > > renaming > > > > > > > all the other occurrences of opensrt to libsrt would be an > > > > option. > > > > > > > > > > > > I don't see the opensrt name appearing anywhere. Plain srt should > > > > be > > > > > > the name for an internal implementation, for external-library- > > > > backed > > > > > > ones a lib prefix to the name of the protocol is appropriate. > > > > > > > > > > Haivison calls the packet OpenSRT and I think that´s a good idea to > > > > > avoid any conflicts with SRT (subtitle). > > > > > > > > Umm, no? > > > > > > > > libav@libav-fate:/tmp$ git clone git://github.com/Haivision/srt Cloning > > > > into 'srt'... > > > > remote: Counting objects: 1565, done. > > > > remote: Compressing objects: 100% (34/34), done. > > > > remote: Total 1565 (delta 15), reused 16 (delta 8), pack-reused 1523 > > > > Receiving objects: 100% (1565/1565), 1.80 MiB | 1.44 MiB/s, done. > > > > Resolving deltas: 100% (1042/1042), done. > > > > libav@libav-fate:/tmp$ cd srt/ > > > > libav@libav-fate:/tmp/srt$ git grep -i "opensrt" > > > > libav@libav-fate:/tmp/srt$ git grep -i "open srt" > > > > libav@libav-fate:/tmp/srt$ > > > > > > > > The library calls itself libsrt, the namespace prefix for API functions > > > > it uses is "srt_". Following that naming scheme on our side makes > > > > sense, let's just drop the "open" from file names, protocol names, and > > > > function names. We do that for all other, similar, external libraries. > > > > > > We will change the name back to opensrt in all places. > > > > Thus completely breaking backwards compatibility and API? Then we should > > wait with this wrapper until that change in libsrt is done. > > > > Notice that protocols and (subtitle) demuxers live in different namespaces. > > There is no conflict between an "srt" protocol (should be "libsrt" in this > > case) and an "srt" demuxer. > > But it's hellish confusing. Even opensrt is confusing, though. Do you see an alternative? It's not like I came up with the (sort of) duplicate name myself.. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Add Haivision Open SRT protocol
On Thu, Mar 22, 2018 at 12:34:29PM +0100, Sven Dueking wrote: > > On Wed, Mar 21, 2018 at 04:03:18PM +0100, Sven Dueking wrote: > > > > On Wed, Mar 21, 2018 at 03:00:37PM +0100, Luca Barbato wrote: > > > > > On 21/03/2018 11:46, Diego Biurrun wrote: > > > > > > What is it? libsrt or opensrt? > > > > > > > > > > You have an opensource implementation of the protocol SRT. > > > > > > > > > > I prefer to call it libsrt as configure option. > > > > > > > > > > > Where does the opensrt name come from? > > > > > > > > > > The protocol is srt (secure reliable transport), the support for > > > > > it uses an external opensource implementation, as mentioned in > > > > > many > > > > places. > > > > > > > > > > I edited opensrt to libsrt for the configuration option since it > > > > > fits the normal pattern better. Probably to be consistent > > renaming > > > > > all the other occurrences of opensrt to libsrt would be an > > option. > > > > > > > > I don't see the opensrt name appearing anywhere. Plain srt should > > be > > > > the name for an internal implementation, for external-library- > > backed > > > > ones a lib prefix to the name of the protocol is appropriate. > > > > > > Haivison calls the packet OpenSRT and I think that´s a good idea to > > > avoid any conflicts with SRT (subtitle). > > > > Umm, no? > > > > libav@libav-fate:/tmp$ git clone git://github.com/Haivision/srt Cloning > > into 'srt'... > > remote: Counting objects: 1565, done. > > remote: Compressing objects: 100% (34/34), done. > > remote: Total 1565 (delta 15), reused 16 (delta 8), pack-reused 1523 > > Receiving objects: 100% (1565/1565), 1.80 MiB | 1.44 MiB/s, done. > > Resolving deltas: 100% (1042/1042), done. > > libav@libav-fate:/tmp$ cd srt/ > > libav@libav-fate:/tmp/srt$ git grep -i "opensrt" > > libav@libav-fate:/tmp/srt$ git grep -i "open srt" > > libav@libav-fate:/tmp/srt$ > > > > The library calls itself libsrt, the namespace prefix for API functions > > it uses is "srt_". Following that naming scheme on our side makes > > sense, let's just drop the "open" from file names, protocol names, and > > function names. We do that for all other, similar, external libraries. > > We will change the name back to opensrt in all places. Thus completely breaking backwards compatibility and API? Then we should wait with this wrapper until that change in libsrt is done. Notice that protocols and (subtitle) demuxers live in different namespaces. There is no conflict between an "srt" protocol (should be "libsrt" in this case) and an "srt" demuxer. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Add Haivision Open SRT protocol
On Wed, Mar 21, 2018 at 04:03:18PM +0100, Sven Dueking wrote: > > On Wed, Mar 21, 2018 at 03:00:37PM +0100, Luca Barbato wrote: > > > On 21/03/2018 11:46, Diego Biurrun wrote: > > > > What is it? libsrt or opensrt? > > > > > > You have an opensource implementation of the protocol SRT. > > > > > > I prefer to call it libsrt as configure option. > > > > > > > Where does the opensrt name come from? > > > > > > The protocol is srt (secure reliable transport), the support for it > > > uses an external opensource implementation, as mentioned in many > > places. > > > > > > I edited opensrt to libsrt for the configuration option since it fits > > > the normal pattern better. Probably to be consistent renaming all the > > > other occurrences of opensrt to libsrt would be an option. > > > > I don't see the opensrt name appearing anywhere. Plain srt should be > > the name for an internal implementation, for external-library-backed > > ones a lib prefix to the name of the protocol is appropriate. > > Haivison calls the packet OpenSRT and I think that´s a good idea to > avoid any conflicts with SRT (subtitle). Umm, no? libav@libav-fate:/tmp$ git clone git://github.com/Haivision/srt Cloning into 'srt'... remote: Counting objects: 1565, done. remote: Compressing objects: 100% (34/34), done. remote: Total 1565 (delta 15), reused 16 (delta 8), pack-reused 1523 Receiving objects: 100% (1565/1565), 1.80 MiB | 1.44 MiB/s, done. Resolving deltas: 100% (1042/1042), done. libav@libav-fate:/tmp$ cd srt/ libav@libav-fate:/tmp/srt$ git grep -i "opensrt" libav@libav-fate:/tmp/srt$ git grep -i "open srt" libav@libav-fate:/tmp/srt$ The library calls itself libsrt, the namespace prefix for API functions it uses is "srt_". Following that naming scheme on our side makes sense, let's just drop the "open" from file names, protocol names, and function names. We do that for all other, similar, external libraries. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Add Haivision Open SRT protocol
On Wed, Mar 21, 2018 at 03:00:37PM +0100, Luca Barbato wrote: > On 21/03/2018 11:46, Diego Biurrun wrote: > > What is it? libsrt or opensrt? > > You have an opensource implementation of the protocol SRT. > > I prefer to call it libsrt as configure option. > > > Where does the opensrt name come from? > > The protocol is srt (secure reliable transport), the support for it uses an > external opensource implementation, as mentioned in many places. > > I edited opensrt to libsrt for the configuration option since it fits the > normal pattern better. Probably to be consistent renaming all the other > occurrences of opensrt to libsrt would be an option. I don't see the opensrt name appearing anywhere. Plain srt should be the name for an internal implementation, for external-library-backed ones a lib prefix to the name of the protocol is appropriate. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel