[FFmpeg-cvslog] examples/decode_filter_audio: Add loop for draining the filtergraph
ffmpeg | branch: master | Tobias Rapp | Wed Mar 27 11:40:49 2024 +0100| [55ce66606265013115ec309b3d1a4d26ef7c6046] | committer: Tobias Rapp examples/decode_filter_audio: Add loop for draining the filtergraph Depending on the filters used, the filtergraph may produce trailing data after feeding it the last input frame. Update the example to include the necessary loop for draining the filtergraph. Reviewed-by: Stefano Sabatini Signed-off-by: Tobias Rapp > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=55ce66606265013115ec309b3d1a4d26ef7c6046 --- doc/examples/decode_filter_audio.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/doc/examples/decode_filter_audio.c b/doc/examples/decode_filter_audio.c index 2046419819..196f0801c4 100644 --- a/doc/examples/decode_filter_audio.c +++ b/doc/examples/decode_filter_audio.c @@ -279,6 +279,25 @@ int main(int argc, char **argv) } av_packet_unref(packet); } +if (ret == AVERROR_EOF) { +/* signal EOF to the filtergraph */ +if (av_buffersrc_add_frame_flags(buffersrc_ctx, NULL, 0) < 0) { +av_log(NULL, AV_LOG_ERROR, "Error while closing the filtergraph\n"); +goto end; +} + +/* pull remaining frames from the filtergraph */ +while (1) { +ret = av_buffersink_get_frame(buffersink_ctx, filt_frame); +if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) +break; +if (ret < 0) +goto end; +print_frame(filt_frame); +av_frame_unref(filt_frame); +} +} + end: avfilter_graph_free(_graph); avcodec_free_context(_ctx); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] examples/decode_filter_video: Add loop for draining the filtergraph
ffmpeg | branch: master | Tobias Rapp | Wed Mar 27 11:44:45 2024 +0100| [02eb2fc577e926e9f927829f1d8c8cdb8f31cbbd] | committer: Tobias Rapp examples/decode_filter_video: Add loop for draining the filtergraph Depending on the filters used, the filtergraph may produce trailing data after feeding it the last input frame. Update the example to include the necessary loop for draining the filtergraph. Reviewed-by: Stefano Sabatini Signed-off-by: Tobias Rapp > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=02eb2fc577e926e9f927829f1d8c8cdb8f31cbbd --- doc/examples/decode_filter_video.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/doc/examples/decode_filter_video.c b/doc/examples/decode_filter_video.c index 454c19222f..a57e6dfd20 100644 --- a/doc/examples/decode_filter_video.c +++ b/doc/examples/decode_filter_video.c @@ -276,6 +276,25 @@ int main(int argc, char **argv) } av_packet_unref(packet); } +if (ret == AVERROR_EOF) { +/* signal EOF to the filtergraph */ +if (av_buffersrc_add_frame_flags(buffersrc_ctx, NULL, 0) < 0) { +av_log(NULL, AV_LOG_ERROR, "Error while closing the filtergraph\n"); +goto end; +} + +/* pull remaining frames from the filtergraph */ +while (1) { +ret = av_buffersink_get_frame(buffersink_ctx, filt_frame); +if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) +break; +if (ret < 0) +goto end; +display_frame(filt_frame, buffersink_ctx->inputs[0]->time_base); +av_frame_unref(filt_frame); +} +} + end: avfilter_graph_free(_graph); avcodec_free_context(_ctx); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] tests/audiogen: Fix total RIFF chunk size
ffmpeg | branch: master | Tobias Rapp | Fri Mar 15 09:32:28 2024 +0100| [94ebe604b00acc170afa228824cd04773eb786ce] | committer: Tobias Rapp tests/audiogen: Fix total RIFF chunk size The "RIFF" identifier and chunk size fields should not be included within the size value. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=94ebe604b00acc170afa228824cd04773eb786ce --- tests/audiogen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/audiogen.c b/tests/audiogen.c index c43bb70ff9..df1dea6754 100644 --- a/tests/audiogen.c +++ b/tests/audiogen.c @@ -109,7 +109,7 @@ static void put32(uint32_t v) fputc((v >> 24) & 0xff, outfile); } -#define HEADER_SIZE 46 +#define HEADER_SIZE 38 #define FMT_SIZE 18 #define SAMPLE_SIZE 2 #define WFORMAT_PCM 0x0001 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/af_astats: Only print header lines when values are to be printed
ffmpeg | branch: master | Tobias Rapp | Thu Mar 25 17:26:37 2021 +0100| [ca56299fb3f71badee457c4c36a893f626c4a274] | committer: Tobias Rapp avfilter/af_astats: Only print header lines when values are to be printed Avoids empty "Channel" or "Overall" header lines added to log output when measurement is restricted to one scope using "measure_perchannel=none" or "measure_overall=none". Signed-off-by: Tobias Rapp > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ca56299fb3f71badee457c4c36a893f626c4a274 --- libavfilter/af_astats.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavfilter/af_astats.c b/libavfilter/af_astats.c index 51a01aba2f..23a5785d5a 100644 --- a/libavfilter/af_astats.c +++ b/libavfilter/af_astats.c @@ -705,7 +705,8 @@ static void print_stats(AVFilterContext *ctx) if (fabs(p->sigma_x) > fabs(max_sigma_x)) max_sigma_x = p->sigma_x; -av_log(ctx, AV_LOG_INFO, "Channel: %d\n", c + 1); +if (s->measure_perchannel != MEASURE_NONE) +av_log(ctx, AV_LOG_INFO, "Channel: %d\n", c + 1); if (s->measure_perchannel & MEASURE_DC_OFFSET) av_log(ctx, AV_LOG_INFO, "DC offset: %f\n", p->sigma_x / p->nb_samples); if (s->measure_perchannel & MEASURE_MIN_LEVEL) @@ -757,7 +758,8 @@ static void print_stats(AVFilterContext *ctx) av_log(ctx, AV_LOG_INFO, "Number of denormals: %"PRId64"\n", p->nb_denormals); } -av_log(ctx, AV_LOG_INFO, "Overall\n"); +if (s->measure_overall != MEASURE_NONE) +av_log(ctx, AV_LOG_INFO, "Overall\n"); if (s->measure_overall & MEASURE_DC_OFFSET) av_log(ctx, AV_LOG_INFO, "DC offset: %f\n", max_sigma_x / (nb_samples / s->nb_channels)); if (s->measure_overall & MEASURE_MIN_LEVEL) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] fate/ffprobe: Verify ffprobe XML output against schema file
ffmpeg | branch: master | Tobias Rapp | Fri Apr 16 10:46:41 2021 +0200| [f531a1a4e8f5bbc66d6077efe3b4f90f76cc5f51] | committer: Tobias Rapp fate/ffprobe: Verify ffprobe XML output against schema file Adds schema validation for ffprobe XML output so that updating the ffprobe.xsd file upon changes to ffprobe is not forgotten. This was suggested by Marton Balint in: http://ffmpeg.org/pipermail/ffmpeg-devel/2021-March/278428.html The schema FATE test is only run if xmllint command is available. Signed-off-by: Tobias Rapp > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f531a1a4e8f5bbc66d6077efe3b4f90f76cc5f51 --- configure | 3 +++ tests/fate/ffprobe.mak | 6 + tests/ref/fate/ffprobe_xsd | 57 ++ 3 files changed, 66 insertions(+) diff --git a/configure b/configure index b3b8065188..2d2d125fd3 100755 --- a/configure +++ b/configure @@ -2370,6 +2370,7 @@ HAVE_LIST=" perl pod2man texi2html +xmllint zlib_gzip " @@ -6654,6 +6655,7 @@ disabled makeinfo_html && texi2html --help 2> /dev/null | grep -q 'init-file' && perl -v> /dev/null 2>&1 && enable perl || disable perl pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout +xmllint --version > /dev/null 2>&1 && enable xmllint || disable xmllint # check V4L2 codecs available in the API if enabled v4l2_m2m; then @@ -7417,6 +7419,7 @@ echo "perl enabled ${perl-no}" echo "pod2man enabled ${pod2man-no}" echo "makeinfo enabled ${makeinfo-no}" echo "makeinfo supports HTML${makeinfo_html-no}" +echo "xmllint enabled ${xmllint-no}" test -n "$random_seed" && echo "random seed ${random_seed}" echo diff --git a/tests/fate/ffprobe.mak b/tests/fate/ffprobe.mak index c867bebf41..d2abe8a11e 100644 --- a/tests/fate/ffprobe.mak +++ b/tests/fate/ffprobe.mak @@ -29,6 +29,12 @@ FATE_FFPROBE-$(CONFIG_AVDEVICE) += fate-ffprobe_xml fate-ffprobe_xml: $(FFPROBE_TEST_FILE) fate-ffprobe_xml: CMD = run $(FFPROBE_COMMAND) -of xml +FATE_FFPROBE_SCHEMA-$(CONFIG_AVDEVICE) += fate-ffprobe_xsd +fate-ffprobe_xsd: $(FFPROBE_TEST_FILE) +fate-ffprobe_xsd: CMD = run $(FFPROBE_COMMAND) -noprivate -of xml=q=1:x=1 | \ + xmllint --schema $(SRC_PATH)/doc/ffprobe.xsd - + +FATE_FFPROBE-$(HAVE_XMLLINT) += $(FATE_FFPROBE_SCHEMA-yes) FATE_FFPROBE += $(FATE_FFPROBE-yes) fate-ffprobe: $(FATE_FFPROBE) diff --git a/tests/ref/fate/ffprobe_xsd b/tests/ref/fate/ffprobe_xsd new file mode 100644 index 00..cb3413eee5 --- /dev/null +++ b/tests/ref/fate/ffprobe_xsd @@ -0,0 +1,57 @@ + +http://www.w3.org/2001/XMLSchema-instance; xmlns:ffprobe="http://www.ffmpeg.org/schema/ffprobe; xsi:schemaLocation="http://www.ffmpeg.org/schema/ffprobe ffprobe.xsd"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/ffprobe.xsd: Clean-up choice indicator definitions
ffmpeg | branch: master | Tobias Rapp | Wed Mar 31 11:47:18 2021 +0200| [39eafd0b2e1c5666029390ac57f3fe5441d8fc7e] | committer: Tobias Rapp doc/ffprobe.xsd: Clean-up choice indicator definitions Remove the unneeded wrapping sequence element. Also the minOccurs/maxOccurs occurrence indicators on the inner element definitions can be removed. Signed-off-by: Tobias Rapp > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=39eafd0b2e1c5666029390ac57f3fe5441d8fc7e --- doc/ffprobe.xsd | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd index a9ffe57f16..250de8cd5c 100644 --- a/doc/ffprobe.xsd +++ b/doc/ffprobe.xsd @@ -29,22 +29,18 @@ - - - - - - + + + + - - - - - - - + + + + + ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] fftools/ffprobe: Remove check on show_frames and show_packets in XML writer
ffmpeg | branch: master | Tobias Rapp | Wed Mar 31 11:41:49 2021 +0200| [f10da58ec367cd802ae697d34c51f447b32a34a2] | committer: Tobias Rapp fftools/ffprobe: Remove check on show_frames and show_packets in XML writer The "packets_and_frames" element has been added to ffprobe.xsd in 0c9f0da0f7656059e9bd41931d250aafddf35ea3 but apparently removing the check in ffprobe.c has been forgotten. Signed-off-by: Tobias Rapp > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f10da58ec367cd802ae697d34c51f447b32a34a2 --- fftools/ffprobe.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 8c7b238adf..a2cb7dc986 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -1660,13 +1660,6 @@ static av_cold int xml_init(WriterContext *wctx) CHECK_COMPLIANCE(show_private_data, "private"); CHECK_COMPLIANCE(show_value_unit, "unit"); CHECK_COMPLIANCE(use_value_prefix, "prefix"); - -if (do_show_frames && do_show_packets) { -av_log(wctx, AV_LOG_ERROR, - "Interleaved frames and packets are not allowed in XSD. " - "Select only one between the -show_frames and the -show_packets options.\n"); -return AVERROR(EINVAL); -} } return 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/encoders: Remove text about single bit-depth libx264 support
ffmpeg | branch: master | Tobias Rapp | Mon Mar 15 14:07:27 2021 +0100| [b60fe9508f5cf2adec82b0411c313c5638f33cc5] | committer: Tobias Rapp doc/encoders: Remove text about single bit-depth libx264 support In the meanwhile libx264 allows to be configured for including both 8/10 bit support within a single library. The new libx264 interface was enabled in 2f96190732d15510ba29471fa45d66841c0c3df1. Signed-off-by: Tobias Rapp > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b60fe9508f5cf2adec82b0411c313c5638f33cc5 --- doc/encoders.texi | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/encoders.texi b/doc/encoders.texi index c9c8785afb..a92eb0eb2f 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -2305,9 +2305,7 @@ pixel formats as input instead of YUV. @subsection Supported Pixel Formats x264 supports 8- to 10-bit color spaces. The exact bit depth is controlled at -x264's configure time. FFmpeg only supports one bit depth in one particular -build. In other words, it is not possible to build one FFmpeg with multiple -versions of x264 with different bit depths. +x264's configure time. @subsection Options ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/libopenh264enc: fix class_name
ffmpeg | branch: master | Tobias Rapp | Mon Nov 12 17:04:43 2018 +0100| [7992c2867efc79eb8e9983e15a7ba998d6c48ffd] | committer: Tobias Rapp avcodec/libopenh264enc: fix class_name Reverts some accidental change in commit e621b1ca646a2f268797adc3194b694a852548d2. Reviewed-by: Jan Ekström Signed-off-by: Tobias Rapp > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7992c2867efc79eb8e9983e15a7ba998d6c48ffd --- libavcodec/libopenh264enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 5baa423433..ae6d17c6d2 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -75,7 +75,7 @@ static const AVOption options[] = { }; static const AVClass class = { -.class_name = "libvo_amrwbenc", +.class_name = "libopenh264enc", .item_name = av_default_item_name, .option = options, .version= LIBAVUTIL_VERSION_INT, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: add 10-bit test for hue video filter
ffmpeg | branch: master | Tobias Rapp | Fri Aug 3 11:29:50 2018 +0200| [56f68a099cc607658118e00cad30569103ae3751] | committer: Tobias Rapp fate: add 10-bit test for hue video filter Reviewed-by: Michael Niedermayer Signed-off-by: Tobias Rapp > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=56f68a099cc607658118e00cad30569103ae3751 --- tests/fate/filter-video.mak | 3 +++ tests/ref/fate/filter-hue4 | 1 + 2 files changed, 4 insertions(+) diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index edd51e1515..8bbdc04896 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -514,6 +514,9 @@ fate-filter-hue2: CMD = video_filter "perms=random,hue=h=18*n" -frames:v 20 FATE_FILTER_VSYNTH-$(call ALLYES, PERMS_FILTER HUE_FILTER) += fate-filter-hue3 fate-filter-hue3: CMD = video_filter "perms=random,hue=b=n-10" -frames:v 20 +FATE_FILTER_VSYNTH-$(call ALLYES, FORMAT_FILTER PERMS_FILTER HUE_FILTER) += fate-filter-hue4 +fate-filter-hue4: CMD = video_filter "format=yuv422p10,perms=random,hue=h=18*n:s=n/10" -frames:v 20 -pix_fmt yuv422p10le + FATE_FILTER_VSYNTH-$(CONFIG_IDET_FILTER) += fate-filter-idet fate-filter-idet: CMD = framecrc -flags bitexact -idct simple -i $(SRC) -vf idet -frames:v 25 -flags +bitexact diff --git a/tests/ref/fate/filter-hue4 b/tests/ref/fate/filter-hue4 new file mode 100644 index 00..2a08c33314 --- /dev/null +++ b/tests/ref/fate/filter-hue4 @@ -0,0 +1 @@ +hue46279ed43527e7b5be645819e08880107 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] tests/audiogen: raise channel count limit to 12
ffmpeg | branch: master | Tobias Rapp | Thu Jul 19 11:49:33 2018 +0200| [b82632b59f1182a550f61013773d38e0dc9b4318] | committer: Tobias Rapp tests/audiogen: raise channel count limit to 12 Reviewed-by: Michael Niedermayer Signed-off-by: Tobias Rapp > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b82632b59f1182a550f61013773d38e0dc9b4318 --- tests/audiogen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/audiogen.c b/tests/audiogen.c index 8d596b5108..c43bb70ff9 100644 --- a/tests/audiogen.c +++ b/tests/audiogen.c @@ -26,7 +26,7 @@ #include #include -#define MAX_CHANNELS 8 +#define MAX_CHANNELS 12 static unsigned int myrnd(unsigned int *seed_ptr, int n) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: add tests for audio channel up-/downmixing with pan filter
ffmpeg | branch: master | Tobias Rapp | Thu Jul 19 13:59:37 2018 +0200| [ec517ad9f9d4676e56c5f2e0054b9bb7b9c175ec] | committer: Tobias Rapp fate: add tests for audio channel up-/downmixing with pan filter Add tests for upmixing and downmixing with audio channel counts that have a corresponding default layout and also tests where there is no default layout. Update the existing "stereo4" test so it actually outputs stereo like the other stereo tests. Rename the previous "stereo4" test into "upmix1". Reviewed-by: Nicolas George Signed-off-by: Tobias Rapp > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ec517ad9f9d4676e56c5f2e0054b9bb7b9c175ec --- tests/fate/filter-audio.mak| 22 +++- tests/ref/fate/filter-pan-downmix1 | 26 +++ tests/ref/fate/filter-pan-downmix2 | 26 +++ tests/ref/fate/filter-pan-stereo4 | 42 +++--- tests/ref/fate/filter-pan-upmix1 | 26 +++ tests/ref/fate/filter-pan-upmix2 | 26 +++ 6 files changed, 146 insertions(+), 22 deletions(-) diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 6125a37f35..473b8ae9a5 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -156,7 +156,27 @@ fate-filter-pan-stereo3: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter: FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-stereo4 fate-filter-pan-stereo4: tests/data/asynth-44100-2.wav fate-filter-pan-stereo4: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav -fate-filter-pan-stereo4: CMD = framecrc -ss 3.14 -guess_layout_max 0 -i $(SRC) -frames:a 20 -filter:a "pan=4C|c0=c0-0.5*c1|c1=c1+0.5*c0|c2=0*c0|c3=0*c0" +fate-filter-pan-stereo4: CMD = framecrc -ss 3.14 -guess_layout_max 0 -i $(SRC) -frames:a 20 -filter:a "pan=2C|c0=c0-0.5*c1|c1=c1+0.5*c0" + +FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-upmix1 +fate-filter-pan-upmix1: tests/data/asynth-44100-2.wav +fate-filter-pan-upmix1: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-pan-upmix1: CMD = framecrc -ss 3.14 -guess_layout_max 0 -i $(SRC) -frames:a 20 -filter:a "pan=4C|c0=c0-0.5*c1|c1=c1+0.5*c0|c2=0*c0|c3=0*c0" + +FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-upmix2 +fate-filter-pan-upmix2: tests/data/asynth-44100-4.wav +fate-filter-pan-upmix2: SRC = $(TARGET_PATH)/tests/data/asynth-44100-4.wav +fate-filter-pan-upmix2: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter:a "pan=9C|c0=c0-c1|c1=c2+c3|c2=c0+c1|c3=c2-c3|c4=c1-c0|c5=c3+c2|c6=c1+c0|c7=c3-c2|c8=c0-c3" + +FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-downmix1 +fate-filter-pan-downmix1: tests/data/asynth-44100-4.wav +fate-filter-pan-downmix1: SRC = $(TARGET_PATH)/tests/data/asynth-44100-4.wav +fate-filter-pan-downmix1: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter:a "pan=2c|FLhttp://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vsrc_testsrc: add pal75bars and pal100bars video filter sources
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Tue May 8 11:43:50 2018 +0200| [eb28b5ec8a21d1ac0d3752f81a187e20eb012016] | committer: Tobias Rapp avfilter/vsrc_testsrc: add pal75bars and pal100bars video filter sources Generates color bar test patterns based on EBU PAL recommendations. Reviewed-by: Paul B Mahol <one...@gmail.com> Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eb28b5ec8a21d1ac0d3752f81a187e20eb012016 --- Changelog| 1 + doc/filters.texi | 10 +++- libavfilter/Makefile | 2 + libavfilter/allfilters.c | 2 + libavfilter/version.h| 2 +- libavfilter/vsrc_testsrc.c | 106 ++- tests/fate/filter-video.mak | 6 +++ tests/ref/fate/filter-pal100bars | 10 tests/ref/fate/filter-pal75bars | 10 9 files changed, 146 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index c9f1200e13..562fbc49e8 100644 --- a/Changelog +++ b/Changelog @@ -7,6 +7,7 @@ version : - amplify filter - fftdnoiz filter - aderivative and aintegral audio filters +- pal75bars and pal100bars video filter sources version 4.0: diff --git a/doc/filters.texi b/doc/filters.texi index 7646efb918..cf15186164 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -17825,13 +17825,15 @@ ffplay -f lavfi life=s=300x200:mold=10:r=60:ratio=0.1:death_color=#C83232:life_c @anchor{color} @anchor{haldclutsrc} @anchor{nullsrc} +@anchor{pal75bars} +@anchor{pal100bars} @anchor{rgbtestsrc} @anchor{smptebars} @anchor{smptehdbars} @anchor{testsrc} @anchor{testsrc2} @anchor{yuvtestsrc} -@section allrgb, allyuv, color, haldclutsrc, nullsrc, rgbtestsrc, smptebars, smptehdbars, testsrc, testsrc2, yuvtestsrc +@section allrgb, allyuv, color, haldclutsrc, nullsrc, pal75bars, pal100bars, rgbtestsrc, smptebars, smptehdbars, testsrc, testsrc2, yuvtestsrc The @code{allrgb} source returns frames of size 4096x4096 of all rgb colors. @@ -17846,6 +17848,12 @@ The @code{nullsrc} source returns unprocessed video frames. It is mainly useful to be employed in analysis / debugging tools, or as the source for filters which ignore the input data. +The @code{pal75bars} source generates a color bars pattern, based on +EBU PAL recommendations with 75% color levels. + +The @code{pal100bars} source generates a color bars pattern, based on +EBU PAL recommendations with 100% color levels. + The @code{rgbtestsrc} source generates an RGB test pattern useful for detecting RGB vs BGR issues. You should see a red, green and blue stripe from top to bottom. diff --git a/libavfilter/Makefile b/libavfilter/Makefile index f83a2b30ee..c68ef05fdc 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -390,6 +390,8 @@ OBJS-$(CONFIG_MANDELBROT_FILTER) += vsrc_mandelbrot.o OBJS-$(CONFIG_MPTESTSRC_FILTER) += vsrc_mptestsrc.o OBJS-$(CONFIG_NULLSRC_FILTER)+= vsrc_testsrc.o OBJS-$(CONFIG_OPENCLSRC_FILTER) += vf_program_opencl.o opencl.o +OBJS-$(CONFIG_PAL75BARS_FILTER) += vsrc_testsrc.o +OBJS-$(CONFIG_PAL100BARS_FILTER) += vsrc_testsrc.o OBJS-$(CONFIG_RGBTESTSRC_FILTER) += vsrc_testsrc.o OBJS-$(CONFIG_SMPTEBARS_FILTER) += vsrc_testsrc.o OBJS-$(CONFIG_SMPTEHDBARS_FILTER)+= vsrc_testsrc.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 099c19157b..b44093d21b 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -380,6 +380,8 @@ extern AVFilter ff_vsrc_mandelbrot; extern AVFilter ff_vsrc_mptestsrc; extern AVFilter ff_vsrc_nullsrc; extern AVFilter ff_vsrc_openclsrc; +extern AVFilter ff_vsrc_pal75bars; +extern AVFilter ff_vsrc_pal100bars; extern AVFilter ff_vsrc_rgbtestsrc; extern AVFilter ff_vsrc_smptebars; extern AVFilter ff_vsrc_smptehdbars; diff --git a/libavfilter/version.h b/libavfilter/version.h index b1c73be8e2..c32afce3e9 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -30,7 +30,7 @@ #include "libavutil/version.h" #define LIBAVFILTER_VERSION_MAJOR 7 -#define LIBAVFILTER_VERSION_MINOR 23 +#define LIBAVFILTER_VERSION_MINOR 24 #define LIBAVFILTER_VERSION_MICRO 100 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index a790974d14..8d76ae9271 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -1252,7 +1252,7 @@ AVFilter ff_vsrc_yuvtestsrc = { #endif /* CONFIG_YUVTESTSRC_FILTER */ -#if CONFIG_SMPTEBARS_FILTER || CONFIG_SMPTEHDBARS_FILTER +#if CONFIG_PAL75_FILTER || CONFIG_PAL100_FILTER || CONFIG_SMPTEBARS_FILTER || CONFIG_SMPTEHDBARS_FILTER static const uint8_t rainbow[7][4] = { { 180, 128, 128, 255 }, /* 75% white */ @@ -1264,6 +1264,16 @@ st
[FFmpeg-cvslog] fate: add more tests for hue video filter
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Wed May 9 11:30:40 2018 +0200| [66ba303c53698829e0b2c2d8f1c063fa35763fca] | committer: Tobias Rapp fate: add more tests for hue video filter Adds tests for the hue angle and brightness filter parameters. Renames the existing saturation parameter test for consistency. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=66ba303c53698829e0b2c2d8f1c063fa35763fca --- tests/fate/filter-video.mak | 10 -- tests/ref/fate/filter-hue | 1 - tests/ref/fate/filter-hue1 | 1 + tests/ref/fate/filter-hue2 | 1 + tests/ref/fate/filter-hue3 | 1 + 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index 17d6363678..f2ab2636e7 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -499,8 +499,14 @@ fate-filter-edgedetect: CMD = video_filter "format=gray,perms=random,edgedetect" FATE_FILTER_VSYNTH-$(call ALLYES, FORMAT_FILTER PERMS_FILTER EDGEDETECT_FILTER) += fate-filter-edgedetect-colormix fate-filter-edgedetect-colormix: CMD = video_filter "format=gbrp,perms=random,edgedetect=mode=colormix" -frames:v 20 -FATE_FILTER_VSYNTH-$(call ALLYES, PERMS_FILTER HUE_FILTER) += fate-filter-hue -fate-filter-hue: CMD = video_filter "perms=random,hue=s=sin(2*PI*t)+1" -frames:v 20 +FATE_FILTER_VSYNTH-$(call ALLYES, PERMS_FILTER HUE_FILTER) += fate-filter-hue1 +fate-filter-hue1: CMD = video_filter "perms=random,hue=s=sin(2*PI*t)+1" -frames:v 20 + +FATE_FILTER_VSYNTH-$(call ALLYES, PERMS_FILTER HUE_FILTER) += fate-filter-hue2 +fate-filter-hue2: CMD = video_filter "perms=random,hue=h=18*n" -frames:v 20 + +FATE_FILTER_VSYNTH-$(call ALLYES, PERMS_FILTER HUE_FILTER) += fate-filter-hue3 +fate-filter-hue3: CMD = video_filter "perms=random,hue=b=n-10" -frames:v 20 FATE_FILTER_VSYNTH-$(CONFIG_IDET_FILTER) += fate-filter-idet fate-filter-idet: CMD = framecrc -flags bitexact -idct simple -i $(SRC) -vf idet -frames:v 25 -flags +bitexact diff --git a/tests/ref/fate/filter-hue b/tests/ref/fate/filter-hue deleted file mode 100644 index 2f1ae619dd..00 --- a/tests/ref/fate/filter-hue +++ /dev/null @@ -1 +0,0 @@ -hue 57463dd9bc17156a51b704dd7271c863 diff --git a/tests/ref/fate/filter-hue1 b/tests/ref/fate/filter-hue1 new file mode 100644 index 00..7059ba7661 --- /dev/null +++ b/tests/ref/fate/filter-hue1 @@ -0,0 +1 @@ +hue157463dd9bc17156a51b704dd7271c863 diff --git a/tests/ref/fate/filter-hue2 b/tests/ref/fate/filter-hue2 new file mode 100644 index 00..2e060e1ab4 --- /dev/null +++ b/tests/ref/fate/filter-hue2 @@ -0,0 +1 @@ +hue2e951ae8ffb279552abc4354c4de7cb5b diff --git a/tests/ref/fate/filter-hue3 b/tests/ref/fate/filter-hue3 new file mode 100644 index 00..14a8379333 --- /dev/null +++ b/tests/ref/fate/filter-hue3 @@ -0,0 +1 @@ +hue3149dc22f5dc9f578f7d281dc3120c09b ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc: update loglevel option documentation
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Tue Apr 3 09:24:21 2018 +0200| [bc62d20dc415caf949b6452b2707b9eba78cb098] | committer: Tobias Rapp doc: update loglevel option documentation Updates documentation after the changes to loglevel flag prefix parsing in 4b736bc921ed96ad6d312ce0cbe0de29b9e3fe81. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bc62d20dc415caf949b6452b2707b9eba78cb098 --- doc/fftools-common-opts.texi | 37 + 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/doc/fftools-common-opts.texi b/doc/fftools-common-opts.texi index 185ec218d5..7787e11cda 100644 --- a/doc/fftools-common-opts.texi +++ b/doc/fftools-common-opts.texi @@ -168,14 +168,24 @@ The returned list cannot be assumed to be always complete. ffmpeg -sinks pulse,server=192.168.0.4 @end example -@item -loglevel [repeat+]@var{loglevel} | -v [repeat+]@var{loglevel} -Set the logging level used by the library. -Adding "repeat+" indicates that repeated log output should not be compressed -to the first line and the "Last message repeated n times" line will be -omitted. "repeat" can also be used alone. -If "repeat" is used alone, and with no prior loglevel set, the default -loglevel will be used. If multiple loglevel parameters are given, using -'repeat' will not change the loglevel. +@item -loglevel [@var{flags}+]@var{loglevel} | -v [@var{flags}+]@var{loglevel} +Set logging level and flags used by the library. + +The optional @var{flags} prefix can consist of the following values: +@table @samp +@item repeat +Indicates that repeated log output should not be compressed to the first line +and the "Last message repeated n times" line will be omitted. +@item level +Indicates that log output should add a @code{[level]} prefix to each message +line. This can be used as an alternative to log coloring, e.g. when dumping the +log to file. +@end table +Flags can also be used alone by adding a '+'/'-' prefix to set/reset a single +flag without affecting other @var{flags} or changing @var{loglevel}. When +setting both @var{flags} and @var{loglevel}, a '+' separator is expected +between the last @var{flags} value and before @var{loglevel}. + @var{loglevel} is a string or a number containing one of the following values: @table @samp @item quiet, -8 @@ -201,6 +211,17 @@ Show everything, including debugging information. @item trace, 56 @end table +For example to enable repeated log output, add the @code{level} prefix, and set +@var{loglevel} to @code{verbose}: +@example +ffmpeg -loglevel repeat+level+verbose -i input output +@end example +Another example that enables repeated log output without affecting current +state of @code{level} prefix flag or @var{loglevel}: +@example +ffmpeg [...] -loglevel +repeat +@end example + By default the program logs to stderr. If coloring is supported by the terminal, colors are used to mark errors and warnings. Log coloring can be disabled setting the environment variable ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fftools/cmdutils: add support for level flag in loglevel option parser
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Tue Apr 3 08:54:10 2018 +0200| [4b736bc921ed96ad6d312ce0cbe0de29b9e3fe81] | committer: Tobias Rapp fftools/cmdutils: add support for level flag in loglevel option parser Allows to manage the AV_LOG_PRINT_LEVEL flag as a prefix to the loglevel option value, similar to the existing AV_LOG_SKIP_REPEATE flag. Adds support for setting flags relative to the existing value by using a +/- prefix. Previous version reviewed-by: Michael Niedermayer <mich...@niedermayer.cc> Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4b736bc921ed96ad6d312ce0cbe0de29b9e3fe81 --- fftools/cmdutils.c | 65 +++--- 1 file changed, 47 insertions(+), 18 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 1001f36299..8ffc9d240b 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -881,28 +881,54 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg) { "debug" , AV_LOG_DEBUG }, { "trace" , AV_LOG_TRACE }, }; +const char *token; char *tail; -int level; -int flags; -int i; - -flags = av_log_get_flags(); -tail = strstr(arg, "repeat"); -if (tail) -flags &= ~AV_LOG_SKIP_REPEATED; -else -flags |= AV_LOG_SKIP_REPEATED; - -av_log_set_flags(flags); -if (tail == arg) -arg += 6 + (arg[6]=='+'); -if(tail && !*arg) -return 0; +int flags = av_log_get_flags(); +int level = av_log_get_level(); +int cmd, i = 0; + +av_assert0(arg); +while (*arg) { +token = arg; +if (*token == '+' || *token == '-') { +cmd = *token++; +} else { +cmd = 0; +} +if (!i && !cmd) { +flags = 0; /* missing relative prefix, build absolute value */ +} +if (!strncmp(token, "repeat", 6)) { +if (cmd == '-') { +flags |= AV_LOG_SKIP_REPEATED; +} else { +flags &= ~AV_LOG_SKIP_REPEATED; +} +arg = token + 6; +} else if (!strncmp(token, "level", 5)) { +if (cmd == '-') { +flags &= ~AV_LOG_PRINT_LEVEL; +} else { +flags |= AV_LOG_PRINT_LEVEL; +} +arg = token + 5; +} else { +break; +} +i++; +} +if (!*arg) { +goto end; +} else if (*arg == '+') { +arg++; +} else if (!i) { +flags = av_log_get_flags(); /* level value without prefix, reset flags */ +} for (i = 0; i < FF_ARRAY_ELEMS(log_levels); i++) { if (!strcmp(log_levels[i].name, arg)) { -av_log_set_level(log_levels[i].level); -return 0; +level = log_levels[i].level; +goto end; } } @@ -914,6 +940,9 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg) av_log(NULL, AV_LOG_FATAL, "\"%s\"\n", log_levels[i].name); exit_program(1); } + +end: +av_log_set_flags(flags); av_log_set_level(level); return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avutil/log: print level prefix also when no AVClass context is available
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Wed Mar 14 09:34:32 2018 +0100| [1296a718dc62728b6601f694539a1c5ad8ad260c] | committer: Tobias Rapp avutil/log: print level prefix also when no AVClass context is available Adds the level prefix to all log messages, except those with level <= AV_LOG_QUIET as they seem to be used for flushing the log buffer. Reviewed-by: Michael Niedermayer <mich...@niedermayer.cc> Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1296a718dc62728b6601f694539a1c5ad8ad260c --- libavutil/log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavutil/log.c b/libavutil/log.c index bd47f2a25f..9b7d48487f 100644 --- a/libavutil/log.c +++ b/libavutil/log.c @@ -266,11 +266,11 @@ static void format_line(void *avcl, int level, const char *fmt, va_list vl, av_bprintf(part+1, "[%s @ %p] ", avc->item_name(avcl), avcl); if(type) type[1] = get_category(avcl); - -if (flags & AV_LOG_PRINT_LEVEL) -av_bprintf(part+2, "[%s] ", get_level_str(level)); } +if (*print_prefix && (level > AV_LOG_QUIET) && (flags & AV_LOG_PRINT_LEVEL)) +av_bprintf(part+2, "[%s] ", get_level_str(level)); + av_vbprintf(part+3, fmt, vl); if(*part[0].str || *part[1].str || *part[2].str || *part[3].str) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fftools/ffmpeg: fix progress log message in case pts is not available
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Mon Feb 12 11:11:23 2018 +0100| [a194e9c4159845fc5f3410272e7cd6c4356bb2e7] | committer: Tobias Rapp fftools/ffmpeg: fix progress log message in case pts is not available Also fixes sign prefix for progress report. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a194e9c4159845fc5f3410272e7cd6c4356bb2e7 --- fftools/ffmpeg.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 3a45f43c1d..fa2f48f551 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1650,6 +1650,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti static int64_t last_time = -1; static int qp_histogram[52]; int hours, mins, secs, us; +const char *hours_sign; int ret; float t; @@ -1757,6 +1758,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti secs %= 60; hours = mins / 60; mins %= 60; +hours_sign = (pts < 0) ? "-" : ""; bitrate = pts && total_size >= 0 ? total_size * 8 / (pts / 1000.0) : -1; speed = t != 0.0 ? (double)pts / AV_TIME_BASE / t : -1; @@ -1765,11 +1767,13 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti "size=N/A time="); elsesnprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "size=%8.0fkB time=", total_size / 1024.0); -if (pts < 0) -snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "-"); -snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), - "%02d:%02d:%02d.%02d ", hours, mins, secs, - (100 * us) / AV_TIME_BASE); +if (pts == AV_NOPTS_VALUE) { +snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "N/A "); +} else { +snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), + "%s%02d:%02d:%02d.%02d ", hours_sign, hours, mins, secs, + (100 * us) / AV_TIME_BASE); +} if (bitrate < 0) { snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),"bitrate=N/A"); @@ -1781,9 +1785,14 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti if (total_size < 0) av_bprintf(_script, "total_size=N/A\n"); elseav_bprintf(_script, "total_size=%"PRId64"\n", total_size); -av_bprintf(_script, "out_time_ms=%"PRId64"\n", pts); -av_bprintf(_script, "out_time=%02d:%02d:%02d.%06d\n", - hours, mins, secs, us); +if (pts == AV_NOPTS_VALUE) { +av_bprintf(_script, "out_time_ms=N/A\n"); +av_bprintf(_script, "out_time=N/A\n"); +} else { +av_bprintf(_script, "out_time_ms=%"PRId64"\n", pts); +av_bprintf(_script, "out_time=%s%02d:%02d:%02d.%06d\n", + hours_sign, hours, mins, secs, us); +} if (nb_frames_dup || nb_frames_drop) snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " dup=%d drop=%d", ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fftools/ffmpeg: update print_report to use AVBPrint API
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Mon Feb 26 15:13:29 2018 +0100| [69995a94d8409a704361dce9bc16ede7f88bdf1a] | committer: Tobias Rapp fftools/ffmpeg: update print_report to use AVBPrint API Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=69995a94d8409a704361dce9bc16ede7f88bdf1a --- fftools/ffmpeg.c | 48 ++-- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index fa2f48f551..ee7258fcd1 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1637,8 +1637,7 @@ static void print_final_stats(int64_t total_size) static void print_report(int is_last_report, int64_t timer_start, int64_t cur_time) { -char buf[1024]; -AVBPrint buf_script; +AVBPrint buf, buf_script; OutputStream *ost; AVFormatContext *oc; int64_t total_size; @@ -1676,8 +1675,8 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti if (total_size <= 0) // FIXME improve avio_size() so it works with non seekable output too total_size = avio_tell(oc->pb); -buf[0] = '\0'; vid = 0; +av_bprint_init(, 0, AV_BPRINT_SIZE_AUTOMATIC); av_bprint_init(_script, 0, 1); for (i = 0; i < nb_output_streams; i++) { float q = -1; @@ -1687,7 +1686,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti q = ost->quality / (float) FF_QP2LAMBDA; if (vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) { -snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "q=%2.1f ", q); +av_bprintf(, "q=%2.1f ", q); av_bprintf(_script, "stream_%d_%d_q=%.1f\n", ost->file_index, ost->index, q); } @@ -1696,21 +1695,21 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti frame_number = ost->frame_number; fps = t > 1 ? frame_number / t : 0; -snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "frame=%5d fps=%3.*f q=%3.1f ", +av_bprintf(, "frame=%5d fps=%3.*f q=%3.1f ", frame_number, fps < 9.95, fps, q); av_bprintf(_script, "frame=%d\n", frame_number); av_bprintf(_script, "fps=%.1f\n", fps); av_bprintf(_script, "stream_%d_%d_q=%.1f\n", ost->file_index, ost->index, q); if (is_last_report) -snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "L"); +av_bprintf(, "L"); if (qp_hist) { int j; int qp = lrintf(q); if (qp >= 0 && qp < FF_ARRAY_ELEMS(qp_histogram)) qp_histogram[qp]++; for (j = 0; j < 32; j++) -snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%X", av_log2(qp_histogram[j] + 1)); +av_bprintf(, "%X", av_log2(qp_histogram[j] + 1)); } if ((enc->flags & AV_CODEC_FLAG_PSNR) && (ost->pict_type != AV_PICTURE_TYPE_NONE || is_last_report)) { @@ -1719,7 +1718,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti double scale, scale_sum = 0; double p; char type[3] = { 'Y','U','V' }; -snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "PSNR="); +av_bprintf(, "PSNR="); for (j = 0; j < 3; j++) { if (is_last_report) { error = enc->error[j]; @@ -1733,12 +1732,12 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti error_sum += error; scale_sum += scale; p = psnr(error / scale); -snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%c:%2.2f ", type[j], p); +av_bprintf(, "%c:%2.2f ", type[j], p); av_bprintf(_script, "stream_%d_%d_psnr_%c=%2.2f\n", ost->file_index, ost->index, type[j] | 32, p); } p = psnr(error_sum / scale_sum); -snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "*:%2.2f ", psnr(error_sum / scale_sum)); +av_bprintf(, "*:%2.2f ", psnr(error_sum / scale_sum)); av_bprintf(_script, "stream_%d_%d_psnr_all=%2.2f\n", ost->file_index, ost->index, p); } @@ -1763,23
[FFmpeg-cvslog] fftools/ffmpeg: replace call to av_strerror with av_err2str
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Mon Feb 26 08:38:53 2018 +0100| [fa0c9d69d3d70ab81400c54a7a7d1446c678ef7a] | committer: Tobias Rapp fftools/ffmpeg: replace call to av_strerror with av_err2str Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fa0c9d69d3d70ab81400c54a7a7d1446c678ef7a --- fftools/ffmpeg.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 32caa4bfb2..3a45f43c1d 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2175,10 +2175,7 @@ static int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame) ret = reap_filters(1); if (ret < 0 && ret != AVERROR_EOF) { -char errbuf[128]; -av_strerror(ret, errbuf, sizeof(errbuf)); - -av_log(NULL, AV_LOG_ERROR, "Error while filtering: %s\n", errbuf); +av_log(NULL, AV_LOG_ERROR, "Error while filtering: %s\n", av_err2str(ret)); return ret; } @@ -4638,10 +4635,7 @@ static int transcode(void) ret = transcode_step(); if (ret < 0 && ret != AVERROR_EOF) { -char errbuf[128]; -av_strerror(ret, errbuf, sizeof(errbuf)); - -av_log(NULL, AV_LOG_ERROR, "Error while filtering: %s\n", errbuf); +av_log(NULL, AV_LOG_ERROR, "Error while filtering: %s\n", av_err2str(ret)); break; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/filters: add links to ffmpeg-utils and ffmpeg documentation
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Feb 22 08:53:03 2018 +0100| [aedbb3c72c97099a633c151b68d29b63c2a89339] | committer: Tobias Rapp doc/filters: add links to ffmpeg-utils and ffmpeg documentation Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aedbb3c72c97099a633c151b68d29b63c2a89339 --- doc/filters.texi | 48 ++-- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 8a9b78d778..7908c51d48 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -1611,7 +1611,7 @@ The filter accepts the syntax [@var{sample_rate}:]@var{resampler_options}, where @var{sample_rate} expresses a sample rate and @var{resampler_options} is a list of @var{key}=@var{value} pairs, separated by ":". See the -@ref{Resampler Options,,the "Resampler Options" section in the +@ref{Resampler Options,,"Resampler Options" section in the ffmpeg-resampler(1) manual,ffmpeg-resampler} for the complete list of supported options. @@ -7449,7 +7449,7 @@ the input width and height. It defaults to 0. @item color, c Specify the color of the box to write. For the general syntax of this option, -check the "Color" section in the ffmpeg-utils manual. If the special +check the @ref{color syntax,,"Color" section in the ffmpeg-utils manual,ffmpeg-utils}. If the special value @code{invert} is used, the box edge color is the same as the video with inverted luma. @@ -7552,7 +7552,7 @@ framed. Default to 0. @item color, c Specify the color of the grid. For the general syntax of this option, -check the "Color" section in the ffmpeg-utils manual. If the special +check the @ref{color syntax,,"Color" section in the ffmpeg-utils manual,ffmpeg-utils}. If the special value @code{invert} is used, the grid color is the same as the video with inverted luma. @@ -7648,7 +7648,7 @@ The default value of @var{boxborderw} is 0. @item boxcolor The color to be used for drawing box around text. For the syntax of this -option, check the "Color" section in the ffmpeg-utils manual. +option, check the @ref{color syntax,,"Color" section in the ffmpeg-utils manual,ffmpeg-utils}. The default value of @var{boxcolor} is "white". @@ -7662,7 +7662,7 @@ The default value of @var{borderw} is 0. @item bordercolor Set the color to be used for drawing border around text. For the syntax of this -option, check the "Color" section in the ffmpeg-utils manual. +option, check the @ref{color syntax,,"Color" section in the ffmpeg-utils manual,ffmpeg-utils}. The default value of @var{bordercolor} is "black". @@ -7683,7 +7683,7 @@ If true, check and fix text coords to avoid clipping. @item fontcolor The color to be used for drawing fonts. For the syntax of this option, check -the "Color" section in the ffmpeg-utils manual. +the @ref{color syntax,,"Color" section in the ffmpeg-utils manual,ffmpeg-utils}. The default value of @var{fontcolor} is "black". @@ -7746,7 +7746,8 @@ libfreetype flags. @item shadowcolor The color to be used for drawing a shadow behind the drawn text. For the -syntax of this option, check the "Color" section in the ffmpeg-utils manual. +syntax of this option, check the @ref{color syntax,,"Color" section in the +ffmpeg-utils manual,ffmpeg-utils}. The default value of @var{shadowcolor} is "black". @@ -9322,8 +9323,9 @@ A '|'-separated list of parameters to pass to the frei0r effect. A frei0r effect parameter can be a boolean (its value is either "y" or "n"), a double, a color (specified as @var{R}/@var{G}/@var{B}, where @var{R}, @var{G}, and @var{B} are floating point -numbers between 0.0 and 1.0, inclusive) or by a color description specified in the "Color" -section in the ffmpeg-utils manual), a position (specified as @var{X}/@var{Y}, where +numbers between 0.0 and 1.0, inclusive) or a color description as specified in the +@ref{color syntax,,"Color" section in the ffmpeg-utils manual,ffmpeg-utils}, +a position (specified as @var{X}/@var{Y}, where @var{X} and @var{Y} are floating point numbers) and/or a string. The number and types of parameters depend on the loaded effect. If an @@ -11881,7 +11883,8 @@ so the input image is centered on the padded area. @item color Specify the color of the padded area. For the syntax of this option, -check the "Color" section in the ffmpeg-utils manual. +check the @ref{color syntax,,"Color" section in the ffmpeg-utils +manual,ffmpeg-utils}. The default value of @var{color} is "black". @@ -13273,8 +13276,9 @@ it. Default value is 1. @item fillcolor, c Set the color used to fill the output
[FFmpeg-cvslog] swresample/rematrix: fix update of channel matrix if input or output layout is undefined
ffmpeg | branch: release/3.0 | Tobias Rapp <t.r...@noa-archive.com> | Wed Feb 14 17:01:08 2018 +0100| [8ae9bbef87f89f7ea0633b86bf0cadf243bc488f] | committer: Tobias Rapp swresample/rematrix: fix update of channel matrix if input or output layout is undefined Prefer direct in/out channel count values over channel layout, when available. Fixes a pan filter bug (ticket #6790). Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> (cherry picked from commit 6325bd3717348615adafb52e4da2fd01a3007d0a) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8ae9bbef87f89f7ea0633b86bf0cadf243bc488f --- libswresample/rematrix.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c index ddba0433e8..7ab74edd05 100644 --- a/libswresample/rematrix.c +++ b/libswresample/rematrix.c @@ -68,8 +68,10 @@ int swr_set_matrix(struct SwrContext *s, const double *matrix, int stride) if (!s || s->in_convert) // s needs to be allocated but not initialized return AVERROR(EINVAL); memset(s->matrix, 0, sizeof(s->matrix)); -nb_in = av_get_channel_layout_nb_channels(s->user_in_ch_layout); -nb_out = av_get_channel_layout_nb_channels(s->user_out_ch_layout); +nb_in = (s->user_in_ch_count > 0) ? s->user_in_ch_count : +av_get_channel_layout_nb_channels(s->user_in_ch_layout); +nb_out = (s->user_out_ch_count > 0) ? s->user_out_ch_count : +av_get_channel_layout_nb_channels(s->user_out_ch_layout); for (out = 0; out < nb_out; out++) { for (in = 0; in < nb_in; in++) s->matrix[out][in] = matrix[in]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] swresample/rematrix: fix update of channel matrix if input or output layout is undefined
ffmpeg | branch: release/3.2 | Tobias Rapp <t.r...@noa-archive.com> | Wed Feb 14 17:01:08 2018 +0100| [1c3144751a8235ce5abd463d31f20dac4e73c6b7] | committer: Tobias Rapp swresample/rematrix: fix update of channel matrix if input or output layout is undefined Prefer direct in/out channel count values over channel layout, when available. Fixes a pan filter bug (ticket #6790). Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> (cherry picked from commit 6325bd3717348615adafb52e4da2fd01a3007d0a) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1c3144751a8235ce5abd463d31f20dac4e73c6b7 --- libswresample/rematrix.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c index 4721063a13..636c2f3b8b 100644 --- a/libswresample/rematrix.c +++ b/libswresample/rematrix.c @@ -69,8 +69,10 @@ int swr_set_matrix(struct SwrContext *s, const double *matrix, int stride) return AVERROR(EINVAL); memset(s->matrix, 0, sizeof(s->matrix)); memset(s->matrix_flt, 0, sizeof(s->matrix_flt)); -nb_in = av_get_channel_layout_nb_channels(s->user_in_ch_layout); -nb_out = av_get_channel_layout_nb_channels(s->user_out_ch_layout); +nb_in = (s->user_in_ch_count > 0) ? s->user_in_ch_count : +av_get_channel_layout_nb_channels(s->user_in_ch_layout); +nb_out = (s->user_out_ch_count > 0) ? s->user_out_ch_count : +av_get_channel_layout_nb_channels(s->user_out_ch_layout); for (out = 0; out < nb_out; out++) { for (in = 0; in < nb_in; in++) s->matrix_flt[out][in] = s->matrix[out][in] = matrix[in]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] swresample/rematrix: fix update of channel matrix if input or output layout is undefined
ffmpeg | branch: release/3.3 | Tobias Rapp <t.r...@noa-archive.com> | Wed Feb 14 17:01:08 2018 +0100| [fea559c3d5575bce51acdb17cf83a1a8fd237feb] | committer: Tobias Rapp swresample/rematrix: fix update of channel matrix if input or output layout is undefined Prefer direct in/out channel count values over channel layout, when available. Fixes a pan filter bug (ticket #6790). Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> (cherry picked from commit 6325bd3717348615adafb52e4da2fd01a3007d0a) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fea559c3d5575bce51acdb17cf83a1a8fd237feb --- libswresample/rematrix.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c index 03b9b20900..584ce69efd 100644 --- a/libswresample/rematrix.c +++ b/libswresample/rematrix.c @@ -69,8 +69,10 @@ int swr_set_matrix(struct SwrContext *s, const double *matrix, int stride) return AVERROR(EINVAL); memset(s->matrix, 0, sizeof(s->matrix)); memset(s->matrix_flt, 0, sizeof(s->matrix_flt)); -nb_in = av_get_channel_layout_nb_channels(s->user_in_ch_layout); -nb_out = av_get_channel_layout_nb_channels(s->user_out_ch_layout); +nb_in = (s->user_in_ch_count > 0) ? s->user_in_ch_count : +av_get_channel_layout_nb_channels(s->user_in_ch_layout); +nb_out = (s->user_out_ch_count > 0) ? s->user_out_ch_count : +av_get_channel_layout_nb_channels(s->user_out_ch_layout); for (out = 0; out < nb_out; out++) { for (in = 0; in < nb_in; in++) s->matrix_flt[out][in] = s->matrix[out][in] = matrix[in]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] swresample/rematrix: fix update of channel matrix if input or output layout is undefined
ffmpeg | branch: release/3.4 | Tobias Rapp <t.r...@noa-archive.com> | Wed Feb 14 17:01:08 2018 +0100| [8be1edf47ba9dcfaf6fccb1e01eeb8610ba97aff] | committer: Tobias Rapp swresample/rematrix: fix update of channel matrix if input or output layout is undefined Prefer direct in/out channel count values over channel layout, when available. Fixes a pan filter bug (ticket #6790). Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> (cherry picked from commit 6325bd3717348615adafb52e4da2fd01a3007d0a) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8be1edf47ba9dcfaf6fccb1e01eeb8610ba97aff --- libswresample/rematrix.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c index 66a43c16c1..dacace93d0 100644 --- a/libswresample/rematrix.c +++ b/libswresample/rematrix.c @@ -69,8 +69,10 @@ int swr_set_matrix(struct SwrContext *s, const double *matrix, int stride) return AVERROR(EINVAL); memset(s->matrix, 0, sizeof(s->matrix)); memset(s->matrix_flt, 0, sizeof(s->matrix_flt)); -nb_in = av_get_channel_layout_nb_channels(s->user_in_ch_layout); -nb_out = av_get_channel_layout_nb_channels(s->user_out_ch_layout); +nb_in = (s->user_in_ch_count > 0) ? s->user_in_ch_count : +av_get_channel_layout_nb_channels(s->user_in_ch_layout); +nb_out = (s->user_out_ch_count > 0) ? s->user_out_ch_count : +av_get_channel_layout_nb_channels(s->user_out_ch_layout); for (out = 0; out < nb_out; out++) { for (in = 0; in < nb_in; in++) s->matrix_flt[out][in] = s->matrix[out][in] = matrix[in]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] swresample/rematrix: fix update of channel matrix if input or output layout is undefined
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Wed Feb 14 17:01:08 2018 +0100| [6325bd3717348615adafb52e4da2fd01a3007d0a] | committer: Tobias Rapp swresample/rematrix: fix update of channel matrix if input or output layout is undefined Prefer direct in/out channel count values over channel layout, when available. Fixes a pan filter bug (ticket #6790). Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6325bd3717348615adafb52e4da2fd01a3007d0a --- libswresample/rematrix.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c index 9fcfff1318..8227730056 100644 --- a/libswresample/rematrix.c +++ b/libswresample/rematrix.c @@ -69,8 +69,10 @@ int swr_set_matrix(struct SwrContext *s, const double *matrix, int stride) return AVERROR(EINVAL); memset(s->matrix, 0, sizeof(s->matrix)); memset(s->matrix_flt, 0, sizeof(s->matrix_flt)); -nb_in = av_get_channel_layout_nb_channels(s->user_in_ch_layout); -nb_out = av_get_channel_layout_nb_channels(s->user_out_ch_layout); +nb_in = (s->user_in_ch_count > 0) ? s->user_in_ch_count : +av_get_channel_layout_nb_channels(s->user_in_ch_layout); +nb_out = (s->user_out_ch_count > 0) ? s->user_out_ch_count : +av_get_channel_layout_nb_channels(s->user_out_ch_layout); for (out = 0; out < nb_out; out++) { for (in = 0; in < nb_in; in++) s->matrix_flt[out][in] = s->matrix[out][in] = matrix[in]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: add tests for pan audio filter
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Feb 15 08:21:24 2018 +0100| [56f77b0f678de74404ae3a64f6ba664ea4449348] | committer: Tobias Rapp fate: add tests for pan audio filter Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=56f77b0f678de74404ae3a64f6ba664ea4449348 --- tests/fate/filter-audio.mak | 30 ++ tests/ref/fate/filter-pan-mono1 | 26 ++ tests/ref/fate/filter-pan-mono2 | 26 ++ tests/ref/fate/filter-pan-stereo1 | 26 ++ tests/ref/fate/filter-pan-stereo2 | 26 ++ tests/ref/fate/filter-pan-stereo3 | 26 ++ tests/ref/fate/filter-pan-stereo4 | 26 ++ 7 files changed, 186 insertions(+) diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index bd8b3d3c35..2a3ba1992f 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -128,6 +128,36 @@ fate-filter-firequalizer: CMP = oneoff fate-filter-firequalizer: CMP_UNIT = s16 fate-filter-firequalizer: SIZE_TOLERANCE = 1058400 - 1097208 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-mono1 +fate-filter-pan-mono1: tests/data/asynth-44100-2.wav +fate-filter-pan-mono1: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-pan-mono1: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter:a "pan=mono|FC=FL" + +FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-mono2 +fate-filter-pan-mono2: tests/data/asynth-44100-2.wav +fate-filter-pan-mono2: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-pan-mono2: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter:a "pan=1C|c0=c0+c1" + +FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-stereo1 +fate-filter-pan-stereo1: tests/data/asynth-44100-3.wav +fate-filter-pan-stereo1: SRC = $(TARGET_PATH)/tests/data/asynth-44100-3.wav +fate-filter-pan-stereo1: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter:a "pan=2c|FL=FR|FR=FL" + +FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-stereo2 +fate-filter-pan-stereo2: tests/data/asynth-44100-3.wav +fate-filter-pan-stereo2: SRC = $(TARGET_PATH)/tests/data/asynth-44100-3.wav +fate-filter-pan-stereo2: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter:a "pan=stereo|c0=c0-c2|c1=c1-c2" + +FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-stereo3 +fate-filter-pan-stereo3: tests/data/asynth-44100-2.wav +fate-filter-pan-stereo3: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-pan-stereo3: CMD = framecrc -ss 3.14 -i $(SRC) -frames:a 20 -filter:a "pan=FL+FR|FL<3*c0+2*c1|FR<2*c0+3*c1" + +FATE_AFILTER-$(call FILTERDEMDECENCMUX, PAN, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-pan-stereo4 +fate-filter-pan-stereo4: tests/data/asynth-44100-2.wav +fate-filter-pan-stereo4: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-pan-stereo4: CMD = framecrc -ss 3.14 -guess_layout_max 0 -i $(SRC) -frames:a 20 -filter:a "pan=4C|c0=c0-0.5*c1|c1=c1+0.5*c0|c2=0*c0|c3=0*c0" + FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, SILENCEREMOVE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-silenceremove fate-filter-silenceremove: SRC = $(TARGET_SAMPLES)/audio-reference/divertimenti_2ch_96kHz_s24.wav fate-filter-silenceremove: CMD = framecrc -i $(SRC) -frames:a 30 -af silenceremove=0:0:0:-1:0:-90dB diff --git a/tests/ref/fate/filter-pan-mono1 b/tests/ref/fate/filter-pan-mono1 new file mode 100644 index 00..3bd7c25bc1 --- /dev/null +++ b/tests/ref/fate/filter-pan-mono1 @@ -0,0 +1,26 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 4 +#channel_layout_name 0: mono +0, 0, 0, 1024, 2048, 0x750f0a66 +0, 1024, 1024, 1024, 2048, 0x155cf063 +0, 2048, 2048, 1024, 2048, 0x1e43fc32 +0, 3072, 3072, 1024, 2048, 0x282ffc28 +0, 4096, 4096, 1024, 2048, 0x6d7bf000 +0, 5120, 5120, 1024, 2048, 0xc0b2f411 +0, 6144, 6144, 1024, 2048, 0xd711fb03 +0, 7168, 7168, 1024, 2048, 0x3164189c +0, 8192, 8192, 1024, 2048, 0x8c69e827 +0, 9216, 9216, 1024, 2048, 0x562d0518 +0, 10240, 10240, 1024, 2048, 0x380aee27 +0, 11264, 11264, 1024, 2048, 0x990a03e4 +0, 12288, 12288, 1024, 2048, 0x68d7ef60 +0, 13312, 13312, 1024, 2048, 0xd13fef9e +0, 14336, 14336, 1024, 2048, 0x009306e4 +0, 15360
[FFmpeg-cvslog] avformat/avienc: fix fields-per-frame value for interlaced video streams
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Mon Nov 27 09:13:05 2017 +0100| [26c0c84784f1f4e73e2de25b09b659781f06b0f2] | committer: Tobias Rapp avformat/avienc: fix fields-per-frame value for interlaced video streams Writes one set of field framing information for progressive streams and two sets for interlaced streams. Fixes ticket #6383. Unfortunately the OpenDML v1.02 document is not very specific on what value to use for start_line when frame data is not coming from a capturing device, so this is just using 0/1 depending on the field order as a best-effort guess. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=26c0c84784f1f4e73e2de25b09b659781f06b0f2 --- libavformat/avienc.c | 41 +--- libavformat/version.h| 2 +- tests/ref/fate/copy-trac2211-avi | 4 ++-- 3 files changed, 33 insertions(+), 14 deletions(-) diff --git a/libavformat/avienc.c b/libavformat/avienc.c index 483f5b54b1..ac0f04c354 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -501,8 +501,14 @@ static int avi_write_header(AVFormatContext *s) AVRational dar = av_mul_q(st->sample_aspect_ratio, (AVRational) { par->width, par->height }); -int num, den; +int num, den, fields, i; av_reduce(, , dar.num, dar.den, 0x); +if (par->field_order == AV_FIELD_TT || par->field_order == AV_FIELD_BB || +par->field_order == AV_FIELD_TB || par->field_order == AV_FIELD_BT) { +fields = 2; // interlaced +} else { +fields = 1; // progressive +} avio_wl32(pb, 0); // video format = unknown avio_wl32(pb, 0); // video standard = unknown @@ -514,17 +520,30 @@ static int avi_write_header(AVFormatContext *s) avio_wl16(pb, num); avio_wl32(pb, par->width); avio_wl32(pb, par->height); -avio_wl32(pb, 1); // progressive FIXME - -avio_wl32(pb, par->height); -avio_wl32(pb, par->width); -avio_wl32(pb, par->height); -avio_wl32(pb, par->width); -avio_wl32(pb, 0); -avio_wl32(pb, 0); +avio_wl32(pb, fields); // fields per frame + +for (i = 0; i < fields; i++) { +int start_line; +// OpenDML v1.02 is not very specific on what value to use for +// start_line when frame data is not coming from a capturing device, +// so just use 0/1 depending on the field order for interlaced frames +if (par->field_order == AV_FIELD_TT || par->field_order == AV_FIELD_TB) { +start_line = (i == 0) ? 0 : 1; +} else if (par->field_order == AV_FIELD_BB || par->field_order == AV_FIELD_BT) { +start_line = (i == 0) ? 1 : 0; +} else { +start_line = 0; +} -avio_wl32(pb, 0); -avio_wl32(pb, 0); +avio_wl32(pb, par->height / fields); // compressed bitmap height +avio_wl32(pb, par->width); // compressed bitmap width +avio_wl32(pb, par->height / fields); // valid bitmap height +avio_wl32(pb, par->width); // valid bitmap width +avio_wl32(pb, 0);// valid bitmap X offset +avio_wl32(pb, 0);// valid bitmap Y offset +avio_wl32(pb, 0);// valid X offset in T +avio_wl32(pb, start_line); // valid Y start line +} ff_end_tag(pb, vprp); } diff --git a/libavformat/version.h b/libavformat/version.h index feb1461c41..7fe3710a2c 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -33,7 +33,7 @@ // Also please add any ticket numbers that you believe might be affected here #define LIBAVFORMAT_VERSION_MAJOR 58 #define LIBAVFORMAT_VERSION_MINOR 2 -#define LIBAVFORMAT_VERSION_MICRO 102 +#define LIBAVFORMAT_VERSION_MICRO 103 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \ diff --git a/tests/ref/fate/copy-trac2211-avi b/tests/ref/fate/copy-trac2211-avi index 007349e572..06d81e537d 100644 --- a/tests/ref/fate/copy-trac2211-avi +++ b/tests/ref/fate/copy-trac2211-avi @@ -1,5 +1,5 @@ -6f6b211cbc8de9871e8e09e64048e2f9 *tests/data/fate/copy-trac2211-avi.avi -1777924 tests/data/fate/copy-trac2211-avi.avi +0920978f3f8196413c43f0033b55a5b6 *tests/data/fate/copy-trac2211-avi.avi +1777956 tests/data/fat
[FFmpeg-cvslog] avformat/wavenc: skip writing incorrect peak-of-peaks position value
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Fri Sep 29 16:32:20 2017 +0200| [a07ac9302335c1f12dcfb7d4ef57689f25c8e2c4] | committer: Tobias Rapp avformat/wavenc: skip writing incorrect peak-of-peaks position value According to EBU tech 3285 supplement 3 the dwPosPeakOfPeaks field should contain the absolute position to the maximum audio sample value, but the current implementation writes the relative peak frame index instead. Fix the issue by writing the "unknown" value (-1) for now until the feature is implemented correctly. Previous version reviewed-by: Peter Bubestinger <p.bubestin...@av-rd.com> Reviewed-by: Michael Niedermayer <mich...@niedermayer.cc> Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a07ac9302335c1f12dcfb7d4ef57689f25c8e2c4 --- libavformat/version.h| 2 +- libavformat/wavenc.c | 11 +-- tests/ref/lavf/wav_peak | 2 +- tests/ref/lavf/wav_peak_only | 2 +- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/libavformat/version.h b/libavformat/version.h index 0feb788c36..8ae091ffab 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -33,7 +33,7 @@ // Also please add any ticket numbers that you believe might be affected here #define LIBAVFORMAT_VERSION_MAJOR 58 #define LIBAVFORMAT_VERSION_MINOR 0 -#define LIBAVFORMAT_VERSION_MICRO 100 +#define LIBAVFORMAT_VERSION_MICRO 101 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \ diff --git a/libavformat/wavenc.c b/libavformat/wavenc.c index adb20cb215..159119d693 100644 --- a/libavformat/wavenc.c +++ b/libavformat/wavenc.c @@ -74,8 +74,6 @@ typedef struct WAVMuxContext { uint32_t peak_num_frames; uint32_t peak_outbuf_size; uint32_t peak_outbuf_bytes; -uint32_t peak_pos_pop; -uint16_t peak_pop; uint8_t *peak_output; int last_duration; int write_bext; @@ -195,7 +193,6 @@ static void peak_write_frame(AVFormatContext *s) { WAVMuxContext *wav = s->priv_data; AVCodecParameters *par = s->streams[0]->codecpar; -int peak_of_peaks; int c; if (!wav->peak_output) @@ -213,12 +210,6 @@ static void peak_write_frame(AVFormatContext *s) wav->peak_maxpos[c] = FFMAX(wav->peak_maxpos[c], wav->peak_maxneg[c]); -peak_of_peaks = FFMAX3(wav->peak_maxpos[c], wav->peak_maxneg[c], - wav->peak_pop); -if (peak_of_peaks > wav->peak_pop) -wav->peak_pos_pop = wav->peak_num_frames; -wav->peak_pop = peak_of_peaks; - if (wav->peak_outbuf_size - wav->peak_outbuf_bytes < wav->peak_format * wav->peak_ppv) { wav->peak_outbuf_size += PEAK_BUFFER_SIZE; @@ -287,7 +278,7 @@ static int peak_write_chunk(AVFormatContext *s) avio_wl32(pb, wav->peak_block_size);/* frames per value */ avio_wl32(pb, par->channels); /* number of channels */ avio_wl32(pb, wav->peak_num_frames);/* number of peak frames */ -avio_wl32(pb, wav->peak_pos_pop); /* audio sample frame index */ +avio_wl32(pb, -1); /* audio sample frame position (not implemented) */ avio_wl32(pb, 128); /* equal to size of header */ avio_write(pb, timestamp, 28); /* ASCII time stamp */ ffio_fill(pb, 0, 60); diff --git a/tests/ref/lavf/wav_peak b/tests/ref/lavf/wav_peak index aa7e5fc49e..861b246d72 100644 --- a/tests/ref/lavf/wav_peak +++ b/tests/ref/lavf/wav_peak @@ -1,3 +1,3 @@ -35148d1f6e66b0080893851d917ecbf4 *./tests/data/lavf/lavf.peak.wav +105805963fb767d00da056f42f32d9f3 *./tests/data/lavf/lavf.peak.wav 89094 ./tests/data/lavf/lavf.peak.wav ./tests/data/lavf/lavf.peak.wav CRC=0x3a1da17e diff --git a/tests/ref/lavf/wav_peak_only b/tests/ref/lavf/wav_peak_only index dccd0e72ff..b203d0345b 100644 --- a/tests/ref/lavf/wav_peak_only +++ b/tests/ref/lavf/wav_peak_only @@ -1,2 +1,2 @@ -b609a363e6d490710ed52231a8d09d3c *./tests/data/lavf/lavf.peak_only.wav +f1a8aeeae8069f3992c4d780436c3d23 *./tests/data/lavf/lavf.peak_only.wav 832 ./tests/data/lavf/lavf.peak_only.wav ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_fps: add eof_action filter option
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Sep 21 13:40:36 2017 +0200| [62bdec806ecd3539856dffc86542bdc46a1932c1] | committer: Tobias Rapp avfilter/vf_fps: add eof_action filter option Allows to specify the action to be performed when reading the last frame from the internal FIFO buffer. By default the last frame is written to filter output depending on the timestamp rounding method. When using "pass" action the last frame is passed through if input duration has not been reached yet. Examples using an input file with 25Hz, 1.4sec duration: - "fps=fps=1:round=near" generates an output file of 1sec - "fps=fps=1:round=near:eof_action=pass" generates an output file of 2sec Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=62bdec806ecd3539856dffc86542bdc46a1932c1 --- doc/filters.texi | 12 libavfilter/version.h | 2 +- libavfilter/vf_fps.c | 14 +- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 624e5cd01b..57189c77b0 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -8695,6 +8695,18 @@ round to nearest @end table The default is @code{near}. +@item eof_action +Action performed when reading the last frame. + +Possible values are: +@table @option +@item round +Use same timestamp rounding method as used for other frames. +@item pass +Pass through last frame if input duration has not been reached yet. +@end table +The default is @code{round}. + @end table Alternatively, the options can be specified as a flat string: diff --git a/libavfilter/version.h b/libavfilter/version.h index fb382d4e25..8191c59a15 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -31,7 +31,7 @@ #define LIBAVFILTER_VERSION_MAJOR 6 #define LIBAVFILTER_VERSION_MINOR 106 -#define LIBAVFILTER_VERSION_MICRO 100 +#define LIBAVFILTER_VERSION_MICRO 101 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ LIBAVFILTER_VERSION_MINOR, \ diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c index a5e51c3bbb..dbafd2c35a 100644 --- a/libavfilter/vf_fps.c +++ b/libavfilter/vf_fps.c @@ -40,6 +40,12 @@ #include "internal.h" #include "video.h" +enum EOFAction { +EOF_ACTION_ROUND, +EOF_ACTION_PASS, +EOF_ACTION_NB +}; + typedef struct FPSContext { const AVClass *class; @@ -52,6 +58,7 @@ typedef struct FPSContext { AVRational framerate; ///< target framerate int rounding; ///< AVRounding method for timestamps +int eof_action; ///< action performed for last frame in FIFO /* statistics */ int frames_in; ///< number of frames on input @@ -72,6 +79,9 @@ static const AVOption fps_options[] = { { "down", "round towards -infty",0, AV_OPT_TYPE_CONST, { .i64 = AV_ROUND_DOWN }, 0, 0, V|F, "round" }, { "up", "round towards +infty",0, AV_OPT_TYPE_CONST, { .i64 = AV_ROUND_UP }, 0, 0, V|F, "round" }, { "near", "round to nearest",0, AV_OPT_TYPE_CONST, { .i64 = AV_ROUND_NEAR_INF }, 0, 0, V|F, "round" }, +{ "eof_action", "action performed for last frame", OFFSET(eof_action), AV_OPT_TYPE_INT, { .i64 = EOF_ACTION_ROUND }, 0, EOF_ACTION_NB-1, V|F, "eof_action" }, +{ "round", "round similar to other frames", 0, AV_OPT_TYPE_CONST, { .i64 = EOF_ACTION_ROUND }, 0, 0, V|F, "eof_action" }, +{ "pass", "pass through last frame",0, AV_OPT_TYPE_CONST, { .i64 = EOF_ACTION_PASS }, 0, 0, V|F, "eof_action" }, { NULL } }; @@ -151,9 +161,11 @@ static int request_frame(AVFilterLink *outlink) /* This is the last frame, we may have to duplicate it to match * the last frame duration */ int j; +int eof_rounding = (s->eof_action == EOF_ACTION_PASS) ? AV_ROUND_UP : s->rounding; int delta = av_rescale_q_rnd(ctx->inputs[0]->current_pts - s->first_pts, ctx->inputs[0]->time_base, - outlink->time_base, s->rounding) - s->frames_out ; + outlink->time_base, eof_rounding) - s->frames_out; +av_log(ctx, AV_LOG_DEBUG, "EOF frames_out:%d delta:%d\n", s->frames_out, delta); /* if the delta is equal to 1, it means we just need to output * the last frame. Greater than 1 means we will need duplicate * delta-1 frames */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/filters: align order of fps filter options to implementation
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Oct 5 10:14:26 2017 +0200| [4f5fb7813423ae67d3a6897999cc97e02f75dee1] | committer: Tobias Rapp doc/filters: align order of fps filter options to implementation Align order of "start_time" option within fps filter documentation to actual implementation. Also fix some documentation cosmetics. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4f5fb7813423ae67d3a6897999cc97e02f75dee1 --- doc/filters.texi | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 601701f591..624e5cd01b 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -8669,13 +8669,21 @@ It accepts the following parameters: @item fps The desired output frame rate. The default is @code{25}. +@item start_time +Assume the first PTS should be the given value, in seconds. This allows for +padding/trimming at the start of stream. By default, no assumption is made +about the first frame's expected PTS, so no padding or trimming is done. +For example, this could be set to 0 to pad the beginning with duplicates of +the first frame if a video stream starts after the audio stream or to trim any +frames with a negative PTS. + @item round -Rounding method. +Timestamp (PTS) rounding method. Possible values are: @table @option @item zero -zero round towards 0 +round towards 0 @item inf round away from 0 @item down @@ -8687,18 +8695,10 @@ round to nearest @end table The default is @code{near}. -@item start_time -Assume the first PTS should be the given value, in seconds. This allows for -padding/trimming at the start of stream. By default, no assumption is made -about the first frame's expected PTS, so no padding or trimming is done. -For example, this could be set to 0 to pad the beginning with duplicates of -the first frame if a video stream starts after the audio stream or to trim any -frames with a negative PTS. - @end table Alternatively, the options can be specified as a flat string: -@var{fps}[:@var{round}]. +@var{fps}[:@var{start_time}[:@var{round}]]. See also the @ref{setpts} filter. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_fps: clean-up filter options
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Oct 5 10:18:57 2017 +0200| [0a499d6a57409926011e1952fcf7ca39224663d6] | committer: Tobias Rapp avfilter/vf_fps: clean-up filter options Add missing AV_OPT_FLAG_FILTERING_PARAM flag to "start_time" option. Fix indent of "round" named constants and clear unused field values. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0a499d6a57409926011e1952fcf7ca39224663d6 --- libavfilter/vf_fps.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c index 1e5d07e31c..a5e51c3bbb 100644 --- a/libavfilter/vf_fps.c +++ b/libavfilter/vf_fps.c @@ -65,13 +65,13 @@ typedef struct FPSContext { #define F AV_OPT_FLAG_FILTERING_PARAM static const AVOption fps_options[] = { { "fps", "A string describing desired output framerate", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, { .str = "25" }, 0, INT_MAX, V|F }, -{ "start_time", "Assume the first PTS should be this value.", OFFSET(start_time), AV_OPT_TYPE_DOUBLE, { .dbl = DBL_MAX}, -DBL_MAX, DBL_MAX, V }, +{ "start_time", "Assume the first PTS should be this value.", OFFSET(start_time), AV_OPT_TYPE_DOUBLE, { .dbl = DBL_MAX}, -DBL_MAX, DBL_MAX, V|F }, { "round", "set rounding method for timestamps", OFFSET(rounding), AV_OPT_TYPE_INT, { .i64 = AV_ROUND_NEAR_INF }, 0, 5, V|F, "round" }, -{ "zero", "round towards 0", OFFSET(rounding), AV_OPT_TYPE_CONST, { .i64 = AV_ROUND_ZERO }, 0, 5, V|F, "round" }, -{ "inf", "round away from 0",OFFSET(rounding), AV_OPT_TYPE_CONST, { .i64 = AV_ROUND_INF }, 0, 5, V|F, "round" }, -{ "down", "round towards -infty", OFFSET(rounding), AV_OPT_TYPE_CONST, { .i64 = AV_ROUND_DOWN }, 0, 5, V|F, "round" }, -{ "up", "round towards +infty", OFFSET(rounding), AV_OPT_TYPE_CONST, { .i64 = AV_ROUND_UP }, 0, 5, V|F, "round" }, -{ "near", "round to nearest", OFFSET(rounding), AV_OPT_TYPE_CONST, { .i64 = AV_ROUND_NEAR_INF }, 0, 5, V|F, "round" }, +{ "zero", "round towards 0", 0, AV_OPT_TYPE_CONST, { .i64 = AV_ROUND_ZERO }, 0, 0, V|F, "round" }, +{ "inf", "round away from 0", 0, AV_OPT_TYPE_CONST, { .i64 = AV_ROUND_INF }, 0, 0, V|F, "round" }, +{ "down", "round towards -infty",0, AV_OPT_TYPE_CONST, { .i64 = AV_ROUND_DOWN }, 0, 0, V|F, "round" }, +{ "up", "round towards +infty",0, AV_OPT_TYPE_CONST, { .i64 = AV_ROUND_UP }, 0, 0, V|F, "round" }, +{ "near", "round to nearest",0, AV_OPT_TYPE_CONST, { .i64 = AV_ROUND_NEAR_INF }, 0, 0, V|F, "round" }, { NULL } }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/wavenc: replace literal numbers with enum constants
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Fri Sep 29 16:28:47 2017 +0200| [c941e99b7f7ba16230aa72e644d519c33004dd47] | committer: Tobias Rapp avformat/wavenc: replace literal numbers with enum constants Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c941e99b7f7ba16230aa72e644d519c33004dd47 --- libavformat/wavenc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/wavenc.c b/libavformat/wavenc.c index 7f3059e99a..adb20cb215 100644 --- a/libavformat/wavenc.c +++ b/libavformat/wavenc.c @@ -331,7 +331,7 @@ static int wav_write_header(AVFormatContext *s) ffio_fill(pb, 0, 28); } -if (wav->write_peak != 2) { +if (wav->write_peak != PEAK_ONLY) { /* format header */ fmt = ff_start_tag(pb, "fmt "); if (ff_put_wav_header(s, pb, s->streams[0]->codecpar, 0) < 0) { @@ -363,7 +363,7 @@ static int wav_write_header(AVFormatContext *s) wav->maxpts = wav->last_duration = 0; wav->minpts = INT64_MAX; -if (wav->write_peak != 2) { +if (wav->write_peak != PEAK_ONLY) { /* info header */ ff_riff_write_info(s); @@ -381,7 +381,7 @@ static int wav_write_packet(AVFormatContext *s, AVPacket *pkt) AVIOContext *pb = s->pb; WAVMuxContext*wav = s->priv_data; -if (wav->write_peak != 2) +if (wav->write_peak != PEAK_ONLY) avio_write(pb, pkt->data, pkt->size); if (wav->write_peak) { @@ -426,7 +426,7 @@ static int wav_write_trailer(AVFormatContext *s) avio_flush(pb); if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) { -if (wav->write_peak != 2 && avio_tell(pb) - wav->data < UINT32_MAX) { +if (wav->write_peak != PEAK_ONLY && avio_tell(pb) - wav->data < UINT32_MAX) { ff_end_tag(pb, wav->data); avio_flush(pb); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: increase fuzz for refcmp filter tests
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Sep 28 09:15:41 2017 +0200| [792b1629a8818fa778ddea37342f4ba4eaf2ba47] | committer: Tobias Rapp fate: increase fuzz for refcmp filter tests Should fix failing tests on GNU/kFreeBSD x86_32. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=792b1629a8818fa778ddea37342f4ba4eaf2ba47 --- tests/fate/filter-video.mak | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index 78cd4711e6..c19f301ff8 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -750,16 +750,16 @@ fate-filter-meta-4560-rotate0: CMD = framecrc -flags +bitexact -c:a aac_fixed -i REFCMP_DEPS = FFMPEG LAVFI_INDEV TESTSRC2_FILTER AVGBLUR_FILTER METADATA_FILTER FATE_FILTER_SAMPLES-$(call ALLYES, $(REFCMP_DEPS) PSNR_FILTER) += fate-filter-refcmp-psnr-rgb -fate-filter-refcmp-psnr-rgb: CMD = refcmp_metadata psnr rgb24 +fate-filter-refcmp-psnr-rgb: CMD = refcmp_metadata psnr rgb24 0.001 FATE_FILTER_SAMPLES-$(call ALLYES, $(REFCMP_DEPS) PSNR_FILTER) += fate-filter-refcmp-psnr-yuv -fate-filter-refcmp-psnr-yuv: CMD = refcmp_metadata psnr yuv422p +fate-filter-refcmp-psnr-yuv: CMD = refcmp_metadata psnr yuv422p 0.0015 FATE_FILTER_SAMPLES-$(call ALLYES, $(REFCMP_DEPS) SSIM_FILTER) += fate-filter-refcmp-ssim-rgb -fate-filter-refcmp-ssim-rgb: CMD = refcmp_metadata ssim rgb24 +fate-filter-refcmp-ssim-rgb: CMD = refcmp_metadata ssim rgb24 0.015 FATE_FILTER_SAMPLES-$(call ALLYES, $(REFCMP_DEPS) SSIM_FILTER) += fate-filter-refcmp-ssim-yuv -fate-filter-refcmp-ssim-yuv: CMD = refcmp_metadata ssim yuv422p +fate-filter-refcmp-ssim-yuv: CMD = refcmp_metadata ssim yuv422p 0.015 FATE_SAMPLES_FFPROBE += $(FATE_METADATA_FILTER-yes) FATE_SAMPLES_FFMPEG += $(FATE_FILTER_SAMPLES-yes) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: add tests for psnr and ssim filter
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Tue Aug 29 14:45:13 2017 +0200| [bee01ee2ba2e62974447d5e8ea2afb27dbdb1e23] | committer: Tobias Rapp fate: add tests for psnr and ssim filter Metadata filter output is passed through an Awk script comparing floats against reference values with specified "fuzz" tolerance to account for architectural differences (e.g. x86-32 vs. x86-64). Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bee01ee2ba2e62974447d5e8ea2afb27dbdb1e23 --- tests/fate-run.sh | 9 + tests/fate/filter-video.mak | 14 tests/ref/fate/filter-refcmp-psnr-rgb | 45 tests/ref/fate/filter-refcmp-psnr-yuv | 45 tests/ref/fate/filter-refcmp-ssim-rgb | 30 tests/ref/fate/filter-refcmp-ssim-yuv | 30 tests/refcmp-metadata.awk | 64 +++ 7 files changed, 237 insertions(+) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 9aa9a22395..c5480c7ede 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -234,6 +234,15 @@ lavftest(){ ${base}/lavf-regression.sh $t lavf tests/vsynth1 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags" "$target_samples" } +refcmp_metadata(){ +refcmp=$1 +pixfmt=$2 +fuzz=${3:-0.001} +ffmpeg $FLAGS $ENC_OPTS \ +-lavfi "testsrc2=size=300x200:rate=1:duration=5,format=${pixfmt},split[ref][tmp];[tmp]avgblur=4[enc];[enc][ref]${refcmp},metadata=print:file=-" \ +-f null /dev/null | awk -v ref=${ref} -v fuzz=${fuzz} -f ${base}/refcmp-metadata.awk - +} + video_filter(){ filters=$1 shift diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index d1e13414f6..78cd4711e6 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -747,6 +747,20 @@ FATE_FILTER_SAMPLES-$(call ALLYES, MOV_DEMUXER H264_DECODER AAC_FIXED_DECODER PC fate-filter-meta-4560-rotate0: tests/data/file4560-override2rotate0.mov fate-filter-meta-4560-rotate0: CMD = framecrc -flags +bitexact -c:a aac_fixed -i $(TARGET_PATH)/tests/data/file4560-override2rotate0.mov +REFCMP_DEPS = FFMPEG LAVFI_INDEV TESTSRC2_FILTER AVGBLUR_FILTER METADATA_FILTER + +FATE_FILTER_SAMPLES-$(call ALLYES, $(REFCMP_DEPS) PSNR_FILTER) += fate-filter-refcmp-psnr-rgb +fate-filter-refcmp-psnr-rgb: CMD = refcmp_metadata psnr rgb24 + +FATE_FILTER_SAMPLES-$(call ALLYES, $(REFCMP_DEPS) PSNR_FILTER) += fate-filter-refcmp-psnr-yuv +fate-filter-refcmp-psnr-yuv: CMD = refcmp_metadata psnr yuv422p + +FATE_FILTER_SAMPLES-$(call ALLYES, $(REFCMP_DEPS) SSIM_FILTER) += fate-filter-refcmp-ssim-rgb +fate-filter-refcmp-ssim-rgb: CMD = refcmp_metadata ssim rgb24 + +FATE_FILTER_SAMPLES-$(call ALLYES, $(REFCMP_DEPS) SSIM_FILTER) += fate-filter-refcmp-ssim-yuv +fate-filter-refcmp-ssim-yuv: CMD = refcmp_metadata ssim yuv422p + FATE_SAMPLES_FFPROBE += $(FATE_METADATA_FILTER-yes) FATE_SAMPLES_FFMPEG += $(FATE_FILTER_SAMPLES-yes) FATE_FFMPEG += $(FATE_FILTER-yes) diff --git a/tests/ref/fate/filter-refcmp-psnr-rgb b/tests/ref/fate/filter-refcmp-psnr-rgb new file mode 100644 index 00..f06db575ac --- /dev/null +++ b/tests/ref/fate/filter-refcmp-psnr-rgb @@ -0,0 +1,45 @@ +frame:0pts:0 pts_time:0 +lavfi.psnr.mse.r=1381.80 +lavfi.psnr.psnr.r=16.73 +lavfi.psnr.mse.g=896.00 +lavfi.psnr.psnr.g=18.61 +lavfi.psnr.mse.b=277.38 +lavfi.psnr.psnr.b=23.70 +lavfi.psnr.mse_avg=851.73 +lavfi.psnr.psnr_avg=18.83 +frame:1pts:1 pts_time:1 +lavfi.psnr.mse.r=1380.37 +lavfi.psnr.psnr.r=16.73 +lavfi.psnr.mse.g=975.91 +lavfi.psnr.psnr.g=18.24 +lavfi.psnr.mse.b=435.72 +lavfi.psnr.psnr.b=21.74 +lavfi.psnr.mse_avg=930.67 +lavfi.psnr.psnr_avg=18.44 +frame:2pts:2 pts_time:2 +lavfi.psnr.mse.r=1403.20 +lavfi.psnr.psnr.r=16.66 +lavfi.psnr.mse.g=954.05 +lavfi.psnr.psnr.g=18.34 +lavfi.psnr.mse.b=494.22 +lavfi.psnr.psnr.b=21.19 +lavfi.psnr.mse_avg=950.49 +lavfi.psnr.psnr_avg=18.35 +frame:3pts:3 pts_time:3 +lavfi.psnr.mse.r=1452.80 +lavfi.psnr.psnr.r=16.51 +lavfi.psnr.mse.g=1001.02 +lavfi.psnr.psnr.g=18.13 +lavfi.psnr.mse.b=557.39 +lavfi.psnr.psnr.b=20.67 +lavfi.psnr.mse_avg=1003.74 +lavfi.psnr.psnr_avg=18.11 +frame:4pts:4 pts_time:4 +lavfi.psnr.mse.r=1401.25 +lavfi.psnr.psnr.r=16.67 +lavfi.psnr.mse.g=1009.80 +lavfi.psnr.psnr.g=18.09 +lavfi.psnr.mse.b=602.42 +lavfi.psnr.psnr.b=20.33 +lavfi.psnr.mse_avg=1004.49 +lavfi.psnr.psnr_avg=18.11 diff --git a/tests/ref/fate/filter-refcmp-psnr-yuv b/tests/ref/fate/filter-refcmp-psnr-yuv new file mode 100644 index 00..0e634ed0e4 --- /dev/null +++ b/tests/ref/fate/filter-refcmp-psnr-yuv @@ -0,0 +1,45 @@ +frame:0pts:0 pts_time:0 +lavfi.psnr.mse.y=222.06 +lavfi.psnr.psnr.y=24.67 +lavfi.psnr.mse.u=339.38 +lavfi.psnr.psnr.u=22.82 +l
[FFmpeg-cvslog] avfilter/f_metadata: avoid trailing whitespace in filter output
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Wed Sep 27 14:29:21 2017 +0200| [f102a4efcef33014d414f9bf4492a04feab20c82] | committer: Tobias Rapp avfilter/f_metadata: avoid trailing whitespace in filter output Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f102a4efcef33014d414f9bf4492a04feab20c82 --- libavfilter/f_metadata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index 23bc254a75..523a94d38c 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -314,14 +314,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) break; case METADATA_PRINT: if (!s->key && e) { -s->print(ctx, "frame:%-4"PRId64" pts:%-7s pts_time:%-7s\n", +s->print(ctx, "frame:%-4"PRId64" pts:%-7s pts_time:%s\n", inlink->frame_count_out, av_ts2str(frame->pts), av_ts2timestr(frame->pts, >time_base)); s->print(ctx, "%s=%s\n", e->key, e->value); while ((e = av_dict_get(*metadata, "", e, AV_DICT_IGNORE_SUFFIX)) != NULL) { s->print(ctx, "%s=%s\n", e->key, e->value); } } else if (e && e->value && (!s->value || (e->value && s->compare(s, e->value, s->value { -s->print(ctx, "frame:%-4"PRId64" pts:%-7s pts_time:%-7s\n", +s->print(ctx, "frame:%-4"PRId64" pts:%-7s pts_time:%s\n", inlink->frame_count_out, av_ts2str(frame->pts), av_ts2timestr(frame->pts, >time_base)); s->print(ctx, "%s=%s\n", s->key, e->value); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: add mxf_dv25/dvcpro50 regression tests
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Sep 14 15:23:04 2017 +0200| [147bface1a56385917515ce264ab28c6f1407a61] | committer: Tobias Rapp fate: add mxf_dv25/dvcpro50 regression tests Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=147bface1a56385917515ce264ab28c6f1407a61 --- tests/fate/avformat.mak | 2 ++ tests/fate/seek.mak | 4 +++ tests/lavf-regression.sh | 8 ++ tests/ref/lavf/mxf_dv25 | 3 +++ tests/ref/lavf/mxf_dvcpro50 | 3 +++ tests/ref/seek/lavf-mxf_dv25 | 53 tests/ref/seek/lavf-mxf_dvcpro50 | 53 7 files changed, 126 insertions(+) diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index f65ef76648..c9ea99ad1b 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -25,6 +25,8 @@ 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, DVVIDEO,PCM_S16LE, MXF)+= mxf_dv25 +FATE_LAVF-$(call ENCDEC2, DVVIDEO,PCM_S16LE, MXF)+= mxf_dvcpro50 FATE_LAVF-$(call ENCDEC2, DNXHD, PCM_S16LE, MXF_OPATOM MXF) += mxf_opatom FATE_LAVF-$(call ENCDEC2, DNXHD, PCM_S16LE, MXF_OPATOM MXF) += mxf_opatom_audio FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT)+= nut diff --git a/tests/fate/seek.mak b/tests/fate/seek.mak index 1a6e584987..c863b2aaa4 100644 --- a/tests/fate/seek.mak +++ b/tests/fate/seek.mak @@ -180,6 +180,8 @@ FATE_SEEK_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2, MPEG1SYSTEM MPEGPS) += mpg FATE_SEEK_LAVF-$(call ENCDEC, PCM_MULAW, PCM_MULAW) += mulaw FATE_SEEK_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF) += mxf FATE_SEEK_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF) += mxf_d10 +FATE_SEEK_LAVF-$(call ENCDEC2, DVVIDEO,PCM_S16LE, MXF) += mxf_dv25 +FATE_SEEK_LAVF-$(call ENCDEC2, DVVIDEO,PCM_S16LE, MXF) += mxf_dvcpro50 FATE_SEEK_LAVF-$(call ENCDEC2, DNXHD, PCM_S16LE, MXF_OPATOM MXF) += mxf_opatom FATE_SEEK_LAVF-$(call ENCDEC2, DNXHD, PCM_S16LE, MXF_OPATOM MXF) += mxf_opatom_audio FATE_SEEK_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT) += nut @@ -220,6 +222,8 @@ fate-seek-lavf-mpg: SRC = lavf/lavf.mpg fate-seek-lavf-mulaw: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-mxf_dv25: SRC = lavf/lavf.mxf_dv25 +fate-seek-lavf-mxf_dvcpro50: SRC = lavf/lavf.mxf_dvcpro50 fate-seek-lavf-mxf_opatom: SRC = lavf/lavf.mxf_opatom fate-seek-lavf-mxf_opatom_audio: SRC = lavf/lavf.mxf_opatom_audio fate-seek-lavf-nut: SRC = lavf/lavf.nut diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index d9026de021..45c877e4ac 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -90,6 +90,14 @@ 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 -vcodec 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_mxf_dv25" ]; then +do_lavf mxf_dv25 "-ar 48000 -ac 2" "-r 25 -vf scale=720:576,setdar=4/3 -vcodec dvvideo -pix_fmt yuv420p -b 25000k -top 0 -f mxf" +fi + +if [ -n "$do_mxf_dvcpro50" ]; then +do_lavf mxf_dvcpro50 "-ar 48000 -ac 2" "-r 25 -vf scale=720:576,setdar=16/9 -vcodec dvvideo -pix_fmt yuv422p -b 5k -top 0 -f mxf" +fi + if [ -n "$do_mxf_opatom" ]; then do_lavf mxf_opatom "" "-s 1920x1080 -vcodec dnxhd -pix_fmt yuv422p -vb 36M -f mxf_opatom -map 0" fi diff --git a/tests/ref/lavf/mxf_dv25 b/tests/ref/lavf/mxf_dv25 new file mode 100644 index 00..adecc07e70 --- /dev/null +++ b/tests/ref/lavf/mxf_dv25 @@ -0,0 +1,3 @@ +de98603ecc27c2f3cefd192d4820d3f4 *./tests/data/lavf/lavf.mxf_dv25 +3833389 ./tests/data/lavf/lavf.mxf_dv25 +./tests/data/lavf/lavf.mxf_dv25 CRC=0xbdaf7f52 diff --git a/tests/ref/lavf/mxf_dvcpro50 b/tests/ref/lavf/mxf_dvcpro50 new file mode 100644 index 00..1d0cf79996 --- /dev/null +++ b/tests/ref/lavf/mxf_dvcpro50 @@ -0,0 +1,3 @@ +6c9cb62911ac16c3b55f0ad0b052c05b *./tests/data/lavf/lavf.mxf_dvcpro50 +7430189 ./tests/data/lavf/lavf.mxf_dvcpro50 +./tests/data/lavf/lavf.mxf_dvcpro50 CRC=0xe3bbe4b4 diff --git a/tests/ref/seek/lavf-mxf
[FFmpeg-cvslog] avformat/mxfenc: cosmetic changes
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Sep 14 16:05:31 2017 +0200| [3ffd3b7f5f13080cdba7e8d6b5d9dd7c33ff2345] | committer: Tobias Rapp avformat/mxfenc: cosmetic changes Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3ffd3b7f5f13080cdba7e8d6b5d9dd7c33ff2345 --- libavformat/mxfenc.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index da4d7b4e8e..b8d3030c40 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -846,7 +846,7 @@ static void mxf_write_track(AVFormatContext *s, AVStream *st, enum MXFMetadataSe // write edit rate mxf_write_local_tag(pb, 8, 0x4B01); -if (st == mxf->timecode_track && s->oformat == _mxf_opatom_muxer){ +if (st == mxf->timecode_track && s->oformat == _mxf_opatom_muxer) { avio_wb32(pb, mxf->tc.rate.num); avio_wb32(pb, mxf->tc.rate.den); } else { @@ -882,7 +882,7 @@ static void mxf_write_common_fields(AVFormatContext *s, AVStream *st) // write duration mxf_write_local_tag(pb, 8, 0x0202); -if (st != mxf->timecode_track && s->oformat == _mxf_opatom_muxer && st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO){ +if (st != mxf->timecode_track && s->oformat == _mxf_opatom_muxer && st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) { avio_wb64(pb, mxf->body_offset / mxf->edit_unit_byte_count); } else { avio_wb64(pb, mxf->duration); @@ -1194,7 +1194,7 @@ static void mxf_write_generic_sound_common(AVFormatContext *s, AVStream *st, con mxf_write_generic_desc(s, st, key, size+duration_size+5+12+8+8); -if (duration_size > 0){ +if (duration_size > 0) { mxf_write_local_tag(pb, 8, 0x3002); avio_wb64(pb, mxf->body_offset / mxf->edit_unit_byte_count); } @@ -1328,7 +1328,7 @@ static void mxf_write_package(AVFormatContext *s, enum MXFMetadataSetType type, // write uid mxf_write_local_tag(pb, 16, 0x3C0A); mxf_write_uuid(pb, type, 0); -av_log(s,AV_LOG_DEBUG, "package type:%d\n", type); +av_log(s, AV_LOG_DEBUG, "package type:%d\n", type); PRINT_KEY(s, "package uid", pb->buf_ptr - 16); // write package umid @@ -1770,7 +1770,7 @@ AVPacket *pkt) sc->codec_ul = _essence_container_uls[sc->index].codec_ul; sc->aspect_ratio = (AVRational){ 16, 9 }; -if(s->oformat == _mxf_opatom_muxer){ +if (s->oformat == _mxf_opatom_muxer) { mxf->edit_unit_byte_count = frame_size; return 1; } @@ -1810,10 +1810,11 @@ static int mxf_parse_dv_frame(AVFormatContext *s, AVStream *st, AVPacket *pkt) stype= vs_pack[3] & 0x1f; pal = (vs_pack[3] >> 5) & 0x1; -if ((vsc_pack[2] & 0x07) == 0x02) +if ((vsc_pack[2] & 0x07) == 0x02) { sc->aspect_ratio = (AVRational){ 16, 9 }; -else +} else { sc->aspect_ratio = (AVRational){ 4, 3 }; +} sc->interlaced = (vsc_pack[3] >> 4) & 0x01; // TODO: fix dv encoder to set proper FF/FS value in VSC pack @@ -2097,7 +2098,7 @@ static int mxf_write_header(AVFormatContext *s) if (!s->nb_streams) return -1; -if (s->oformat == _mxf_opatom_muxer && s->nb_streams !=1){ +if (s->oformat == _mxf_opatom_muxer && s->nb_streams !=1) { av_log(s, AV_LOG_ERROR, "there must be exactly one stream for mxf opatom\n"); return -1; } @@ -2212,7 +2213,7 @@ static int mxf_write_header(AVFormatContext *s) } spf = ff_mxf_get_samples_per_frame(s, tbc); -if (!spf){ +if (!spf) { av_log(s, AV_LOG_ERROR, "Unsupported timecode frame rate %d/%d\n", tbc.den, tbc.num); return AVERROR(EINVAL); } @@ -2605,7 +2606,7 @@ static int mxf_write_footer(AVFormatContext *s) mxf_write_random_index_pack(s); if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) { -if (s->oformat == _mxf_opatom_muxer){ +if (s->oformat == _mxf_opatom_muxer) { /* rewrite body partition to update lengths */ avio_seek(pb, mxf->body_partition_offset[0], SEEK_SET); if ((err = mxf_write_opatom_body_partition(s)) < 0) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/mxfenc: fix aspect ratio when writing 16:9 DV frames
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Sep 14 14:03:28 2017 +0200| [35d6be199a55e906b517fdf561841d43cdd81e2a] | committer: Tobias Rapp avformat/mxfenc: fix aspect ratio when writing 16:9 DV frames Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35d6be199a55e906b517fdf561841d43cdd81e2a --- libavformat/mxfenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 7289e0b05b..da4d7b4e8e 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -1810,7 +1810,7 @@ static int mxf_parse_dv_frame(AVFormatContext *s, AVStream *st, AVPacket *pkt) stype= vs_pack[3] & 0x1f; pal = (vs_pack[3] >> 5) & 0x1; -if ((vs_pack[2] & 0x07) == 0x02) +if ((vsc_pack[2] & 0x07) == 0x02) sc->aspect_ratio = (AVRational){ 16, 9 }; else sc->aspect_ratio = (AVRational){ 4, 3 }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: add test for asetnsamples filter with padding disabled
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Mon Aug 7 11:55:39 2017 +0200| [d47159a42d8a0a370fd94b02f7f59e3d4787ddf4] | committer: Tobias Rapp fate: add test for asetnsamples filter with padding disabled Adds another test for asetnsamples filter where padding of the last frame is switched off. Renames the existing test to make the difference obvious. Tested-by: Michael Niedermayer <mich...@niedermayer.cc> Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d47159a42d8a0a370fd94b02f7f59e3d4787ddf4 --- tests/fate/filter-audio.mak| 13 +- tests/ref/fate/filter-asetnsamples-nopad | 523 + ...filter-asetnsamples => filter-asetnsamples-pad} | 0 3 files changed, 532 insertions(+), 4 deletions(-) diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 5035e8f073..35ad0f8d23 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -84,10 +84,15 @@ fate-filter-anequalizer: tests/data/filtergraphs/anequalizer fate-filter-anequalizer: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-anequalizer: CMD = framecrc -i $(SRC) -filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/anequalizer -FATE_AFILTER-$(call FILTERDEMDECENCMUX, ASETNSAMPLES, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-asetnsamples -fate-filter-asetnsamples: tests/data/asynth-44100-2.wav -fate-filter-asetnsamples: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav -fate-filter-asetnsamples: CMD = framecrc -i $(SRC) -af asetnsamples=512:p=1 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, ASETNSAMPLES, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-asetnsamples-pad +fate-filter-asetnsamples-pad: tests/data/asynth-44100-2.wav +fate-filter-asetnsamples-pad: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-asetnsamples-pad: CMD = framecrc -i $(SRC) -af asetnsamples=512:p=1 + +FATE_AFILTER-$(call FILTERDEMDECENCMUX, ASETNSAMPLES, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-asetnsamples-nopad +fate-filter-asetnsamples-nopad: tests/data/asynth-44100-2.wav +fate-filter-asetnsamples-nopad: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-asetnsamples-nopad: CMD = framecrc -i $(SRC) -af asetnsamples=512:p=0 FATE_AFILTER-$(call FILTERDEMDECENCMUX, ASETRATE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-asetrate fate-filter-asetrate: tests/data/asynth-44100-2.wav diff --git a/tests/ref/fate/filter-asetnsamples-nopad b/tests/ref/fate/filter-asetnsamples-nopad new file mode 100644 index 00..c1cc01a710 --- /dev/null +++ b/tests/ref/fate/filter-asetnsamples-nopad @@ -0,0 +1,523 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +#channel_layout_name 0: stereo +0, 0, 0, 512, 2048, 0xd2dbf701 +0,512,512, 512, 2048, 0xdb22f7bf +0, 1024, 1024, 512, 2048, 0x82a103be +0, 1536, 1536, 512, 2048, 0xa3c707d8 +0, 2048, 2048, 512, 2048, 0x8aaafb8f +0, 2560, 2560, 512, 2048, 0x4bdafefb +0, 3072, 3072, 512, 2048, 0x75a3e833 +0, 3584, 3584, 512, 2048, 0xc130091c +0, 4096, 4096, 512, 2048, 0x99d8f36d +0, 4608, 4608, 512, 2048, 0xaf6efa15 +0, 5120, 5120, 512, 2048, 0xff5f0506 +0, 5632, 5632, 512, 2048, 0xcba4fb5b +0, 6144, 6144, 512, 2048, 0x729309c6 +0, 6656, 6656, 512, 2048, 0x63cdeb09 +0, 7168, 7168, 512, 2048, 0x386cfccb +0, 7680, 7680, 512, 2048, 0x602100c8 +0, 8192, 8192, 512, 2048, 0x3573f565 +0, 8704, 8704, 512, 2048, 0x47b9fce7 +0, 9216, 9216, 512, 2048, 0xd1e90b7a +0, 9728, 9728, 512, 2048, 0xf4c3ef77 +0, 10240, 10240, 512, 2048, 0x59ebfe3f +0, 10752, 10752, 512, 2048, 0x02d4f161 +0, 11264, 11264, 512, 2048, 0xbbf5ff05 +0, 11776, 11776, 512, 2048, 0xe26a047c +0, 12288, 12288, 512, 2048, 0x5452f02b +0, 12800, 12800, 512, 2048, 0x961e1056 +0, 13312, 13312, 512, 2048, 0x9192f803 +0, 13824, 13824, 512, 2048, 0x08d7ff49 +0, 14336, 14336, 512, 2048, 0x7c64ee03 +0, 14848, 14848, 512, 2048, 0xd303f4ff +0, 15360, 15360, 512, 2048, 0xda5902be +0, 15872, 15872, 512, 2048, 0x4096fe6b +0, 16384, 16384, 512, 2048, 0x178e016a +0, 16896, 16896, 512, 2048, 0x046700ac +0, 17408, 17408, 512, 2048, 0x5f20f4ad +0, 17920, 17920, 512,
[FFmpeg-cvslog] ffprobe: use consistent string for unspecified color_range value
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Tue Aug 29 10:51:05 2017 +0200| [912b6af26e0d2ed25df62296aa1213a3a620efae] | committer: Tobias Rapp ffprobe: use consistent string for unspecified color_range value Makes the handling of unspecified/unknown color_range values on stream level consistent to the value used on frame level. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=912b6af26e0d2ed25df62296aa1213a3a620efae --- ffprobe.c | 8 tests/ref/fate/ffprobe_compact | 4 ++-- tests/ref/fate/ffprobe_csv | 4 ++-- tests/ref/fate/ffprobe_default | 4 ++-- tests/ref/fate/ffprobe_flat| 4 ++-- tests/ref/fate/ffprobe_ini | 4 ++-- tests/ref/fate/mxf-probe-dnxhd | 2 +- tests/ref/fate/mxf-probe-dv25 | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ffprobe.c b/ffprobe.c index ba10563b9d..b2e8949d9f 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -1925,11 +1925,11 @@ static void print_pkt_side_data(WriterContext *w, writer_print_section_footer(w); } -static void print_color_range(WriterContext *w, enum AVColorRange color_range, const char *fallback) +static void print_color_range(WriterContext *w, enum AVColorRange color_range) { const char *val = av_color_range_name(color_range); if (!val || color_range == AVCOL_RANGE_UNSPECIFIED) { -print_str_opt("color_range", fallback); +print_str_opt("color_range", "unknown"); } else { print_str("color_range", val); } @@ -2157,7 +2157,7 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream, print_int("top_field_first",frame->top_field_first); print_int("repeat_pict",frame->repeat_pict); -print_color_range(w, frame->color_range, "unknown"); +print_color_range(w, frame->color_range); print_color_space(w, frame->colorspace); print_primaries(w, frame->color_primaries); print_color_trc(w, frame->color_trc); @@ -2534,7 +2534,7 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id else print_str_opt("pix_fmt", "unknown"); print_int("level", par->level); -print_color_range(w, par->color_range, "N/A"); +print_color_range(w, par->color_range); print_color_space(w, par->color_space); print_color_trc(w, par->color_trc); print_primaries(w, par->color_primaries); diff --git a/tests/ref/fate/ffprobe_compact b/tests/ref/fate/ffprobe_compact index 910837d290..4a0f4ee776 100644 --- a/tests/ref/fate/ffprobe_compact +++ b/tests/ref/fate/ffprobe_compact @@ -27,6 +27,6 @@ frame|media_type=video|stream_index=1|key_frame=1|pkt_pts=6144|pkt_pts_time=0.12 packet|codec_type=video|stream_index=2|pts=6144|pts_time=0.12|dts=6144|dts_time=0.12|duration=2048|duration_time=0.04|convergence_duration=N/A|convergence_duration_time=N/A|size=3|pos=1023544|flags=K_ frame|media_type=video|stream_index=2|key_frame=1|pkt_pts=6144|pkt_pts_time=0.12|pkt_dts=6144|pkt_dts_time=0.12|best_effort_timestamp=6144|best_effort_timestamp_time=0.12|pkt_duration=2048|pkt_duration_time=0.04|pkt_pos=1023544|pkt_size=3|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified stream|index=0|codec_name=pcm_s16le|profile=unknown|codec_type=audio|codec_time_base=1/44100|codec_tag_string=PSD[16]|codec_tag=0x10445350|sample_fmt=s16|sample_rate=44100|channels=1|channel_layout=unknown|bits_per_sample=16|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/44100|start_pts=0|start_time=0.00|duration_ts=N/A|duration=N/A|bit_rate=705600|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=6|nb_read_packets=6|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|tag:E=mc²|tag:encoder=Lavc pcm_s16le -stream|index=1|codec_name=rawvideo|profile=unknown|codec_type=video|codec_time_base=1/25|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=320|height=240|coded_width=320|coded_height=240|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=4:3|pix_fmt=rgb24|level=-99|color_range=N/A|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|timecode=N/A|refs=1|id=N/A|r_frame_rate=25/1|
[FFmpeg-cvslog] fate: add tests for some video source filters
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Aug 17 14:40:40 2017 +0200| [b7101151b36c85b96da4976fe0c4f817e2ea3cfc] | committer: Tobias Rapp fate: add tests for some video source filters Adds FATE tests for the previously untested allrgb, allyuv, rgbtestsrc, smptebars, smptehdbars and yuvtestsrc filters. Also adds a test for testsrc2 filter with rgb+alpha. Tested-by: Michael Niedermayer <mich...@niedermayer.cc> Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b7101151b36c85b96da4976fe0c4f817e2ea3cfc --- tests/fate/filter-video.mak| 24 ++ tests/ref/fate/filter-allrgb | 10 tests/ref/fate/filter-allyuv | 10 tests/ref/fate/filter-rgbtestsrc | 10 tests/ref/fate/filter-smptebars| 10 tests/ref/fate/filter-smptehdbars | 10 tests/ref/fate/filter-testsrc2-rgba| 75 ++ tests/ref/fate/filter-yuvtestsrc-yuv444p | 10 tests/ref/fate/filter-yuvtestsrc-yuv444p12 | 10 9 files changed, 169 insertions(+) diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index 670d9ded56..620487872b 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -80,6 +80,30 @@ fate-filter-testsrc2-yuv444p: CMD = framecrc -lavfi testsrc2=r=7:d=10 -pix_fmt y FATE_FILTER-$(call ALLYES, TESTSRC2_FILTER) += fate-filter-testsrc2-rgb24 fate-filter-testsrc2-rgb24: CMD = framecrc -lavfi testsrc2=r=7:d=10 -pix_fmt rgb24 +FATE_FILTER-$(call ALLYES, LAVFI_INDEV TESTSRC2_FILTER) += fate-filter-testsrc2-rgba +fate-filter-testsrc2-rgba: CMD = framecrc -lavfi testsrc2=r=7:d=10 -pix_fmt rgba + +FATE_FILTER-$(call ALLYES, LAVFI_INDEV ALLRGB_FILTER) += fate-filter-allrgb +fate-filter-allrgb: CMD = framecrc -lavfi allrgb=rate=5:duration=1 -pix_fmt rgb24 + +FATE_FILTER-$(call ALLYES, LAVFI_INDEV ALLYUV_FILTER) += fate-filter-allyuv +fate-filter-allyuv: CMD = framecrc -lavfi allyuv=rate=5:duration=1 -pix_fmt yuv444p + +FATE_FILTER-$(call ALLYES, LAVFI_INDEV RGBTESTSRC_FILTER) += fate-filter-rgbtestsrc +fate-filter-rgbtestsrc: CMD = framecrc -lavfi rgbtestsrc=rate=5:duration=1 -pix_fmt rgb24 + +FATE_FILTER-$(call ALLYES, LAVFI_INDEV SMPTEBARS_FILTER) += fate-filter-smptebars +fate-filter-smptebars: CMD = framecrc -lavfi smptebars=rate=5:duration=1 -pix_fmt yuv420p + +FATE_FILTER-$(call ALLYES, LAVFI_INDEV SMPTEHDBARS_FILTER) += fate-filter-smptehdbars +fate-filter-smptehdbars: CMD = framecrc -lavfi smptehdbars=rate=5:duration=1 -pix_fmt yuv444p + +FATE_FILTER-$(call ALLYES, LAVFI_INDEV YUVTESTSRC_FILTER) += fate-filter-yuvtestsrc-yuv444p +fate-filter-yuvtestsrc-yuv444p: CMD = framecrc -lavfi yuvtestsrc=rate=5:duration=1 -pix_fmt yuv444p + +FATE_FILTER-$(call ALLYES, LAVFI_INDEV YUVTESTSRC_FILTER) += fate-filter-yuvtestsrc-yuv444p12 +fate-filter-yuvtestsrc-yuv444p12: CMD = framecrc -lavfi yuvtestsrc=rate=5:duration=1,format=yuv444p12 -pix_fmt yuv444p12le + FATE_FILTER-$(call ALLYES, AVDEVICE TESTSRC_FILTER FORMAT_FILTER CONCAT_FILTER SCALE_FILTER) += fate-filter-lavd-scalenorm fate-filter-lavd-scalenorm: tests/data/filtergraphs/scalenorm fate-filter-lavd-scalenorm: CMD = framecrc -f lavfi -graph_file $(TARGET_PATH)/tests/data/filtergraphs/scalenorm -i dummy diff --git a/tests/ref/fate/filter-allrgb b/tests/ref/fate/filter-allrgb new file mode 100644 index 00..b54efc5504 --- /dev/null +++ b/tests/ref/fate/filter-allrgb @@ -0,0 +1,10 @@ +#tb 0: 1/5 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 4096x4096 +#sar 0: 1/1 +0, 0, 0,1, 50331648, 0x9cc26aca +0, 1, 1,1, 50331648, 0x9cc26aca +0, 2, 2,1, 50331648, 0x9cc26aca +0, 3, 3,1, 50331648, 0x9cc26aca +0, 4, 4,1, 50331648, 0x9cc26aca diff --git a/tests/ref/fate/filter-allyuv b/tests/ref/fate/filter-allyuv new file mode 100644 index 00..477992f0ea --- /dev/null +++ b/tests/ref/fate/filter-allyuv @@ -0,0 +1,10 @@ +#tb 0: 1/5 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 4096x4096 +#sar 0: 1/1 +0, 0, 0,1, 50331648, 0x70b16aca +0, 1, 1,1, 50331648, 0x70b16aca +0, 2, 2,1, 50331648, 0x70b16aca +0, 3, 3,1, 50331648, 0x70b16aca +0, 4, 4,1, 50331648, 0x70b16aca diff --git a/tests/ref/fate/filter-rgbtestsrc b/tests/ref/fate/filter-rgbtestsrc new file mode 100644 index 00..e18d364fdb --- /dev/null +++ b/tests/ref/fate/filter-rgbtestsrc @@ -0,0 +1,10 @@ +#tb 0: 1/5 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 320x240 +#sar 0: 1/1 +0, 0, 0,1, 230400, 0x8c0018bb +0, 1, 1,1, 230400, 0x8c0018bb +0, 2,
[FFmpeg-cvslog] fate: update pixfmt_best test to check for endianness
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Tue Jul 25 09:42:21 2017 +0200| [60008c0fe94bd78be15097e5aceffd9fcb80c1b6] | committer: Tobias Rapp fate: update pixfmt_best test to check for endianness Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=60008c0fe94bd78be15097e5aceffd9fcb80c1b6 --- libavutil/tests/pixfmt_best.c | 14 ++ tests/ref/fate/pixfmt_best| 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/libavutil/tests/pixfmt_best.c b/libavutil/tests/pixfmt_best.c index a617633e9b..e98fcc19a5 100644 --- a/libavutil/tests/pixfmt_best.c +++ b/libavutil/tests/pixfmt_best.c @@ -117,6 +117,20 @@ int main(void) TEST(AV_PIX_FMT_GBRAP10, AV_PIX_FMT_RGB48); TEST(AV_PIX_FMT_GBRAP12, AV_PIX_FMT_RGB48); +// Formats containing the same data in different endianness. +TEST(AV_PIX_FMT_GRAY10BE,AV_PIX_FMT_GRAY10); +TEST(AV_PIX_FMT_GRAY10LE,AV_PIX_FMT_GRAY10); +TEST(AV_PIX_FMT_GRAY16BE,AV_PIX_FMT_GRAY16); +TEST(AV_PIX_FMT_GRAY16LE,AV_PIX_FMT_GRAY16); +TEST(AV_PIX_FMT_YUV422P10BE, AV_PIX_FMT_YUV422P10); +TEST(AV_PIX_FMT_YUV422P10LE, AV_PIX_FMT_YUV422P10); +TEST(AV_PIX_FMT_YUV444P16BE, AV_PIX_FMT_YUV444P16); +TEST(AV_PIX_FMT_YUV444P16LE, AV_PIX_FMT_YUV444P16); +TEST(AV_PIX_FMT_RGB565BE,AV_PIX_FMT_RGB565); +TEST(AV_PIX_FMT_RGB565LE,AV_PIX_FMT_RGB565); +TEST(AV_PIX_FMT_RGB48BE, AV_PIX_FMT_RGB48); +TEST(AV_PIX_FMT_RGB48LE, AV_PIX_FMT_RGB48); + // Opaque formats are least unlike each other. TEST(AV_PIX_FMT_DXVA2_VLD, AV_PIX_FMT_VDPAU); diff --git a/tests/ref/fate/pixfmt_best b/tests/ref/fate/pixfmt_best index 1118198098..699e2e4213 100644 --- a/tests/ref/fate/pixfmt_best +++ b/tests/ref/fate/pixfmt_best @@ -1 +1 @@ -60 tests passed, 0 tests failed. +72 tests passed, 0 tests failed. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat: remove obsolete commented-out DEBUG define
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Fri Jul 7 09:43:22 2017 +0200| [8bf9572e9a5432715785a02c6497f28da6822d72] | committer: Derek Buitenhuis avformat: remove obsolete commented-out DEBUG define Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Signed-off-by: Derek Buitenhuis <derek.buitenh...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8bf9572e9a5432715785a02c6497f28da6822d72 --- libavformat/avienc.c | 2 -- libavformat/segment.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/libavformat/avienc.c b/libavformat/avienc.c index e8c0c7159e..da3d3deb3b 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -19,8 +19,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -//#define DEBUG - #include #include "avformat.h" diff --git a/libavformat/segment.c b/libavformat/segment.c index 8ec3653b38..0e8bcddb00 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -24,8 +24,6 @@ * @url{http://tools.ietf.org/id/draft-pantos-http-live-streaming} */ -/* #define DEBUG */ - #include #include ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] tests/fate/fifo-muxer: update fifo-muxer dependencies
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu May 4 15:21:03 2017 +0200| [78f51ecb7411bdea5a07242bcc2c8b0283742c2e] | committer: Tobias Rapp tests/fate/fifo-muxer: update fifo-muxer dependencies Fixes fate when configured with --disable-network. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=78f51ecb7411bdea5a07242bcc2c8b0283742c2e --- tests/fate/fifo-muxer.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate/fifo-muxer.mak b/tests/fate/fifo-muxer.mak index ef8b3b3c7b..9c13954cf7 100644 --- a/tests/fate/fifo-muxer.mak +++ b/tests/fate/fifo-muxer.mak @@ -13,7 +13,7 @@ FATE_SAMPLES_FIFO_MUXER-$(call ALLYES, FIFO_MUXER, WAV_DEMUXER) += fate-fifo-mux fate-fifo-muxer-tst: libavformat/tests/fifo_muxer$(EXESUF) fate-fifo-muxer-tst: CMD = run libavformat/tests/fifo_muxer$(EXESUF) -FATE_FIFO_MUXER-$(CONFIG_FIFO_MUXER) += fate-fifo-muxer-tst +FATE_FIFO_MUXER-$(call ALLYES, FIFO_MUXER NETWORK) += fate-fifo-muxer-tst FATE_SAMPLES_FFMPEG += $(FATE_SAMPLES_FIFO_MUXER-yes) FATE_FFMPEG += $(FATE_FIFO_MUXER-yes) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
Re: [FFmpeg-cvslog] Revert "mjpegenc: disable huffman coding with AMV"
On 09.04.2017 22:38, Michael Niedermayer wrote: ffmpeg | branch: master | Michael Niedermayer| Sun Apr 9 21:51:33 2017 +0200| [724bb805ef8a6de0d9ef27a083ef501bdef2d453] | committer: Michael Niedermayer Revert "mjpegenc: disable huffman coding with AMV" This was the wrong patch This reverts commit 7f9b492d544ccef36f1d5d97a76d22502623d3c8. http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=724bb805ef8a6de0d9ef27a083ef501bdef2d453 --- libavcodec/mpegvideo_enc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 882cf09c0a..71a858fc72 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -399,9 +399,6 @@ FF_ENABLE_DEPRECATION_WARNINGS return AVERROR(EINVAL); } -if (s->huffman && avctx->codec_id == AV_CODEC_ID_AMV) -s->huffman = 0; - if (s->intra_dc_precision > (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO ? 3 : 0)) { av_log(avctx, AV_LOG_ERROR, "intra dc precision too large\n"); return AVERROR(EINVAL); The wrong patch was also committed to the release/3.3 branch. Also there is an open suggestion to the updated patch in https://ffmpeg.org/pipermail/ffmpeg-devel/2017-April/209802.html Regards, Tobias ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec: estimate output bitrate for uncompressed video codecs
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Mon Mar 6 08:53:28 2017 +0100| [205b8fd078e50aa3f7f401646dbb73de1bb35a10] | committer: Tobias Rapp avcodec: estimate output bitrate for uncompressed video codecs Allows to get a more realistic total bitrate (and estimated file size) in avi_write_header. Previously a static default value of 200k was assumed. Adds an internal helper function for bitrate guessing. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Reviewed-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=205b8fd078e50aa3f7f401646dbb73de1bb35a10 --- libavcodec/internal.h| 6 ++ libavcodec/r210enc.c | 15 +++ libavcodec/rawenc.c | 2 ++ libavcodec/utils.c | 21 + libavcodec/v210enc.c | 3 +++ libavcodec/v308enc.c | 3 +++ libavcodec/v408enc.c | 2 ++ libavcodec/v410enc.c | 3 +++ libavcodec/y41penc.c | 1 + tests/ref/fate/v410enc | 2 +- tests/ref/vsynth/vsynth1-bpp1| 2 +- tests/ref/vsynth/vsynth1-bpp15 | 2 +- tests/ref/vsynth/vsynth1-r210| 2 +- tests/ref/vsynth/vsynth1-rgb | 2 +- tests/ref/vsynth/vsynth1-v210| 2 +- tests/ref/vsynth/vsynth1-v210-10 | 2 +- tests/ref/vsynth/vsynth1-v308| 2 +- tests/ref/vsynth/vsynth1-v408| 2 +- tests/ref/vsynth/vsynth1-y41p| 2 +- tests/ref/vsynth/vsynth1-yuv | 2 +- tests/ref/vsynth/vsynth2-bpp1| 2 +- tests/ref/vsynth/vsynth2-bpp15 | 2 +- tests/ref/vsynth/vsynth2-r210| 2 +- tests/ref/vsynth/vsynth2-rgb | 2 +- tests/ref/vsynth/vsynth2-v210| 2 +- tests/ref/vsynth/vsynth2-v210-10 | 2 +- tests/ref/vsynth/vsynth2-v308| 2 +- tests/ref/vsynth/vsynth2-v408| 2 +- tests/ref/vsynth/vsynth2-y41p| 2 +- tests/ref/vsynth/vsynth2-yuv | 2 +- tests/ref/vsynth/vsynth3-bpp1| 2 +- tests/ref/vsynth/vsynth3-bpp15 | 2 +- tests/ref/vsynth/vsynth3-r210| 2 +- tests/ref/vsynth/vsynth3-rgb | 2 +- tests/ref/vsynth/vsynth3-v210| 2 +- tests/ref/vsynth/vsynth3-v210-10 | 2 +- tests/ref/vsynth/vsynth3-v308| 2 +- tests/ref/vsynth/vsynth3-v408| 2 +- tests/ref/vsynth/vsynth3-yuv | 2 +- tests/ref/vsynth/vsynth_lena-bpp1| 2 +- tests/ref/vsynth/vsynth_lena-bpp15 | 2 +- tests/ref/vsynth/vsynth_lena-r210| 2 +- tests/ref/vsynth/vsynth_lena-rgb | 2 +- tests/ref/vsynth/vsynth_lena-v210| 2 +- tests/ref/vsynth/vsynth_lena-v210-10 | 2 +- tests/ref/vsynth/vsynth_lena-v308| 2 +- tests/ref/vsynth/vsynth_lena-v408| 2 +- tests/ref/vsynth/vsynth_lena-y41p| 2 +- tests/ref/vsynth/vsynth_lena-yuv | 2 +- 49 files changed, 96 insertions(+), 40 deletions(-) diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 6e93eeb..e5f132a 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -363,4 +363,10 @@ int ff_side_data_set_encoder_stats(AVPacket *pkt, int quality, int64_t *error, i int ff_alloc_a53_sei(const AVFrame *frame, size_t prefix_len, void **data, size_t *sei_size); +/** + * Get an estimated video bitrate based on frame size, frame rate and coded + * bits per pixel. + */ +int64_t ff_guess_coded_bitrate(AVCodecContext *avctx); + #endif /* AVCODEC_INTERNAL_H */ diff --git a/libavcodec/r210enc.c b/libavcodec/r210enc.c index 65b3c06..a55e543 100644 --- a/libavcodec/r210enc.c +++ b/libavcodec/r210enc.c @@ -24,6 +24,18 @@ #include "internal.h" #include "bytestream.h" +static av_cold int encode_init(AVCodecContext *avctx) +{ +int aligned_width = FFALIGN(avctx->width, +avctx->codec_id == AV_CODEC_ID_R10K ? 1 : 64); + +avctx->bits_per_coded_sample = 32; +if (avctx->width > 0) +avctx->bit_rate = ff_guess_coded_bitrate(avctx) * aligned_width / avctx->width; + +return 0; +} + static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pic, int *got_packet) { @@ -73,6 +85,7 @@ AVCodec ff_r210_encoder = { .long_name = NULL_IF_CONFIG_SMALL("Uncompressed RGB 10-bit"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_R210, +.init = encode_init, .encode2= encode_frame, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_RGB48, AV_PIX_FMT_NONE }, .capabilities = AV_CODEC_CAP_INTRA_ONLY, @@ -84,6 +97,7 @@ AVCodec ff_r10k_encoder = { .long_name = NULL_IF_CONFIG_SMALL("AJA Kona 10-bit RGB Codec"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_R10K, +.init = en
[FFmpeg-cvslog] avformat/avidec: skip odml master index chunks in avi_sync
ffmpeg | branch: release/2.8 | Tobias Rapp <t.r...@noa-archive.com> | Fri Dec 23 14:50:16 2016 +0100| [3f3ee3e62fd6f1a62d4fe4ec7140a4f83fadd8ed] | committer: Michael Niedermayer avformat/avidec: skip odml master index chunks in avi_sync Fixes pts gaps when reading AVI files > 256GiB generated by FFmpeg. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> (cherry picked from commit 6d579d7c1bdc4126955cae7f385208e455685986) Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3f3ee3e62fd6f1a62d4fe4ec7140a4f83fadd8ed --- libavformat/avidec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index d2904ab..cbe6c85 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1187,7 +1187,8 @@ start_sync: if ((d[0] == 'i' && d[1] == 'x' && n < s->nb_streams) || // parse JUNK (d[0] == 'J' && d[1] == 'U' && d[2] == 'N' && d[3] == 'K') || -(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1')) { +(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1') || +(d[0] == 'i' && d[1] == 'n' && d[2] == 'd' && d[3] == 'x')) { avio_skip(pb, size); goto start_sync; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/avidec: skip odml master index chunks in avi_sync
ffmpeg | branch: release/3.1 | Tobias Rapp <t.r...@noa-archive.com> | Fri Dec 23 14:50:16 2016 +0100| [c26cbe6c2e00515063e3b069398e9628a815929b] | committer: Michael Niedermayer avformat/avidec: skip odml master index chunks in avi_sync Fixes pts gaps when reading AVI files > 256GiB generated by FFmpeg. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> (cherry picked from commit 6d579d7c1bdc4126955cae7f385208e455685986) Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c26cbe6c2e00515063e3b069398e9628a815929b --- libavformat/avidec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 3c5f3ec..ebb21bd 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1193,7 +1193,8 @@ start_sync: if ((d[0] == 'i' && d[1] == 'x' && n < s->nb_streams) || // parse JUNK (d[0] == 'J' && d[1] == 'U' && d[2] == 'N' && d[3] == 'K') || -(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1')) { +(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1') || +(d[0] == 'i' && d[1] == 'n' && d[2] == 'd' && d[3] == 'x')) { avio_skip(pb, size); goto start_sync; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/avidec: skip odml master index chunks in avi_sync
ffmpeg | branch: release/3.0 | Tobias Rapp <t.r...@noa-archive.com> | Fri Dec 23 14:50:16 2016 +0100| [a6639334df63639ae333f81c43098ed8ee360ee9] | committer: Michael Niedermayer avformat/avidec: skip odml master index chunks in avi_sync Fixes pts gaps when reading AVI files > 256GiB generated by FFmpeg. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> (cherry picked from commit 6d579d7c1bdc4126955cae7f385208e455685986) Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a6639334df63639ae333f81c43098ed8ee360ee9 --- libavformat/avidec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 7adb819..955b27b 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1191,7 +1191,8 @@ start_sync: if ((d[0] == 'i' && d[1] == 'x' && n < s->nb_streams) || // parse JUNK (d[0] == 'J' && d[1] == 'U' && d[2] == 'N' && d[3] == 'K') || -(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1')) { +(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1') || +(d[0] == 'i' && d[1] == 'n' && d[2] == 'd' && d[3] == 'x')) { avio_skip(pb, size); goto start_sync; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/muxers: add AVI muxer documentation
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Jan 5 11:17:39 2017 +0100| [c778a9657dc8a425ac65f89d81d64709f2090a9f] | committer: Tobias Rapp doc/muxers: add AVI muxer documentation Reviewed-by: Michael Niedermayer <mich...@niedermayer.cc> Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c778a9657dc8a425ac65f89d81d64709f2090a9f --- doc/muxers.texi | 33 + 1 file changed, 33 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index 26a8f2d..4372078 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -57,6 +57,39 @@ fragmentation or muxer overhead depending on your source. Default value is @end table +@anchor{avi} +@section avi + +Audio Video Interleaved muxer. + +@subsection Options + +It accepts the following options: + +@table @option +@item reserve_index_space +Reserve the specified amount of bytes for the OpenDML master index of each +stream within the file header. By default additional master indexes are +embedded within the data packets if there is no space left in the first master +index and are linked together as a chain of indexes. This index structure can +cause problems for some use cases, e.g. third-party software strictly relying +on the OpenDML index specification or when file seeking is slow. Reserving +enough index space in the file header avoids these problems. + +The required index space depends on the output file size and should be about 16 +bytes per gigabyte. When this option is omitted or set to zero the necessary +index space is guessed. + +@item write_channel_mask +Write the channel layout mask into the audio stream header. + +This option is enabled by default. Disabling the channel mask can be useful in +specific scenarios, e.g. when merging multiple audio streams into one for +compatibility with software that only supports a single audio stream in AVI +(see @ref{amerge,,the "amerge" section in the ffmpeg-filters manual,ffmpeg-filters}). + +@end table + @anchor{chromaprint} @section chromaprint ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/avienc: add reserve_index_space option
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Wed Jan 25 09:53:03 2017 +0100| [e65db4ce5966506d957032ef30545419801ae7dc] | committer: Tobias Rapp avformat/avienc: add reserve_index_space option Allows the user to reserve space for the ODML master index. A sufficient sized master index in the AVI header avoids storing follow-up master indexes within the 'movi' data later. If the option is omitted or zero the index size is estimated from output duration and bitrate. Reviewed-by: Michael Niedermayer <mich...@niedermayer.cc> Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e65db4ce5966506d957032ef30545419801ae7dc --- libavformat/avi.h | 1 - libavformat/avienc.c | 68 ++- libavformat/version.h | 2 +- 3 files changed, 63 insertions(+), 8 deletions(-) diff --git a/libavformat/avi.h b/libavformat/avi.h index af21f2c..b1711f0 100644 --- a/libavformat/avi.h +++ b/libavformat/avi.h @@ -29,7 +29,6 @@ #define AVIF_COPYRIGHTED0x0002 #define AVI_MAX_RIFF_SIZE 0x4000LL -#define AVI_MASTER_INDEX_SIZE 256 #define AVI_MAX_STREAM_COUNT100 /* stream header flags */ diff --git a/libavformat/avienc.c b/libavformat/avienc.c index fd16fff..4b042a9 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -21,6 +21,8 @@ //#define DEBUG +#include + #include "avformat.h" #include "internal.h" #include "avi.h" @@ -29,6 +31,7 @@ #include "mpegts.h" #include "libavformat/avlanguage.h" #include "libavutil/avstring.h" +#include "libavutil/avutil.h" #include "libavutil/internal.h" #include "libavutil/intreadwrite.h" #include "libavutil/dict.h" @@ -51,6 +54,9 @@ typedef struct AVIIentry { } AVIIentry; #define AVI_INDEX_CLUSTER_SIZE 16384 +#define AVI_MASTER_INDEX_PREFIX_SIZE(8+2+1+1+4+8+4+4) +#define AVI_MASTER_INDEX_ENTRY_SIZE 16 /* bytes per entry */ +#define AVI_MASTER_INDEX_SIZE_DEFAULT 256 /* number of entries */ typedef struct AVIIndex { int64_t indx_start; @@ -66,6 +72,8 @@ typedef struct AVIContext { int64_t riff_start, movi_list, odml_list; int64_t frames_hdr_all; int riff_id; +int reserve_index_space; +int master_index_max_size; int write_channel_mask; } AVIContext; @@ -134,6 +142,21 @@ static int avi_add_ientry(AVFormatContext *s, int stream_index, char *tag, return 0; } +static av_cold int avi_init(struct AVFormatContext *s) +{ +AVIContext *avi = s->priv_data; + +if (avi->reserve_index_space > 0) { +avi->master_index_max_size = (avi->reserve_index_space - AVI_MASTER_INDEX_PREFIX_SIZE) / AVI_MASTER_INDEX_ENTRY_SIZE; +avi->master_index_max_size = FFMAX(avi->master_index_max_size, 16); +} else +avi->master_index_max_size = AVI_MASTER_INDEX_SIZE_DEFAULT; +av_log(s, AV_LOG_DEBUG, "reserve_index_space:%d master_index_max_size:%d\n", + avi->reserve_index_space, avi->master_index_max_size); + +return 1; /* stream initialization continues in avi_write_header */ +} + static int64_t avi_start_new_riff(AVFormatContext *s, AVIOContext *pb, const char *riff_tag, const char *list_tag) { @@ -210,6 +233,7 @@ static int avi_write_counters(AVFormatContext *s, int riff_id) static void write_odml_master(AVFormatContext *s, int stream_index) { AVIOContext *pb = s->pb; +AVIContext *avi = s->priv_data; AVStream *st = s->streams[stream_index]; AVCodecParameters *par = st->codecpar; AVIStream *avist = st->priv_data; @@ -229,7 +253,7 @@ static void write_odml_master(AVFormatContext *s, int stream_index) /* dwChunkId */ avio_wl64(pb, 0); /* dwReserved[3] */ avio_wl32(pb, 0); /* Must be 0.*/ -for (j = 0; j < AVI_MASTER_INDEX_SIZE * 2; j++) +for (j = 0; j < avi->master_index_max_size * 2; j++) avio_wl64(pb, 0); ff_end_tag(pb, avist->indexes.indx_start); } @@ -239,6 +263,7 @@ static int avi_write_header(AVFormatContext *s) AVIContext *avi = s->priv_data; AVIOContext *pb = s->pb; int bitrate, n, i, nb_frames, au_byterate, au_ssize, au_scale; +int64_t max_stream_duration = 0; AVCodecParameters *video_par; AVStream *video_st = NULL; int64_t list1, list2, strh, strf; @@ -269,13 +294,34 @@ static int avi_write_header(AVFormatContext *s) video_par = NULL; for (n = 0; n < s->nb_streams; n++) { AVCodecParameters *par = s->streams[n]->codecpar; -bitrate += par->bit_rate; +AVStream *st = s->streams[n]; +bitrate = FFMIN(bitrate + par->bit_rate, INT32_MAX); +if (st->duration > 0) { +int64_
[FFmpeg-cvslog] avformat/Makefile: fix compilation of testprogs when networking is disabled
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Wed Jan 25 14:57:24 2017 +0100| [ec33ade7d300e7b300797b191c4aabaee3c8] | committer: Tobias Rapp avformat/Makefile: fix compilation of testprogs when networking is disabled Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ec33ade7d300e7b300797b191c4aabaee3c8 --- libavformat/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/Makefile b/libavformat/Makefile index 478c06b..fc2d760 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -598,7 +598,8 @@ TESTPROGS = seek \ url \ # async \ -TESTPROGS-$(CONFIG_FIFO_MUXER) += fifo_muxer +FIFO-MUXER-TESTPROGS-$(CONFIG_NETWORK) += fifo_muxer +TESTPROGS-$(CONFIG_FIFO_MUXER) += $(FIFO-MUXER-TESTPROGS-yes) TESTPROGS-$(CONFIG_FFRTMPCRYPT_PROTOCOL) += rtmpdh TESTPROGS-$(CONFIG_MOV_MUXER)+= movenc TESTPROGS-$(CONFIG_NETWORK) += noproxy ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/avidec: skip odml master index chunks in avi_sync
ffmpeg | branch: release/3.2 | Tobias Rapp <t.r...@noa-archive.com> | Fri Dec 23 14:50:16 2016 +0100| [d5154c055bab178287f44a3625cff0e57c448b84] | committer: Michael Niedermayer avformat/avidec: skip odml master index chunks in avi_sync Fixes pts gaps when reading AVI files > 256GiB generated by FFmpeg. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> (cherry picked from commit 6d579d7c1bdc4126955cae7f385208e455685986) Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d5154c055bab178287f44a3625cff0e57c448b84 --- libavformat/avidec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index e5a292e..ebd14ab 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1203,7 +1203,8 @@ start_sync: if ((d[0] == 'i' && d[1] == 'x' && n < s->nb_streams) || // parse JUNK (d[0] == 'J' && d[1] == 'U' && d[2] == 'N' && d[3] == 'K') || -(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1')) { +(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1') || +(d[0] == 'i' && d[1] == 'n' && d[2] == 'd' && d[3] == 'x')) { avio_skip(pb, size); goto start_sync; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffmpeg: pass output stream duration as a hint to the muxer
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Wed Jan 18 10:27:01 2017 +0100| [c324e2c5db26cb1ac936b192dc1ac86f7b6db45c] | committer: Michael Niedermayer ffmpeg: pass output stream duration as a hint to the muxer Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c324e2c5db26cb1ac936b192dc1ac86f7b6db45c --- ffmpeg.c | 9 + libavformat/avformat.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/ffmpeg.c b/ffmpeg.c index 6d1e358..977708c 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -2908,6 +2908,10 @@ static int init_output_stream_streamcopy(OutputStream *ost) if (ost->st->time_base.num <= 0 || ost->st->time_base.den <= 0) ost->st->time_base = av_add_q(av_stream_get_codec_timebase(ost->st), (AVRational){0, 1}); +// copy estimated duration as a hint to the muxer +if (ost->st->duration <= 0 && ist->st->duration > 0) +ost->st->duration = av_rescale_q(ist->st->duration, ist->st->time_base, ost->st->time_base); + // copy disposition ost->st->disposition = ist->st->disposition; @@ -,6 +3337,11 @@ static int init_output_stream(OutputStream *ost, char *error, int error_len) // copy timebase while removing common factors if (ost->st->time_base.num <= 0 || ost->st->time_base.den <= 0) ost->st->time_base = av_add_q(ost->enc_ctx->time_base, (AVRational){0, 1}); + +// copy estimated duration as a hint to the muxer +if (ost->st->duration <= 0 && ist && ist->st->duration > 0) +ost->st->duration = av_rescale_q(ist->st->duration, ist->st->time_base, ost->st->time_base); + ost->st->codec->codec= ost->enc_ctx->codec; } else if (ost->stream_copy) { ret = init_output_stream_streamcopy(ost); diff --git a/libavformat/avformat.h b/libavformat/avformat.h index af257e4..ebb0e05 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -930,6 +930,9 @@ typedef struct AVStream { * Decoding: duration of the stream, in stream time base. * If a source file does not specify a duration, but does specify * a bitrate, this value will be estimated from bitrate and file size. + * + * Encoding: May be set by the caller before avformat_write_header() to + * provide a hint to the muxer about the estimated duration. */ int64_t duration; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/avidec: clean-up identifier names
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Dec 22 14:16:30 2016 +0100| [5796048f6a1e3d9d16413e81967f8fd2fa2c4c7e] | committer: Michael Niedermayer avformat/avidec: clean-up identifier names Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5796048f6a1e3d9d16413e81967f8fd2fa2c4c7e --- libavformat/avidec.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 4a054ee..abe8c98 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -160,11 +160,11 @@ static int get_riff(AVFormatContext *s, AVIOContext *pb) return 0; } -static int read_braindead_odml_indx(AVFormatContext *s, int frame_num) +static int read_odml_index(AVFormatContext *s, int frame_num) { AVIContext *avi = s->priv_data; AVIOContext *pb = s->pb; -int longs_pre_entry = avio_rl16(pb); +int longs_per_entry = avio_rl16(pb); int index_sub_type = avio_r8(pb); int index_type = avio_r8(pb); int entries_in_use = avio_rl32(pb); @@ -179,9 +179,9 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num) int64_t filesize = avi->fsize; av_log(s, AV_LOG_TRACE, -"longs_pre_entry:%d index_type:%d entries_in_use:%d " +"longs_per_entry:%d index_type:%d entries_in_use:%d " "chunk_id:%X base:%16"PRIX64" frame_num:%d\n", -longs_pre_entry, +longs_per_entry, index_type, entries_in_use, chunk_id, @@ -198,7 +198,7 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num) avio_rl32(pb); -if (index_type && longs_pre_entry != 2) +if (index_type && longs_per_entry != 2) return AVERROR_INVALIDDATA; if (index_type > 1) return AVERROR_INVALIDDATA; @@ -253,7 +253,7 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num) if (avio_seek(pb, offset + 8, SEEK_SET) < 0) return -1; avi->odml_depth++; -read_braindead_odml_indx(s, frame_num); +read_odml_index(s, frame_num); avi->odml_depth--; frame_num += duration; @@ -950,7 +950,7 @@ FF_ENABLE_DEPRECATION_WARNINGS pos = avio_tell(pb); if (pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX) && avi->use_odml && -read_braindead_odml_indx(s, 0) < 0 && +read_odml_index(s, 0) < 0 && (s->error_recognition & AV_EF_EXPLODE)) goto fail; avio_seek(pb, pos + size, SEEK_SET); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/avidec: skip odml master index chunks in avi_sync
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Fri Dec 23 14:50:16 2016 +0100| [6d579d7c1bdc4126955cae7f385208e455685986] | committer: Michael Niedermayer avformat/avidec: skip odml master index chunks in avi_sync Fixes pts gaps when reading AVI files > 256GiB generated by FFmpeg. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6d579d7c1bdc4126955cae7f385208e455685986 --- libavformat/avidec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index d465965..4a054ee 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1211,7 +1211,8 @@ start_sync: if ((d[0] == 'i' && d[1] == 'x' && n < s->nb_streams) || // parse JUNK (d[0] == 'J' && d[1] == 'U' && d[2] == 'N' && d[3] == 'K') || -(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1')) { +(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1') || +(d[0] == 'i' && d[1] == 'n' && d[2] == 'd' && d[3] == 'x')) { avio_skip(pb, size); goto start_sync; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffmpeg: assert return value is initialized
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Nov 24 15:45:00 2016 +0100| [4d57ca51d7afb05bfa8c9a889822253dfc239a0d] | committer: Michael Niedermayer ffmpeg: assert return value is initialized Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4d57ca51d7afb05bfa8c9a889822253dfc239a0d --- ffmpeg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ffmpeg.c b/ffmpeg.c index c47a824..e4890a4 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -2070,6 +2070,7 @@ static int send_frame_to_filters(InputStream *ist, AVFrame *decoded_frame) int i, ret; AVFrame *f; +av_assert1(ist->nb_filters > 0); /* ensure ret is initialized */ for (i = 0; i < ist->nb_filters; i++) { if (i < ist->nb_filters - 1) { f = ist->filter_frame; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: Add MXF D10/DNXHD/DV25 probe tests
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Tue Oct 25 10:06:15 2016 +0200| [03a6feb2137d14bc55a8fb9d9fca94bdaf0a7b16] | committer: Michael Niedermayer fate: Add MXF D10/DNXHD/DV25 probe tests Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=03a6feb2137d14bc55a8fb9d9fca94bdaf0a7b16 --- tests/fate/mxf.mak | 23 +- tests/ref/fate/mxf-probe-d10 | 108 tests/ref/fate/mxf-probe-dnxhd | 182 + tests/ref/fate/mxf-probe-dv25 | 149 + 4 files changed, 461 insertions(+), 1 deletion(-) diff --git a/tests/fate/mxf.mak b/tests/fate/mxf.mak index 124c250..201cb93 100644 --- a/tests/fate/mxf.mak +++ b/tests/fate/mxf.mak @@ -14,7 +14,28 @@ fate-mxf-metadata-source-ref1: CMD = fmtstdout ffmetadata -i $(TARGET_SAMPLES)/m FATE_MXF += fate-mxf-metadata-source-ref2 fate-mxf-metadata-source-ref2: CMD = fmtstdout ffmetadata -i $(TARGET_SAMPLES)/mxf/track_02_a01.mxf -fflags +bitexact -flags +bitexact -map 0:0 -map 0:1 -map 0:3 -map_metadata:g -1 +# +# Tests probing MXF format and stream properties +# +PROBE_FORMAT_STREAMS_COMMAND = \ +ffprobe$(PROGSSUF)$(EXESUF) -show_entries format=format_name,duration,bit_rate:format_tags:streams:stream_tags \ +-print_format default -bitexact -v 0 + +FATE_MXF_PROBE-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF) += fate-mxf-probe-d10 +fate-mxf-probe-d10: SRC = $(TARGET_SAMPLES)/mxf/Sony-1.mxf +fate-mxf-probe-d10: CMD = run $(PROBE_FORMAT_STREAMS_COMMAND) -i "$(SRC)" + +FATE_MXF_PROBE-$(call ENCDEC, DNXHD, MXF) += fate-mxf-probe-dnxhd +fate-mxf-probe-dnxhd: SRC = $(TARGET_SAMPLES)/mxf/multiple_components.mxf +fate-mxf-probe-dnxhd: CMD = run $(PROBE_FORMAT_STREAMS_COMMAND) -i "$(SRC)" + +FATE_MXF_PROBE-$(call ENCDEC2, DVVIDEO, PCM_S16LE, MXF) += fate-mxf-probe-dv25 +fate-mxf-probe-dv25: SRC = $(TARGET_SAMPLES)/mxf/Avid-5.mxf +fate-mxf-probe-dv25: CMD = run $(PROBE_FORMAT_STREAMS_COMMAND) -i "$(SRC)" + FATE_MXF-$(CONFIG_MXF_DEMUXER) += $(FATE_MXF) FATE_SAMPLES_AVCONV += $(FATE_MXF-yes) -fate-mxf: $(FATE_MXF-yes) +FATE_SAMPLES_FFPROBE += $(FATE_MXF_PROBE-yes) + +fate-mxf: $(FATE_MXF-yes) $(FATE_MXF_PROBE-yes) diff --git a/tests/ref/fate/mxf-probe-d10 b/tests/ref/fate/mxf-probe-d10 new file mode 100644 index 000..30ceaaf --- /dev/null +++ b/tests/ref/fate/mxf-probe-d10 @@ -0,0 +1,108 @@ +[STREAM] +index=0 +codec_name=mpeg2video +profile=0 +codec_type=video +codec_time_base=1/25 +codec_tag_string=[0][0][0][0] +codec_tag=0x +width=720 +height=608 +coded_width=0 +coded_height=0 +has_b_frames=0 +sample_aspect_ratio=152:135 +display_aspect_ratio=4:3 +pix_fmt=yuv422p +level=5 +color_range=tv +color_space=unknown +color_transfer=unknown +color_primaries=unknown +chroma_location=topleft +field_order=tt +timecode=N/A +refs=1 +id=N/A +r_frame_rate=25/1 +avg_frame_rate=25/1 +time_base=1/25 +start_pts=0 +start_time=0.00 +duration_ts=4 +duration=0.16 +bit_rate=5000 +max_bit_rate=N/A +bits_per_raw_sample=N/A +nb_frames=N/A +nb_read_frames=N/A +nb_read_packets=N/A +DISPOSITION:default=0 +DISPOSITION:dub=0 +DISPOSITION:original=0 +DISPOSITION:comment=0 +DISPOSITION:lyrics=0 +DISPOSITION:karaoke=0 +DISPOSITION:forced=0 +DISPOSITION:hearing_impaired=0 +DISPOSITION:visual_impaired=0 +DISPOSITION:clean_effects=0 +DISPOSITION:attached_pic=0 +DISPOSITION:timed_thumbnails=0 +TAG:file_package_umid=0x060A2B340101010501010D131300AE86B20091310580080046A54011 +[/STREAM] +[STREAM] +index=1 +codec_name=pcm_s16le +profile=unknown +codec_type=audio +codec_time_base=1/48000 +codec_tag_string=[0][0][0][0] +codec_tag=0x +sample_fmt=s16 +sample_rate=48000 +channels=8 +channel_layout=unknown +bits_per_sample=16 +id=N/A +r_frame_rate=0/0 +avg_frame_rate=0/0 +time_base=1/48000 +start_pts=0 +start_time=0.00 +duration_ts=8562 +duration=0.178375 +bit_rate=6144000 +max_bit_rate=N/A +bits_per_raw_sample=N/A +nb_frames=N/A +nb_read_frames=N/A +nb_read_packets=N/A +DISPOSITION:default=0 +DISPOSITION:dub=0 +DISPOSITION:original=0 +DISPOSITION:comment=0 +DISPOSITION:lyrics=0 +DISPOSITION:karaoke=0 +DISPOSITION:forced=0 +DISPOSITION:hearing_impaired=0 +DISPOSITION:visual_impaired=0 +DISPOSITION:clean_effects=0 +DISPOSITION:attached_pic=0 +DISPOSITION:timed_thumbnails=0 +TAG:file_package_umid=0x060A2B340101010501010D131300AE86B20091310580080046A54011 +[/STREAM] +[FORMAT] +format_name=mxf +duration=0.178375 +bit_rate=56419744 +TAG:uid=0086b200-9131-0580--080046a54011 +TAG:generation_uid=b486b200-9131-0580--080046a54011 +TAG:company_name=SONY +TAG:product_name=eVTR +TAG:product_version=1.00 +TAG:product_uid=060e2b34-0401-0106-0e06-012001010100 +TAG:modification_date=2004-07-05T21:39:00.00Z +TAG:material_package_umid=0x060A2B340101010501010D131300A886
[FFmpeg-cvslog] avformat/mxfdec: Detect field_order based on video_line_map
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Wed Oct 19 14:35:20 2016 +0200| [e3196b686233bed3009248cb1ab7f0628ede6a2f] | committer: Michael Niedermayer avformat/mxfdec: Detect field_order based on video_line_map Read video_line_map from MXF generic picture essence descriptor and use it to derive the coded field order. Use field_dominance to derive the display field order from coded field order. If field_dominance is not available the default value "1" is used as defined in SMPTE S377-1. Fixes field_order detection for a bunch of DV/DVCPRO files. The heuristic for deriving coded field order from video_line_map is inspired by MediaInfo. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e3196b686233bed3009248cb1ab7f0628ede6a2f --- libavformat/mxfdec.c | 75 +--- 1 file changed, 60 insertions(+), 15 deletions(-) diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 1939761..8332362 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -173,8 +173,10 @@ typedef struct MXFDescriptor { int width; int height; /* Field height, not frame height */ int frame_layout; /* See MXFFrameLayout enum */ -#define MXF_TFF 1 -#define MXF_BFF 2 +int video_line_map[2]; +#define MXF_FIELD_DOMINANCE_DEFAULT 0 +#define MXF_FIELD_DOMINANCE_FF 1 /* coded first, displayed first */ +#define MXF_FIELD_DOMINANCE_FL 2 /* coded first, displayed last */ int field_dominance; int channels; int bits_per_sample; @@ -968,6 +970,8 @@ static void mxf_read_pixel_layout(AVIOContext *pb, MXFDescriptor *descriptor) static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int size, UID uid, int64_t klv_offset) { MXFDescriptor *descriptor = arg; +int entry_count, entry_size; + switch(tag) { case 0x3F01: return mxf_read_strong_ref_array(pb, >sub_descriptors_refs, @@ -996,6 +1000,21 @@ static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int case 0x320C: descriptor->frame_layout = avio_r8(pb); break; +case 0x320D: +entry_count = avio_rb32(pb); +entry_size = avio_rb32(pb); +if (entry_size == 4) { +if (entry_count > 0) +descriptor->video_line_map[0] = avio_rb32(pb); +else +descriptor->video_line_map[0] = 0; +if (entry_count > 1) +descriptor->video_line_map[1] = avio_rb32(pb); +else +descriptor->video_line_map[1] = 0; +} else +av_log(NULL, AV_LOG_WARNING, "VideoLineMap element size %d currently not supported\n", entry_size); +break; case 0x320E: descriptor->aspect_ratio.num = avio_rb32(pb); descriptor->aspect_ratio.den = avio_rb32(pb); @@ -2044,19 +2063,45 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) case SegmentedFrame: st->codecpar->field_order = AV_FIELD_PROGRESSIVE; case SeparateFields: -switch (descriptor->field_dominance) { -case MXF_TFF: -st->codecpar->field_order = AV_FIELD_TT; -break; -case MXF_BFF: -st->codecpar->field_order = AV_FIELD_BB; -break; -default: -avpriv_request_sample(mxf->fc, - "Field dominance %d support", - descriptor->field_dominance); -case 0: // we already have many samples with field_dominance == unknown -break; +av_log(mxf->fc, AV_LOG_DEBUG, "video_line_map: (%d, %d), field_dominance: %d\n", + descriptor->video_line_map[0], descriptor->video_line_map[1], + descriptor->field_dominance); +if ((descriptor->video_line_map[0] > 0) && (descriptor->video_line_map[1] > 0)) { +/* Detect coded field order from VideoLineMap: + * (even, even) => bottom field coded first + * (even, odd) => top field coded first + * (odd, even) => top field coded first + * (odd, odd) => bottom field coded first + */ +if ((descriptor->video_line_map[0] + descriptor->video_line_map[1]) % 2) { +switch (descriptor->field_dominance) { +c
[FFmpeg-cvslog] cmdutils: fix implicit declaration of SetDllDirectory function
ffmpeg | branch: release/3.1 | Tobias Rapp <t.r...@noa-archive.com> | Mon Aug 29 15:25:58 2016 +0200| [12320c08221f0eecf6d9af3a6f12f42e656f0674] | committer: James Almer cmdutils: fix implicit declaration of SetDllDirectory function Pre-processor check changed by commiter. Signed-off-by: James Almer <jamr...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=12320c08221f0eecf6d9af3a6f12f42e656f0674 --- cmdutils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmdutils.c b/cmdutils.c index a725e77..3bb8bde 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -61,6 +61,9 @@ #include #include #endif +#if HAVE_SETDLLDIRECTORY +#include +#endif static int init_report(const char *env); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] cmdutils: fix implicit declaration of SetDllDirectory function
ffmpeg | branch: release/3.0 | Tobias Rapp <t.r...@noa-archive.com> | Mon Aug 29 15:25:58 2016 +0200| [426b959e37bd1e27f369b887a4d2e3771a88033f] | committer: James Almer cmdutils: fix implicit declaration of SetDllDirectory function Pre-processor check changed by commiter. Signed-off-by: James Almer <jamr...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=426b959e37bd1e27f369b887a4d2e3771a88033f --- cmdutils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmdutils.c b/cmdutils.c index a725e77..3bb8bde 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -61,6 +61,9 @@ #include #include #endif +#if HAVE_SETDLLDIRECTORY +#include +#endif static int init_report(const char *env); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] cmdutils: fix implicit declaration of SetDllDirectory function
ffmpeg | branch: release/2.8 | Tobias Rapp <t.r...@noa-archive.com> | Mon Aug 29 15:25:58 2016 +0200| [c32ce247a026eda99b3ea5ad46c6bbc5c5907e1a] | committer: James Almer cmdutils: fix implicit declaration of SetDllDirectory function Pre-processor check changed by commiter. Signed-off-by: James Almer <jamr...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c32ce247a026eda99b3ea5ad46c6bbc5c5907e1a --- cmdutils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmdutils.c b/cmdutils.c index 380ca1b..bc57be7 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -60,6 +60,9 @@ #include #include #endif +#if HAVE_SETDLLDIRECTORY +#include +#endif static int init_report(const char *env); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] cmdutils: fix implicit declaration of SetDllDirectory function
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Mon Aug 29 15:25:58 2016 +0200| [a64839189622f2a4cc3c62168ae5037b6aab6992] | committer: James Almer cmdutils: fix implicit declaration of SetDllDirectory function Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Signed-off-by: James Almer <jamr...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a64839189622f2a4cc3c62168ae5037b6aab6992 --- cmdutils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmdutils.c b/cmdutils.c index 6960f8c..44f44cd 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -61,6 +61,9 @@ #include #include #endif +#ifdef _WIN32 +#include +#endif static int init_report(const char *env); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/dump.c: fix mixed log levels
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu May 12 10:26:03 2016 +0200| [77d1e88cf5282ea62c161db32de5092522d91cf5] | committer: Michael Niedermayer avformat/dump.c: fix mixed log levels Previously a partial log message without newline was printed in case of loglevel=warning. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=77d1e88cf5282ea62c161db32de5092522d91cf5 --- libavformat/dump.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/dump.c b/libavformat/dump.c index d6a3249..9eb6146 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -422,7 +422,7 @@ static void dump_sidedata(void *ctx, AVStream *st, const char *indent) dump_mastering_display_metadata(ctx, ); break; default: -av_log(ctx, AV_LOG_WARNING, +av_log(ctx, AV_LOG_INFO, "unknown side data type %d (%d bytes)", sd.type, sd.size); break; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/f_metadata: update print output header line format
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Mon May 9 11:35:38 2016 +0200| [9486de5a85f0c54f241849d6b22bee943da557d0] | committer: Michael Niedermayer avfilter/f_metadata: update print output header line format Update print mode output header line format to be more consistent with other log output of FFmpeg. The printf-modifiers have been inspired by the showinfo filter. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Reviewed-by: Paul B Mahol <one...@gmail.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9486de5a85f0c54f241849d6b22bee943da557d0 --- libavfilter/f_metadata.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index ee631c5..ab07ccf 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -306,15 +306,15 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) break; case METADATA_PRINT: if (!s->key && e) { -s->print(ctx, "frame %"PRId64" pts %"PRId64" pts_time %s\n", - inlink->frame_count, frame->pts, av_ts2timestr(frame->pts, >time_base)); +s->print(ctx, "frame:%-4"PRId64" pts:%-7s pts_time:%-7s\n", + inlink->frame_count, av_ts2str(frame->pts), av_ts2timestr(frame->pts, >time_base)); s->print(ctx, "%s=%s\n", e->key, e->value); while ((e = av_dict_get(metadata, "", e, AV_DICT_IGNORE_SUFFIX)) != NULL) { s->print(ctx, "%s=%s\n", e->key, e->value); } } else if (e && e->value && (!s->value || (e->value && s->compare(s, e->value, s->value { -s->print(ctx, "frame %"PRId64" pts %"PRId64" pts_time %s\n", - inlink->frame_count, frame->pts, av_ts2timestr(frame->pts, >time_base)); +s->print(ctx, "frame:%-4"PRId64" pts:%-7s pts_time:%-7s\n", + inlink->frame_count, av_ts2str(frame->pts), av_ts2timestr(frame->pts, >time_base)); s->print(ctx, "%s=%s\n", s->key, e->value); } return ff_filter_frame(outlink, frame); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/f_metadata: add pts_time to print output
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Mon May 9 11:35:37 2016 +0200| [21f9fbce5cf91456d3c2da3a05f58fdce667e517] | committer: Michael Niedermayer avfilter/f_metadata: add pts_time to print output This allows e.g. to correlate signalstats metadata to time position without having to find out the filter chain timebase first. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Reviewed-by: Paul B Mahol <one...@gmail.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=21f9fbce5cf91456d3c2da3a05f58fdce667e517 --- libavfilter/f_metadata.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index fa6b9d3..ee631c5 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -30,6 +30,7 @@ #include "libavutil/eval.h" #include "libavutil/internal.h" #include "libavutil/opt.h" +#include "libavutil/timestamp.h" #include "avfilter.h" #include "audio.h" #include "formats.h" @@ -305,13 +306,15 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) break; case METADATA_PRINT: if (!s->key && e) { -s->print(ctx, "frame %"PRId64" pts %"PRId64"\n", inlink->frame_count, frame->pts); +s->print(ctx, "frame %"PRId64" pts %"PRId64" pts_time %s\n", + inlink->frame_count, frame->pts, av_ts2timestr(frame->pts, >time_base)); s->print(ctx, "%s=%s\n", e->key, e->value); while ((e = av_dict_get(metadata, "", e, AV_DICT_IGNORE_SUFFIX)) != NULL) { s->print(ctx, "%s=%s\n", e->key, e->value); } } else if (e && e->value && (!s->value || (e->value && s->compare(s, e->value, s->value { -s->print(ctx, "frame %"PRId64" pts %"PRId64"\n", inlink->frame_count, frame->pts); +s->print(ctx, "frame %"PRId64" pts %"PRId64" pts_time %s\n", + inlink->frame_count, frame->pts, av_ts2timestr(frame->pts, >time_base)); s->print(ctx, "%s=%s\n", s->key, e->value); } return ff_filter_frame(outlink, frame); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: add readvitc filter test
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Apr 7 14:39:33 2016 +0200| [ef59c6f7e89a23c26d528cdbe0229c7febdf05c8] | committer: Michael Niedermayer fate: add readvitc filter test Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ef59c6f7e89a23c26d528cdbe0229c7febdf05c8 --- tests/fate/filter-video.mak | 10 ++ tests/ref/fate/filter-metadata-readvitc-def |5 + tests/ref/fate/filter-metadata-readvitc-thr |5 + 3 files changed, 20 insertions(+) diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index 348cb93..4b17d59 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -622,6 +622,16 @@ FATE_METADATA_FILTER-$(call ALLYES, $(EBUR128_METADATA_DEPS)) += fate-filter-met fate-filter-metadata-ebur128: SRC = $(TARGET_SAMPLES)/filter/seq-3341-7_seq-3342-5-24bit.flac fate-filter-metadata-ebur128: CMD = run $(FILTER_METADATA_COMMAND) "amovie='$(SRC)',ebur128=metadata=1" +READVITC_METADATA_DEPS = FFPROBE LAVFI_INDEV MOVIE_FILTER AVCODEC AVDEVICE \ + AVI_DEMUXER FFVHUFF_DECODER READVITC_FILTER +FATE_METADATA_FILTER-$(call ALLYES, $(READVITC_METADATA_DEPS)) += fate-filter-metadata-readvitc-def +fate-filter-metadata-readvitc-def: SRC = $(TARGET_SAMPLES)/filter/sample-vitc.avi +fate-filter-metadata-readvitc-def: CMD = run $(FILTER_METADATA_COMMAND) "movie='$(SRC)',readvitc" + +FATE_METADATA_FILTER-$(call ALLYES, $(READVITC_METADATA_DEPS)) += fate-filter-metadata-readvitc-thr +fate-filter-metadata-readvitc-thr: SRC = $(TARGET_SAMPLES)/filter/sample-vitc.avi +fate-filter-metadata-readvitc-thr: CMD = run $(FILTER_METADATA_COMMAND) "movie='$(SRC)',readvitc=thr_b=0.3:thr_w=0.5" + tests/data/file4560-override2rotate0.mov: TAG = GEN tests/data/file4560-override2rotate0.mov: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-metadata-readvitc-def b/tests/ref/fate/filter-metadata-readvitc-def new file mode 100644 index 000..8a650f1 --- /dev/null +++ b/tests/ref/fate/filter-metadata-readvitc-def @@ -0,0 +1,5 @@ +pkt_pts=0|tag:lavfi.readvitc.found=0 +pkt_pts=1|tag:lavfi.readvitc.found=1|tag:lavfi.readvitc.tc_str=05:01:02:21 +pkt_pts=2|tag:lavfi.readvitc.found=1|tag:lavfi.readvitc.tc_str=05:01:02:22 +pkt_pts=3|tag:lavfi.readvitc.found=1|tag:lavfi.readvitc.tc_str=05:01:02:23 +pkt_pts=4|tag:lavfi.readvitc.found=0 diff --git a/tests/ref/fate/filter-metadata-readvitc-thr b/tests/ref/fate/filter-metadata-readvitc-thr new file mode 100644 index 000..4086663 --- /dev/null +++ b/tests/ref/fate/filter-metadata-readvitc-thr @@ -0,0 +1,5 @@ +pkt_pts=0|tag:lavfi.readvitc.found=1|tag:lavfi.readvitc.tc_str=05:01:02:20 +pkt_pts=1|tag:lavfi.readvitc.found=1|tag:lavfi.readvitc.tc_str=05:01:02:21 +pkt_pts=2|tag:lavfi.readvitc.found=1|tag:lavfi.readvitc.tc_str=05:01:02:22 +pkt_pts=3|tag:lavfi.readvitc.found=1|tag:lavfi.readvitc.tc_str=05:01:02:23 +pkt_pts=4|tag:lavfi.readvitc.found=1|tag:lavfi.readvitc.tc_str=05:01:02:24 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter: add readvitc filter
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Wed Apr 6 16:25:53 2016 +0200| [2aad631a818cc49fc30da349c319abfb119adea1] | committer: Paul B Mahol avfilter: add readvitc filter Add a filter to scan the top lines of video frames for vertical interval timecode (VITC) information and attach it as metadata keys. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2aad631a818cc49fc30da349c319abfb119adea1 --- Changelog |1 + MAINTAINERS |1 + doc/filters.texi | 37 +++ libavfilter/Makefile |1 + libavfilter/allfilters.c |1 + libavfilter/version.h |2 +- libavfilter/vf_readvitc.c | 258 + 7 files changed, 300 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 18fdb27..6e40739 100644 --- a/Changelog +++ b/Changelog @@ -25,6 +25,7 @@ version : - hash and framehash muxers - colorspace filter - hdcd filter +- readvitc filter version 3.0: - Common Encryption (CENC) MP4 encoding and decoding support diff --git a/MAINTAINERS b/MAINTAINERS index a993a67..d2593e5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -385,6 +385,7 @@ Filters: vf_neighbor.c Paul B Mahol vf_psnr.c Paul B Mahol vf_random.c Paul B Mahol + vf_readvitc.c Tobias Rapp (CC t.rapp at noa-archive dot com) vf_scale.cMichael Niedermayer vf_separatefields.c Paul B Mahol vf_ssim.c Paul B Mahol diff --git a/doc/filters.texi b/doc/filters.texi index 61307e5..b17b115 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -10618,6 +10618,43 @@ less than @code{0}, the filter will try to use a good random seed on a best effort basis. @end table +@section readvitc + +Read vertical interval timecode (VITC) information from the top lines of a +video frame. + +The filter adds frame metadata key @code{lavfi.readvitc.tc_str} with the +timecode value, if a valid timecode has been detected. Further metadata key +@code{lavfi.readvitc.found} is set to 0/1 depending on whether +timecode data has been found or not. + +This filter accepts the following options: + +@table @option +@item scan_max +Set the maximum number of lines to scan for VITC data. If the value is set to +@code{-1} the full video frame is scanned. Default is @code{45}. + +@item thr_b +Set the luma threshold for black. Accepts float numbers in the range [0.0,1.0], +default value is @code{0.2}. The value must be equal or less than @code{thr_w}. + +@item thr_w +Set the luma threshold for white. Accepts float numbers in the range [0.0,1.0], +default value is @code{0.6}. The value must be equal or greater than @code{thr_b}. +@end table + +@subsection Examples + +@itemize +@item +Detect and draw VITC data onto the video frame; if no valid VITC is detected, +draw @code{--:--:--:--} as a placeholder: +@example +ffmpeg -i input.avi -filter:v 'readvitc,drawtext=fontfile=FreeMono.ttf:text=%@{metadata\\:lavfi.readvitc.tc_str\\:--\\:--\\:--\\:--@}:x=(w-tw)/2:y=400-ascent' +@end example +@end itemize + @section remap Remap pixels using 2nd: Xmap and 3rd: Ymap input video stream. diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 2ea8c84..f1f37cb 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -227,6 +227,7 @@ OBJS-$(CONFIG_PSNR_FILTER) += vf_psnr.o dualinput.o framesync. OBJS-$(CONFIG_PULLUP_FILTER) += vf_pullup.o OBJS-$(CONFIG_QP_FILTER) += vf_qp.o OBJS-$(CONFIG_RANDOM_FILTER) += vf_random.o +OBJS-$(CONFIG_READVITC_FILTER) += vf_readvitc.o OBJS-$(CONFIG_REALTIME_FILTER) += f_realtime.o OBJS-$(CONFIG_REMAP_FILTER) += vf_remap.o framesync.o OBJS-$(CONFIG_REMOVEGRAIN_FILTER)+= vf_removegrain.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 52d3f61..ad6ba21 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -247,6 +247,7 @@ void avfilter_register_all(void) REGISTER_FILTER(PULLUP, pullup, vf); REGISTER_FILTER(QP, qp, vf); REGISTER_FILTER(RANDOM, random, vf); +REGISTER_FILTER(READVITC, readvitc, vf); REGISTER_FILTER(REALTIME, realtime, vf); REGISTER_FILTER(REMAP, remap, vf); REGISTER_FILTER(REMOVEGRAIN,removegrain,vf); diff --git a/libavfilter/version.h b/libavfilter/version.h index 48b9d9a..f4ade1c 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -30,7 +30,7 @@ #include "libavutil/version.h" #define LIBAVFILTER_VERSION_MAJOR 6 -#define LIBAVFILTER_VERSION_MINOR 42 +#define LIBAVFILTER_V
[FFmpeg-cvslog] avfilter/vf_drawtext: add optional default value to metadata function
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Apr 7 10:20:53 2016 +0200| [ee104580c5b83e0fe697a66c2638b56d584c0081] | committer: Paul B Mahol avfilter/vf_drawtext: add optional default value to metadata function Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ee104580c5b83e0fe697a66c2638b56d584c0081 --- doc/filters.texi |7 ++- libavfilter/version.h |2 +- libavfilter/vf_drawtext.c |4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 712e708..0b80fd1 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -6682,7 +6682,12 @@ The time at which the filter is running, expressed in the local time zone. It can accept an argument: a strftime() format string. @item metadata -Frame metadata. It must take one argument specifying metadata key. +Frame metadata. Takes one or two arguments. + +The first argument is mandatory and specifies the metadata key. + +The second argument is optional and specifies a default value, used when the +metadata key is not found or empty. @item n, frame_num The frame number, starting from 0. diff --git a/libavfilter/version.h b/libavfilter/version.h index 0dbb7e5..4cb5a2e 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -31,7 +31,7 @@ #define LIBAVFILTER_VERSION_MAJOR 6 #define LIBAVFILTER_VERSION_MINOR 41 -#define LIBAVFILTER_VERSION_MICRO 100 +#define LIBAVFILTER_VERSION_MICRO 101 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ LIBAVFILTER_VERSION_MINOR, \ diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 1ef3ecb..6b9af5b 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -860,6 +860,8 @@ static int func_metadata(AVFilterContext *ctx, AVBPrint *bp, if (e && e->value) av_bprintf(bp, "%s", e->value); +else if (argc >= 2) +av_bprintf(bp, "%s", argv[1]); return 0; } @@ -975,7 +977,7 @@ static const struct drawtext_function { { "localtime", 0, 1, 'L', func_strftime }, { "frame_num", 0, 0, 0, func_frame_num }, { "n", 0, 0, 0, func_frame_num }, -{ "metadata", 1, 1, 0, func_metadata }, +{ "metadata", 1, 2, 0, func_metadata }, }; static int eval_function(AVFilterContext *ctx, AVBPrint *bp, char *fct, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/f_metadata: whitespace clean-up
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Feb 11 13:35:22 2016 +0100| [730da5c20791d4208aa6c0ef5061cdf4380aa9ee] | committer: Paul B Mahol avfilter/f_metadata: whitespace clean-up Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=730da5c20791d4208aa6c0ef5061cdf4380aa9ee --- libavfilter/f_metadata.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index 6c9317a..ae0208e 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -91,8 +91,8 @@ typedef struct MetadataContext { } MetadataContext; #define OFFSET(x) offsetof(MetadataContext, x) -#define DEFINE_OPTIONS(filt_name, FLAGS)\ -static const AVOption filt_name##_options[] = { \ +#define DEFINE_OPTIONS(filt_name, FLAGS) \ +static const AVOption filt_name##_options[] = { \ { "mode", "set a mode of operation", OFFSET(mode), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, METADATA_NB-1, FLAGS, "mode" }, \ { "select", "select frame",0, AV_OPT_TYPE_CONST, {.i64 = METADATA_SELECT }, 0, 0, FLAGS, "mode" }, \ { "add","add new metadata",0, AV_OPT_TYPE_CONST, {.i64 = METADATA_ADD },0, 0, FLAGS, "mode" }, \ @@ -102,16 +102,16 @@ static const AVOption filt_name##_options[] = { \ { "key", "set metadata key", OFFSET(key),AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, FLAGS }, \ { "value", "set metadata value", OFFSET(value), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, FLAGS }, \ { "function", "function for comparing values", OFFSET(function), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, METADATAF_NB-1, FLAGS, "function" }, \ -{ "string", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_STRING }, 0, 3, FLAGS, "function" }, \ +{ "string", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_STRING }, 0, 3, FLAGS, "function" }, \ { "starts_with", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_STARTS_WITH }, 0, 0, FLAGS, "function" }, \ -{ "less",NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_LESS}, 0, 3, FLAGS, "function" }, \ -{ "equal", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_EQUAL }, 0, 3, FLAGS, "function" }, \ -{ "greater", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_GREATER }, 0, 3, FLAGS, "function" }, \ -{ "expr",NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_EXPR}, 0, 3, FLAGS, "function" }, \ +{ "less",NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_LESS }, 0, 3, FLAGS, "function" }, \ +{ "equal", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_EQUAL }, 0, 3, FLAGS, "function" }, \ +{ "greater", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_GREATER }, 0, 3, FLAGS, "function" }, \ +{ "expr",NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_EXPR }, 0, 3, FLAGS, "function" }, \ { "expr", "set expression for expr function", OFFSET(expr_str), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, FLAGS }, \ { "length", "compare up to N chars for string function", OFFSET(length), AV_OPT_TYPE_INT,{.i64 = INT_MAX }, 1, INT_MAX, FLAGS }, \ { "file", "set file where to print metadata information", OFFSET(file_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, \ -{ NULL }\ +{ NULL } \ } static int string(MetadataContext *s, const char *value1, const char *value2, size_t length) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/f_metadata: rename "string" into "same_str"
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Feb 11 15:39:57 2016 +0100| [80026a8ac35b2cfbf3667c22d733a56dcd041621] | committer: Paul B Mahol avfilter/f_metadata: rename "string" into "same_str" Rename function option value "string" into "same_str". Remove obsolete "length" option. Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=80026a8ac35b2cfbf3667c22d733a56dcd041621 --- doc/filters.texi |9 ++--- libavfilter/f_metadata.c | 32 +++- 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 8264498..7898b86 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -8486,19 +8486,14 @@ Set key used with all modes. Must be set for all modes except @code{print}. Set metadata value which will be used. This option is mandatory for @code{modify} and @code{add} mode. -@item length -Set length of how many characters of two metadata values need to match to be -considered same. Default is all available characters. - @item function Which function to use when comparing metadata value and @code{value}. Can be one of following: @table @samp -@item string -Values are interpreted as strings, returns true if @code{value} is same as metadata value up -to N chars as set in @code{length} option. +@item same_str +Values are interpreted as strings, returns true if metadata value is same as @code{value}. @item starts_with Values are interpreted as strings, returns true if metadata value starts with diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index ae0208e..7cf286e 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -48,7 +48,7 @@ enum MetadataMode { }; enum MetadataFunction { -METADATAF_STRING, +METADATAF_SAME_STR, METADATAF_STARTS_WITH, METADATAF_LESS, METADATAF_EQUAL, @@ -75,7 +75,6 @@ typedef struct MetadataContext { int mode; char *key; char *value; -int length; int function; char *expr_str; @@ -86,7 +85,7 @@ typedef struct MetadataContext { char *file_str; int (*compare)(struct MetadataContext *s, - const char *value1, const char *value2, size_t length); + const char *value1, const char *value2); void (*print)(AVFilterContext *ctx, const char *msg, ...) av_printf_format(2, 3); } MetadataContext; @@ -102,29 +101,28 @@ static const AVOption filt_name##_options[] = { \ { "key", "set metadata key", OFFSET(key),AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, FLAGS }, \ { "value", "set metadata value", OFFSET(value), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, FLAGS }, \ { "function", "function for comparing values", OFFSET(function), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, METADATAF_NB-1, FLAGS, "function" }, \ -{ "string", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_STRING }, 0, 3, FLAGS, "function" }, \ +{ "same_str",NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_SAME_STR },0, 3, FLAGS, "function" }, \ { "starts_with", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_STARTS_WITH }, 0, 0, FLAGS, "function" }, \ { "less",NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_LESS }, 0, 3, FLAGS, "function" }, \ { "equal", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_EQUAL }, 0, 3, FLAGS, "function" }, \ { "greater", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_GREATER }, 0, 3, FLAGS, "function" }, \ { "expr",NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_EXPR }, 0, 3, FLAGS, "function" }, \ { "expr", "set expression for expr function", OFFSET(expr_str), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, FLAGS }, \ -{ "length", "compare up to N chars for string function", OFFSET(length), AV_OPT_TYPE_INT,{.i64 = INT_MAX }, 1, INT_MAX, FLAGS }, \ { "file", "set file where to print metadata information", OFFSET(file_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, \ { NULL } \ } -static int string(MetadataContext *s, const char *value1, const char *value2, size_t length) +static int same_str(MetadataContext *s, const char *value1, const char *value2) { -return !strncmp(value1, value2, length); +return !strcmp(value1, value2); } -static int starts_with(MetadataContext *s, const char *value1, const char *value2, size_t length) +static int starts_with(MetadataContext *s, const char *value1, const char *value2) { return !strncmp(value1, value2, strlen(value2)); } -st
[FFmpeg-cvslog] avfilter/f_metadata: add support for file output
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Feb 11 13:35:21 2016 +0100| [202f97872891071a24bc383ac07dd7e233ee4343] | committer: Paul B Mahol avfilter/f_metadata: add support for file output Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=202f97872891071a24bc383ac07dd7e233ee4343 --- doc/filters.texi |6 + libavfilter/f_metadata.c | 66 ++ 2 files changed, 67 insertions(+), 5 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 6c5003f..8f4dcea 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -8526,6 +8526,12 @@ Float representation of @code{value} from metadata key. @item VALUE2 Float representation of @code{value} as supplied by user in @code{value} option. @end table + +@item file +If specified in @code{print} mode, output is written to the named file. When +filename equals "-" data is written to standard output. +If @code{file} option is not set, output is written to the log with AV_LOG_INFO +loglevel. @end table @subsection Examples diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index e0ea30b..9246a2a 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -81,8 +81,12 @@ typedef struct MetadataContext { AVExpr *expr; double var_values[VAR_VARS_NB]; +FILE *file; +char *file_str; + int (*compare)(struct MetadataContext *s, const char *value1, const char *value2, size_t length); +void (*print)(AVFilterContext *ctx, const char *msg, ...) av_printf_format(2, 3); } MetadataContext; #define OFFSET(x) offsetof(MetadataContext, x) @@ -104,6 +108,7 @@ static const AVOption filt_name##_options[] = { \ { "expr",NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_EXPR}, 0, 3, FLAGS, "function" }, \ { "expr", "set expression for expr function", OFFSET(expr_str), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, FLAGS }, \ { "length", "compare up to N chars for string function", OFFSET(length), AV_OPT_TYPE_INT,{.i64 = INT_MAX }, 1, INT_MAX, FLAGS }, \ +{ "file", "set file where to print metadata information", OFFSET(file_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, \ { NULL }\ } @@ -155,6 +160,27 @@ static int parse_expr(MetadataContext *s, const char *value1, const char *value2 return av_expr_eval(s->expr, s->var_values, NULL); } +static void print_log(AVFilterContext *ctx, const char *msg, ...) +{ +va_list argument_list; + +va_start(argument_list, msg); +if (msg) +av_vlog(ctx, AV_LOG_INFO, msg, argument_list); +va_end(argument_list); +} + +static void print_file(AVFilterContext *ctx, const char *msg, ...) +{ +MetadataContext *s = ctx->priv; +va_list argument_list; + +va_start(argument_list, msg); +if (msg) +vfprintf(s->file, msg, argument_list); +va_end(argument_list); +} + static av_cold int init(AVFilterContext *ctx) { MetadataContext *s = ctx->priv; @@ -203,9 +229,37 @@ static av_cold int init(AVFilterContext *ctx) } } +if (s->file_str) { +if (!strcmp(s->file_str, "-")) { +s->file = stdout; +} else { +s->file = fopen(s->file_str, "w"); +if (!s->file) { +int err = AVERROR(errno); +char buf[128]; +av_strerror(err, buf, sizeof(buf)); +av_log(ctx, AV_LOG_ERROR, "Could not open file %s: %s\n", + s->file_str, buf); +return err; +} +} +s->print = print_file; +} else { +s->print = print_log; +} + return 0; } +static av_cold void uninit(AVFilterContext *ctx) +{ +MetadataContext *s = ctx->priv; + +if (s->file && s->file != stdout) +fclose(s->file); +s->file = NULL; +} + static int filter_frame(AVFilterLink *inlink, AVFrame *frame) { AVFilterContext *ctx = inlink->dst; @@ -245,14 +299,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) break; case METADATA_PRINT: if (!s->key && e) { -av_log(ctx, AV_LOG_INFO, "frame %"PRId64" pts %"PRId64"\n", inlink->frame_count, frame->pts); -av_log(ctx, AV_LOG_INFO, "%s=%s\n", e->key, e->value); +s->print(ctx, "frame %"PRId64" pts %"PRId64"\n", inlink->frame_count, frame->pts); +s->print(ctx, "%s=%s\n", e->key, e->value); while ((e = av_dict_get(metadata, "
[FFmpeg-cvslog] avfilter/f_metadata: avoid float rounding problems
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Feb 11 13:35:19 2016 +0100| [8b99c5e8daf27c8198df4061eef0ac8b193e1b73] | committer: Paul B Mahol avfilter/f_metadata: avoid float rounding problems Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b99c5e8daf27c8198df4061eef0ac8b193e1b73 --- libavfilter/f_metadata.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index 40ab6bb..e0ea30b 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -23,6 +23,8 @@ * filter for manipulating frame metadata */ +#include + #include "libavutil/avassert.h" #include "libavutil/avstring.h" #include "libavutil/eval.h" @@ -117,7 +119,7 @@ static int equal(MetadataContext *s, const char *value1, const char *value2, siz if (sscanf(value1, "%f", ) + sscanf(value2, "%f", ) != 2) return 0; -return f1 == f2; +return fabsf(f1 - f2) < FLT_EPSILON; } static int less(MetadataContext *s, const char *value1, const char *value2, size_t length) @@ -127,7 +129,7 @@ static int less(MetadataContext *s, const char *value1, const char *value2, size if (sscanf(value1, "%f", ) + sscanf(value2, "%f", ) != 2) return 0; -return f1 < f2; +return (f1 - f2) < FLT_EPSILON; } static int greater(MetadataContext *s, const char *value1, const char *value2, size_t length) @@ -137,7 +139,7 @@ static int greater(MetadataContext *s, const char *value1, const char *value2, s if (sscanf(value1, "%f", ) + sscanf(value2, "%f", ) != 2) return 0; -return f1 > f2; +return (f2 - f1) < FLT_EPSILON; } static int parse_expr(MetadataContext *s, const char *value1, const char *value2, size_t length) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/f_metadata: add starts_with string function
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Thu Feb 11 13:35:20 2016 +0100| [6889deba68fcc3d9f1015f10392dea38b2fcd028] | committer: Paul B Mahol avfilter/f_metadata: add starts_with string function Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6889deba68fcc3d9f1015f10392dea38b2fcd028 --- doc/filters.texi |4 libavfilter/f_metadata.c | 10 ++ 2 files changed, 14 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 8f4dcea..8264498 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -8500,6 +8500,10 @@ Can be one of following: Values are interpreted as strings, returns true if @code{value} is same as metadata value up to N chars as set in @code{length} option. +@item starts_with +Values are interpreted as strings, returns true if metadata value starts with +the @code{value} option string. + @item less Values are interpreted as floats, returns true if metadata value is less than @code{value}. diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index 9246a2a..6c9317a 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -49,6 +49,7 @@ enum MetadataMode { enum MetadataFunction { METADATAF_STRING, +METADATAF_STARTS_WITH, METADATAF_LESS, METADATAF_EQUAL, METADATAF_GREATER, @@ -102,6 +103,7 @@ static const AVOption filt_name##_options[] = { \ { "value", "set metadata value", OFFSET(value), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, FLAGS }, \ { "function", "function for comparing values", OFFSET(function), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, METADATAF_NB-1, FLAGS, "function" }, \ { "string", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_STRING }, 0, 3, FLAGS, "function" }, \ +{ "starts_with", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_STARTS_WITH }, 0, 0, FLAGS, "function" }, \ { "less",NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_LESS}, 0, 3, FLAGS, "function" }, \ { "equal", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_EQUAL }, 0, 3, FLAGS, "function" }, \ { "greater", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_GREATER }, 0, 3, FLAGS, "function" }, \ @@ -117,6 +119,11 @@ static int string(MetadataContext *s, const char *value1, const char *value2, si return !strncmp(value1, value2, length); } +static int starts_with(MetadataContext *s, const char *value1, const char *value2, size_t length) +{ +return !strncmp(value1, value2, strlen(value2)); +} + static int equal(MetadataContext *s, const char *value1, const char *value2, size_t length) { float f1, f2; @@ -201,6 +208,9 @@ static av_cold int init(AVFilterContext *ctx) case METADATAF_STRING: s->compare = string; break; +case METADATAF_STARTS_WITH: +s->compare = starts_with; +break; case METADATAF_LESS: s->compare = less; break; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/demuxers: add some concat demuxer script examples
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-archive.com> | Tue Jan 26 09:02:51 2016 +0100| [ca71e6052e86d2d6eb390d642596d2474b524b3d] | committer: Stefano Sabatini doc/demuxers: add some concat demuxer script examples Signed-off-by: Tobias Rapp <t.r...@noa-archive.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ca71e6052e86d2d6eb390d642596d2474b524b3d --- doc/demuxers.texi | 27 +++ 1 file changed, 27 insertions(+) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 188808b..6b5f8bb 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -214,6 +214,33 @@ The default is 0. @end table +@subsection Examples + +@itemize +@item +Use absolute filenames and include some comments: +@example +# my first filename +file /mnt/share/file-1.wav +# my second filename including whitespace +file '/mnt/share/file 2.wav' +# my third filename including whitespace plus single quote +file '/mnt/share/file 3'\''.wav' +@end example + +@item +Allow for input format auto-probing, use safe filenames and set the duration of +the first file: +@example +ffconcat version 1.0 + +file file-1.wav +duration 20.0 + +file subdir/file-2.wav +@end example +@end itemize + @section flv Adobe Flash Video Format demuxer. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avutil/file_open: avoid file handle inheritance on Windows
ffmpeg | branch: release/2.4 | Tobias Rapp <t.r...@noa-audio.com> | Thu Oct 29 09:11:37 2015 +0100| [1bb7529ac2eda7d3b7eb20ec477d4440b944] | committer: Michael Niedermayer avutil/file_open: avoid file handle inheritance on Windows Avoids inheritance of file handles on Windows systems similar to the O_CLOEXEC/FD_CLOEXEC flag on Linux. Fixes file lock issues in Windows applications when a child process is started with handle inheritance enabled (standard input/output redirection) while a FFmpeg transcoding is running in the parent process. Links relevant to the subject: https://msdn.microsoft.com/en-us/library/w7sa2b22.aspx Describes the _wsopen() function and the O_NOINHERIT flag. File handles opened by _wsopen() are inheritable by default. https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx Describes handle inheritance when creating new processes. Handle inheritance must be enabled (bInheritHandles = TRUE) e.g. when you want to pass handles for stdin/stdout via lpStartupInfo. Signed-off-by: Tobias Rapp <t.r...@noa-audio.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> (cherry picked from commit 474665346616e446ecd1407002fdf5f88201bf72) Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1bb7529ac2eda7d3b7eb20ec477d4440b944 --- libavutil/file_open.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/file_open.c b/libavutil/file_open.c index f3164eb..619dc57 100644 --- a/libavutil/file_open.c +++ b/libavutil/file_open.c @@ -82,6 +82,9 @@ int avpriv_open(const char *filename, int flags, ...) #ifdef O_CLOEXEC flags |= O_CLOEXEC; #endif +#ifdef O_NOINHERIT +flags |= O_NOINHERIT; +#endif fd = open(filename, flags, mode); #if HAVE_FCNTL ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Makefile: add cleanup of pkg-config files created by configure to distclean
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-audio.com> | Wed Nov 25 11:47:14 2015 +0100| [bc517be6b0fb276997e431ae7708b2d1681d1aff] | committer: Andreas Cadhalpun Makefile: add cleanup of pkg-config files created by configure to distclean Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bc517be6b0fb276997e431ae7708b2d1681d1aff --- Makefile |1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 306f060..58f1a3a 100644 --- a/Makefile +++ b/Makefile @@ -181,6 +181,7 @@ clean:: distclean:: $(RM) $(DISTCLEANSUFFIXES) $(RM) config.* .config libavutil/avconfig.h .version avversion.h version.h libavutil/ffversion.h libavcodec/codec_names.h + $(RM) -rf doc/examples/pc-uninstalled config: $(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avutil/file_open: avoid file handle inheritance on Windows
ffmpeg | branch: release/2.5 | Tobias Rapp <t.r...@noa-audio.com> | Thu Oct 29 09:11:37 2015 +0100| [3ce0dcfaab8ef7bbeaa6c86c9b06d16e84865157] | committer: Michael Niedermayer avutil/file_open: avoid file handle inheritance on Windows Avoids inheritance of file handles on Windows systems similar to the O_CLOEXEC/FD_CLOEXEC flag on Linux. Fixes file lock issues in Windows applications when a child process is started with handle inheritance enabled (standard input/output redirection) while a FFmpeg transcoding is running in the parent process. Links relevant to the subject: https://msdn.microsoft.com/en-us/library/w7sa2b22.aspx Describes the _wsopen() function and the O_NOINHERIT flag. File handles opened by _wsopen() are inheritable by default. https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx Describes handle inheritance when creating new processes. Handle inheritance must be enabled (bInheritHandles = TRUE) e.g. when you want to pass handles for stdin/stdout via lpStartupInfo. Signed-off-by: Tobias Rapp <t.r...@noa-audio.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> (cherry picked from commit 474665346616e446ecd1407002fdf5f88201bf72) Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3ce0dcfaab8ef7bbeaa6c86c9b06d16e84865157 --- libavutil/file_open.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/file_open.c b/libavutil/file_open.c index 3f9a67c..9e76127 100644 --- a/libavutil/file_open.c +++ b/libavutil/file_open.c @@ -77,6 +77,9 @@ int avpriv_open(const char *filename, int flags, ...) #ifdef O_CLOEXEC flags |= O_CLOEXEC; #endif +#ifdef O_NOINHERIT +flags |= O_NOINHERIT; +#endif fd = open(filename, flags, mode); #if HAVE_FCNTL ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avutil/file_open: avoid file handle inheritance on Windows
ffmpeg | branch: release/2.6 | Tobias Rapp <t.r...@noa-audio.com> | Thu Oct 29 09:11:37 2015 +0100| [e0569172d6448aaacfd7bc952fcdc17b977814e1] | committer: Michael Niedermayer avutil/file_open: avoid file handle inheritance on Windows Avoids inheritance of file handles on Windows systems similar to the O_CLOEXEC/FD_CLOEXEC flag on Linux. Fixes file lock issues in Windows applications when a child process is started with handle inheritance enabled (standard input/output redirection) while a FFmpeg transcoding is running in the parent process. Links relevant to the subject: https://msdn.microsoft.com/en-us/library/w7sa2b22.aspx Describes the _wsopen() function and the O_NOINHERIT flag. File handles opened by _wsopen() are inheritable by default. https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx Describes handle inheritance when creating new processes. Handle inheritance must be enabled (bInheritHandles = TRUE) e.g. when you want to pass handles for stdin/stdout via lpStartupInfo. Signed-off-by: Tobias Rapp <t.r...@noa-audio.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> (cherry picked from commit 474665346616e446ecd1407002fdf5f88201bf72) Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e0569172d6448aaacfd7bc952fcdc17b977814e1 --- libavutil/file_open.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/file_open.c b/libavutil/file_open.c index 3f9a67c..9e76127 100644 --- a/libavutil/file_open.c +++ b/libavutil/file_open.c @@ -77,6 +77,9 @@ int avpriv_open(const char *filename, int flags, ...) #ifdef O_CLOEXEC flags |= O_CLOEXEC; #endif +#ifdef O_NOINHERIT +flags |= O_NOINHERIT; +#endif fd = open(filename, flags, mode); #if HAVE_FCNTL ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avutil/file_open: avoid file handle inheritance on Windows
ffmpeg | branch: release/2.7 | Tobias Rapp <t.r...@noa-audio.com> | Thu Oct 29 09:11:37 2015 +0100| [5ae4842122ca5b70f5499d233ff99143ac3369e4] | committer: Michael Niedermayer avutil/file_open: avoid file handle inheritance on Windows Avoids inheritance of file handles on Windows systems similar to the O_CLOEXEC/FD_CLOEXEC flag on Linux. Fixes file lock issues in Windows applications when a child process is started with handle inheritance enabled (standard input/output redirection) while a FFmpeg transcoding is running in the parent process. Links relevant to the subject: https://msdn.microsoft.com/en-us/library/w7sa2b22.aspx Describes the _wsopen() function and the O_NOINHERIT flag. File handles opened by _wsopen() are inheritable by default. https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx Describes handle inheritance when creating new processes. Handle inheritance must be enabled (bInheritHandles = TRUE) e.g. when you want to pass handles for stdin/stdout via lpStartupInfo. Signed-off-by: Tobias Rapp <t.r...@noa-audio.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> (cherry picked from commit 474665346616e446ecd1407002fdf5f88201bf72) Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ae4842122ca5b70f5499d233ff99143ac3369e4 --- libavutil/file_open.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/file_open.c b/libavutil/file_open.c index 3f9a67c..9e76127 100644 --- a/libavutil/file_open.c +++ b/libavutil/file_open.c @@ -77,6 +77,9 @@ int avpriv_open(const char *filename, int flags, ...) #ifdef O_CLOEXEC flags |= O_CLOEXEC; #endif +#ifdef O_NOINHERIT +flags |= O_NOINHERIT; +#endif fd = open(filename, flags, mode); #if HAVE_FCNTL ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avutil/file_open: avoid file handle inheritance on Windows
ffmpeg | branch: release/2.8 | Tobias Rapp <t.r...@noa-audio.com> | Thu Oct 29 09:11:37 2015 +0100| [c6c801d993bb18e8cc67b43a1aa94e28ee4d3cd9] | committer: Michael Niedermayer avutil/file_open: avoid file handle inheritance on Windows Avoids inheritance of file handles on Windows systems similar to the O_CLOEXEC/FD_CLOEXEC flag on Linux. Fixes file lock issues in Windows applications when a child process is started with handle inheritance enabled (standard input/output redirection) while a FFmpeg transcoding is running in the parent process. Links relevant to the subject: https://msdn.microsoft.com/en-us/library/w7sa2b22.aspx Describes the _wsopen() function and the O_NOINHERIT flag. File handles opened by _wsopen() are inheritable by default. https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx Describes handle inheritance when creating new processes. Handle inheritance must be enabled (bInheritHandles = TRUE) e.g. when you want to pass handles for stdin/stdout via lpStartupInfo. Signed-off-by: Tobias Rapp <t.r...@noa-audio.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> (cherry picked from commit 474665346616e446ecd1407002fdf5f88201bf72) Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c6c801d993bb18e8cc67b43a1aa94e28ee4d3cd9 --- libavutil/file_open.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/file_open.c b/libavutil/file_open.c index 3f9a67c..9e76127 100644 --- a/libavutil/file_open.c +++ b/libavutil/file_open.c @@ -77,6 +77,9 @@ int avpriv_open(const char *filename, int flags, ...) #ifdef O_CLOEXEC flags |= O_CLOEXEC; #endif +#ifdef O_NOINHERIT +flags |= O_NOINHERIT; +#endif fd = open(filename, flags, mode); #if HAVE_FCNTL ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avutil/file_open: avoid file handle inheritance on Windows
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-audio.com> | Thu Oct 29 09:11:37 2015 +0100| [474665346616e446ecd1407002fdf5f88201bf72] | committer: Michael Niedermayer avutil/file_open: avoid file handle inheritance on Windows Avoids inheritance of file handles on Windows systems similar to the O_CLOEXEC/FD_CLOEXEC flag on Linux. Fixes file lock issues in Windows applications when a child process is started with handle inheritance enabled (standard input/output redirection) while a FFmpeg transcoding is running in the parent process. Links relevant to the subject: https://msdn.microsoft.com/en-us/library/w7sa2b22.aspx Describes the _wsopen() function and the O_NOINHERIT flag. File handles opened by _wsopen() are inheritable by default. https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx Describes handle inheritance when creating new processes. Handle inheritance must be enabled (bInheritHandles = TRUE) e.g. when you want to pass handles for stdin/stdout via lpStartupInfo. Signed-off-by: Tobias Rapp <t.r...@noa-audio.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=474665346616e446ecd1407002fdf5f88201bf72 --- libavutil/file_open.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/file_open.c b/libavutil/file_open.c index 3f9a67c..9e76127 100644 --- a/libavutil/file_open.c +++ b/libavutil/file_open.c @@ -77,6 +77,9 @@ int avpriv_open(const char *filename, int flags, ...) #ifdef O_CLOEXEC flags |= O_CLOEXEC; #endif +#ifdef O_NOINHERIT +flags |= O_NOINHERIT; +#endif fd = open(filename, flags, mode); #if HAVE_FCNTL ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_ssim: Add support for writing stats to stdout
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-audio.com> | Tue Oct 20 15:34:36 2015 +0200| [18e8fac531cb4b7db3d6d36b222c99e3e8968cfe] | committer: Michael Niedermayer avfilter/vf_ssim: Add support for writing stats to stdout Reviewed-by: Paul B Mahol <one...@gmail.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=18e8fac531cb4b7db3d6d36b222c99e3e8968cfe --- doc/filters.texi |3 ++- libavfilter/vf_ssim.c |6 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 486398d..6a1596e 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -10226,7 +10226,8 @@ The description of the accepted parameters follows. @table @option @item stats_file, f If specified the filter will use the named file to save the SSIM of -each individual frame. +each individual frame. When filename equals "-" the data is sent to +standard output. @end table The file printed if @var{stats_file} is selected, contains a sequence of diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c index 5cd9361..b23d447 100644 --- a/libavfilter/vf_ssim.c +++ b/libavfilter/vf_ssim.c @@ -223,7 +223,9 @@ static av_cold int init(AVFilterContext *ctx) { SSIMContext *s = ctx->priv; -if (s->stats_file_str) { +if (!strcmp(s->stats_file_str, "-")) { +s->stats_file = stdout; +} else if (s->stats_file_str) { s->stats_file = fopen(s->stats_file_str, "w"); if (!s->stats_file) { int err = AVERROR(errno); @@ -354,7 +356,7 @@ static av_cold void uninit(AVFilterContext *ctx) ff_dualinput_uninit(>dinput); -if (s->stats_file) +if (s->stats_file && s->stats_file != stdout) fclose(s->stats_file); av_freep(>temp); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_psnr: Add support for writing stats to stdout
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-audio.com> | Tue Oct 20 15:02:21 2015 +0200| [1ec8c1554ed81a31ac4f82621121405de067b21e] | committer: Michael Niedermayer avfilter/vf_psnr: Add support for writing stats to stdout Reviewed-by: Paul B Mahol <one...@gmail.com> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1ec8c1554ed81a31ac4f82621121405de067b21e --- doc/filters.texi |3 ++- libavfilter/vf_psnr.c |6 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 1af0a72..486398d 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -8939,7 +8939,8 @@ The description of the accepted parameters follows. @table @option @item stats_file, f If specified the filter will use the named file to save the PSNR of -each individual frame. +each individual frame. When filename equals "-" the data is sent to +standard output. @end table The file printed if @var{stats_file} is selected, contains a sequence of diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c index a01b2c1..bfb0711 100644 --- a/libavfilter/vf_psnr.c +++ b/libavfilter/vf_psnr.c @@ -193,7 +193,9 @@ static av_cold int init(AVFilterContext *ctx) s->min_mse = +INFINITY; s->max_mse = -INFINITY; -if (s->stats_file_str) { +if (!strcmp(s->stats_file_str, "-")) { +s->stats_file = stdout; +} else if (s->stats_file_str) { s->stats_file = fopen(s->stats_file_str, "w"); if (!s->stats_file) { int err = AVERROR(errno); @@ -334,7 +336,7 @@ static av_cold void uninit(AVFilterContext *ctx) ff_dualinput_uninit(>dinput); -if (s->stats_file) +if (s->stats_file && s->stats_file != stdout) fclose(s->stats_file); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/avienc: add muxer option "write_channel_mask"
ffmpeg | branch: master | Tobias Rapp <t.r...@noa-audio.com> | Thu Sep 10 14:04:18 2015 +0200| [141637002767d47154bffaf1463edcfd9445a5ee] | committer: Michael Niedermayer avformat/avienc: add muxer option "write_channel_mask" Allow writing an empty channel mask into the wave format header. Useful if the input file contains an unknown channel layout. Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=141637002767d47154bffaf1463edcfd9445a5ee --- libavformat/avienc.c | 23 +-- libavformat/riff.h|5 + libavformat/riffenc.c |5 +++-- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/libavformat/avienc.c b/libavformat/avienc.c index a79f156..649961d 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -34,6 +34,7 @@ #include "libavutil/dict.h" #include "libavutil/avassert.h" #include "libavutil/timestamp.h" +#include "libavutil/opt.h" #include "libavutil/pixdesc.h" #include "libavcodec/raw.h" @@ -58,9 +59,11 @@ typedef struct AVIIndex { } AVIIndex; typedef struct AVIContext { +const AVClass *class; int64_t riff_start, movi_list, odml_list; int64_t frames_hdr_all; int riff_id; +int write_channel_mask; } AVIContext; typedef struct AVIStream { @@ -339,7 +342,7 @@ static int avi_write_header(AVFormatContext *s) ff_end_tag(pb, strh); if (enc->codec_type != AVMEDIA_TYPE_DATA) { -int ret; +int ret, flags; enum AVPixelFormat pix_fmt; strf = ff_start_tag(pb, "strf"); @@ -367,7 +370,8 @@ static int avi_write_header(AVFormatContext *s) av_get_pix_fmt_name(enc->pix_fmt)); break; case AVMEDIA_TYPE_AUDIO: -if ((ret = ff_put_wav_header(pb, enc, 0)) < 0) +flags = (avi->write_channel_mask == 0) ? FF_PUT_WAV_HEADER_SKIP_CHANNELMASK : 0; +if ((ret = ff_put_wav_header(pb, enc, flags)) < 0) return ret; break; default: @@ -782,6 +786,20 @@ static int avi_write_trailer(AVFormatContext *s) return res; } +#define OFFSET(x) offsetof(AVIContext, x) +#define ENC AV_OPT_FLAG_ENCODING_PARAM +static const AVOption options[] = { +{ "write_channel_mask", "write channel mask into wave format header", OFFSET(write_channel_mask), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, ENC }, +{ NULL }, +}; + +static const AVClass avi_muxer_class = { +.class_name = "AVI muxer", +.item_name = av_default_item_name, +.option = options, +.version= LIBAVUTIL_VERSION_INT, +}; + AVOutputFormat ff_avi_muxer = { .name = "avi", .long_name = NULL_IF_CONFIG_SMALL("AVI (Audio Video Interleaved)"), @@ -796,4 +814,5 @@ AVOutputFormat ff_avi_muxer = { .codec_tag = (const AVCodecTag * const []) { ff_codec_bmp_tags, ff_codec_wav_tags, 0 }, +.priv_class = _muxer_class, }; diff --git a/libavformat/riff.h b/libavformat/riff.h index 399c527..d6d91ef 100644 --- a/libavformat/riff.h +++ b/libavformat/riff.h @@ -53,6 +53,11 @@ void ff_put_bmp_header(AVIOContext *pb, AVCodecContext *enc, const AVCodecTag *t #define FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX0x0001 /** + * Tell ff_put_wav_header() to write an empty channel mask. + */ +#define FF_PUT_WAV_HEADER_SKIP_CHANNELMASK 0x0002 + +/** * Write WAVEFORMAT header structure. * * @param flags a combination of FF_PUT_WAV_HEADER_* constants diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c index 85c953f..ceb27f2 100644 --- a/libavformat/riffenc.c +++ b/libavformat/riffenc.c @@ -168,8 +168,9 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc, int flags) } /* write WAVEFORMATEXTENSIBLE extensions */ if (waveformatextensible) { -int write_channel_mask = enc->strict_std_compliance < FF_COMPLIANCE_NORMAL || - enc->channel_layout < 0x4; +int write_channel_mask = !(flags & FF_PUT_WAV_HEADER_SKIP_CHANNELMASK) && + (enc->strict_std_compliance < FF_COMPLIANCE_NORMAL || + enc->channel_layout < 0x4); /* 22 is WAVEFORMATEXTENSIBLE size */ avio_wl16(pb, riff_extradata - riff_extradata_start + 22); /* ValidBitsPerSample || SamplesPerBlock || Reserved */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: add some tests for ffv1 level 3 with 8/10/16 bps
ffmpeg | branch: master | Tobias Rapp t.r...@noa-audio.com | Fri Jun 19 14:30:27 2015 +0200| [2abdc6f477a3148604a6c726753503947ea547c2] | committer: Michael Niedermayer fate: add some tests for ffv1 level 3 with 8/10/16 bps Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2abdc6f477a3148604a6c726753503947ea547c2 --- tests/fate/vcodec.mak | 12 +++- tests/ref/vsynth/vsynth1-ffv1.3-420|4 tests/ref/vsynth/vsynth1-ffv1.3-422p10 |4 tests/ref/vsynth/vsynth1-ffv1.3-444p16 |4 tests/ref/vsynth/vsynth1-ffv1.3-bgr|4 tests/ref/vsynth/vsynth2-ffv1.3-420|4 tests/ref/vsynth/vsynth2-ffv1.3-422p10 |4 tests/ref/vsynth/vsynth2-ffv1.3-444p16 |4 tests/ref/vsynth/vsynth2-ffv1.3-bgr|4 tests/ref/vsynth/vsynth3-ffv1.3-420|4 tests/ref/vsynth/vsynth3-ffv1.3-422p10 |4 tests/ref/vsynth/vsynth3-ffv1.3-444p16 |4 tests/ref/vsynth/vsynth3-ffv1.3-bgr|4 tests/ref/vsynth/vsynth_lena-ffv1.3-420|4 tests/ref/vsynth/vsynth_lena-ffv1.3-422p10 |4 tests/ref/vsynth/vsynth_lena-ffv1.3-444p16 |4 tests/ref/vsynth/vsynth_lena-ffv1.3-bgr|4 17 files changed, 75 insertions(+), 1 deletion(-) diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak index 1ad5e96..4e4f0ed 100644 --- a/tests/fate/vcodec.mak +++ b/tests/fate/vcodec.mak @@ -68,9 +68,19 @@ fate-vsynth%-dv-50: ENCOPTS = -dct int -s pal -pix_fmt yuv422p \ fate-vsynth%-dv-50: DECOPTS = -sws_flags neighbor fate-vsynth%-dv-50: FMT = dv -FATE_VCODEC-$(call ENCDEC, FFV1, AVI) += ffv1 ffv1.0 +FATE_VCODEC-$(call ENCDEC, FFV1, AVI) += ffv1 ffv1.0 ffv1.3-420 ffv1.3-422p10 ffv1.3-444p16 ffv1.3-bgr fate-vsynth%-ffv1: ENCOPTS = -slices 4 fate-vsynth%-ffv1.0: CODEC = ffv1 +fate-vsynth%-ffv1.3-420: ENCOPTS = -vcodec ffv1 -level 3 -pix_fmt yuv420p +fate-vsynth%-ffv1.3-422p10: ENCOPTS = -vcodec ffv1 -level 3 -pix_fmt yuv422p10 \ + -sws_flags neighbor+bitexact +fate-vsynth%-ffv1.3-422p10: DECOPTS = -sws_flags neighbor+bitexact +fate-vsynth%-ffv1.3-444p16: ENCOPTS = -vcodec ffv1 -level 3 -pix_fmt yuv444p16 \ + -sws_flags neighbor+bitexact +fate-vsynth%-ffv1.3-444p16: DECOPTS = -sws_flags neighbor+bitexact +fate-vsynth%-ffv1.3-bgr: ENCOPTS = -vcodec ffv1 -level 3 -pix_fmt bgr0 \ + -sws_flags neighbor+bitexact +fate-vsynth%-ffv1.3-bgr: DECOPTS = -sws_flags neighbor+bitexact FATE_VCODEC-$(call ENCDEC, FFVHUFF, AVI) += ffvhuff ffvhuff444 ffvhuff420p12 ffvhuff422p10left ffvhuff444p16 fate-vsynth%-ffvhuff444: ENCOPTS = -vcodec ffvhuff -pix_fmt yuv444p diff --git a/tests/ref/vsynth/vsynth1-ffv1.3-420 b/tests/ref/vsynth/vsynth1-ffv1.3-420 new file mode 100644 index 000..08c5764 --- /dev/null +++ b/tests/ref/vsynth/vsynth1-ffv1.3-420 @@ -0,0 +1,4 @@ +26b1296a0ef80a3b5c8b63cc57c52bc2 *tests/data/fate/vsynth1-ffv1.3-420.avi +2691268 tests/data/fate/vsynth1-ffv1.3-420.avi +c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-ffv1.3-420.out.rawvideo +stddev:0.00 PSNR:999.99 MAXDIFF:0 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth1-ffv1.3-422p10 b/tests/ref/vsynth/vsynth1-ffv1.3-422p10 new file mode 100644 index 000..eecef94 --- /dev/null +++ b/tests/ref/vsynth/vsynth1-ffv1.3-422p10 @@ -0,0 +1,4 @@ +aa8c5630213381c7b2afdec4a91405ed *tests/data/fate/vsynth1-ffv1.3-422p10.avi +2845574 tests/data/fate/vsynth1-ffv1.3-422p10.avi +c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-ffv1.3-422p10.out.rawvideo +stddev:0.00 PSNR:999.99 MAXDIFF:0 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth1-ffv1.3-444p16 b/tests/ref/vsynth/vsynth1-ffv1.3-444p16 new file mode 100644 index 000..9f6ecba --- /dev/null +++ b/tests/ref/vsynth/vsynth1-ffv1.3-444p16 @@ -0,0 +1,4 @@ +f6b6943455d8b2c3010ff898df5dc9db *tests/data/fate/vsynth1-ffv1.3-444p16.avi +5357816 tests/data/fate/vsynth1-ffv1.3-444p16.avi +c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-ffv1.3-444p16.out.rawvideo +stddev:0.00 PSNR:999.99 MAXDIFF:0 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth1-ffv1.3-bgr b/tests/ref/vsynth/vsynth1-ffv1.3-bgr new file mode 100644 index 000..d76fe9e --- /dev/null +++ b/tests/ref/vsynth/vsynth1-ffv1.3-bgr @@ -0,0 +1,4 @@ +3c68357b239479fc26656f6dd76b0b58 *tests/data/fate/vsynth1-ffv1.3-bgr.avi +6883176 tests/data/fate/vsynth1-ffv1.3-bgr.avi +49c03ab1b73b7cd3cabc3c77a9479c9e *tests/data/fate/vsynth1-ffv1.3-bgr.out.rawvideo +stddev:3.16 PSNR: 38.12 MAXDIFF: 50 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-ffv1.3-420 b
[FFmpeg-cvslog] doc/protocols: Fixed missing example section marker
ffmpeg | branch: master | Tobias Rapp t.r...@noa-audio.com | Wed Mar 11 11:22:04 2015 +0100| [5be04f9789716cf1c3af4753cf92451d545bbdae] | committer: Michael Niedermayer doc/protocols: Fixed missing example section marker Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5be04f9789716cf1c3af4753cf92451d545bbdae --- doc/protocols.texi |2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/protocols.texi b/doc/protocols.texi index 5f6dfa8..2a19b41 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -1055,7 +1055,9 @@ subfile,,start,153391104,end,268142592,,:/media/dvd/VIDEO_TS/VTS_08_1.VOB @end example Play an AVI file directly from a TAR archive: +@example subfile,,start,183241728,end,366490624,,:archive.tar +@end example @section tcp ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] libavformat/avienc: Fix duration of audio segment in OpenDML master index
ffmpeg | branch: master | Tobias Rapp t.r...@noa-audio.com | Tue Mar 3 13:29:05 2015 +0100| [b4fbad2634c4f9d094dbe000c794fa277ecd678e] | committer: Michael Niedermayer libavformat/avienc: Fix duration of audio segment in OpenDML master index Fixes the duration field of the OpenDML master index indx chunk to contain the number of samples instead of the number of packets for (linear/PCM) audio streams. This matches the OpenDML V1.02 standard text which states that the duration field shall contain time span in stream ticks. Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4fbad2634c4f9d094dbe000c794fa277ecd678e --- libavformat/avienc.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/libavformat/avienc.c b/libavformat/avienc.c index 53c2fe7..3b5e5c4 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -49,6 +49,7 @@ typedef struct AVIIentry { typedef struct AVIIndex { int64_t indx_start; +int64_t audio_strm_offset; int entry; int ents_allocated; AVIIentry** cluster; @@ -66,6 +67,7 @@ typedef struct AVIStream { int packet_count; int entry; int max_size; +int sample_requested; int64_t last_dts; @@ -91,6 +93,7 @@ static int64_t avi_start_new_riff(AVFormatContext *s, AVIOContext *pb, avi-riff_id++; for (i = 0; i s-nb_streams; i++) { AVIStream *avist = s-streams[i]-priv_data; +avist-indexes.audio_strm_offset = avist-audio_strm_length; avist-indexes.entry = 0; } @@ -476,6 +479,7 @@ static int avi_write_ix(AVFormatContext *s) for (i = 0; i s-nb_streams; i++) { AVIStream *avist = s-streams[i]-priv_data; int64_t ix, pos; +int au_byterate, au_ssize, au_scale; avi_stream2fourcc(tag, i, s-streams[i]-codec-codec_type); ix_tag[3] = '0' + i; @@ -511,7 +515,16 @@ static int avi_write_ix(AVFormatContext *s) avio_skip(pb, 16 * avi-riff_id); avio_wl64(pb, ix);/* qwOffset */ avio_wl32(pb, pos - ix); /* dwSize */ -avio_wl32(pb, avist-indexes.entry); /* dwDuration */ +ff_parse_specific_params(s-streams[i], au_byterate, au_ssize, au_scale); +if (s-streams[i]-codec-codec_type == AVMEDIA_TYPE_AUDIO au_ssize 0) { +uint32_t audio_segm_size = (avist-audio_strm_length - avist-indexes.audio_strm_offset); +if ((audio_segm_size % au_ssize 0) !avist-sample_requested) { +avpriv_request_sample(s, OpenDML index duration for audio packets with partial frames); +avist-sample_requested = 1; +} +avio_wl32(pb, audio_segm_size / au_ssize); /* dwDuration (sample count) */ +} else +avio_wl32(pb, avist-indexes.entry); /* dwDuration (packet count) */ avio_seek(pb, pos, SEEK_SET); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/filters.texi: add reference link to video size syntax description
ffmpeg | branch: master | Tobias Rapp t.r...@noa-audio.com | Tue Feb 24 13:23:56 2015 +0100| [f34aca8a1612be6b474534902039814836cba259] | committer: Stefano Sabatini doc/filters.texi: add reference link to video size syntax description Update the filter option documentation text to link to ffmpeg-utils documentation for video size syntax description. Signed-off-by: Stefano Sabatini stefa...@gmail.com http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f34aca8a1612be6b474534902039814836cba259 --- doc/filters.texi | 57 -- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 485efcb..baef346 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -7820,8 +7820,8 @@ complete list of values. If not explicitly specified the filter applies the default flags. @item size, s -Set the video size. For the syntax of this option, check the Video size -section in the ffmpeg-utils manual. +Set the video size. For the syntax of this option, check the +@ref{video size syntax,,Video size section in the ffmpeg-utils manual,ffmpeg-utils}. @item in_color_matrix @item out_color_matrix @@ -8218,8 +8218,8 @@ The sample aspect ratio of the input frame, expressed in the form @var{num}/@var{den}. @item s -The size of the input frame. For the syntax of this option, check the Video size -section in the ffmpeg-utils manual. +The size of the input frame. For the syntax of this option, check the +@ref{video size syntax,,Video size section in the ffmpeg-utils manual,ffmpeg-utils}. @item i The type of interlaced mode (P for progressive, T for top field first, B @@ -8712,10 +8712,10 @@ Set the filename of the subtitle file to read. It must be specified. @item original_size Specify the size of the original video, the video for which the ASS file -was composed. For the syntax of this option, check the Video size section in -the ffmpeg-utils manual. Due to a misdesign in ASS aspect ratio arithmetic, -this is necessary to correctly scale the fonts if the aspect ratio has been -changed. +was composed. For the syntax of this option, check the +@ref{video size syntax,,Video size section in the ffmpeg-utils manual,ffmpeg-utils}. +Due to a misdesign in ASS aspect ratio arithmetic, this is necessary to +correctly scale the fonts if the aspect ratio has been changed. @item charenc Set subtitles input character encoding. @code{subtitles} filter only. Only @@ -8849,7 +8849,8 @@ The filter accepts the following options: @item layout Set the grid size (i.e. the number of lines and columns). For the syntax of -this option, check the Video size section in the ffmpeg-utils manual. +this option, check the +@ref{video size syntax,,Video size section in the ffmpeg-utils manual,ffmpeg-utils}. @item nb_frames Set the maximum number of frames to render in the given area. It must be less @@ -9907,8 +9908,8 @@ It accepts the following parameters: @item video_size Specify the size (width and height) of the buffered video frames. For the -syntax of this option, check the Video size section in the ffmpeg-utils -manual. +syntax of this option, check the +@ref{video size syntax,,Video size section in the ffmpeg-utils manual,ffmpeg-utils}. @item width The input video width. @@ -10008,8 +10009,8 @@ Set the cellular automaton rule, it is a number ranging from 0 to 255. Default value is 110. @item size, s -Set the size of the output video. For the syntax of this option, check -the Video size section in the ffmpeg-utils manual. +Set the size of the output video. For the syntax of this option, check the +@ref{video size syntax,,Video size section in the ffmpeg-utils manual,ffmpeg-utils}. If @option{filename} or @option{pattern} is specified, the size is set by default to the width of the specified initial state row, and the @@ -10209,7 +10210,7 @@ This source accepts the following parameters: @item size The size of the video to generate. For the syntax of this option, check the -Video size section in the ffmpeg-utils manual. +@ref{video size syntax,,Video size section in the ffmpeg-utils manual,ffmpeg-utils}. @item framerate The framerate of the generated video. It may be a string of the form @@ -10298,7 +10299,7 @@ a dead cell. @item size, s Set the size of the output video. For the syntax of this option, check the -Video size section in the ffmpeg-utils manual. +@ref{video size syntax,,Video size section in the ffmpeg-utils manual,ffmpeg-utils}. If @option{filename} is specified, the size is set by default to the same size of the input file. If @option{size} is set, it must contain @@ -10409,8 +10410,8 @@ coded on a @code{1/(N*N)} scale. @item size, s Specify the size of the sourced video. For the syntax of this option, check the -Video size section in the ffmpeg-utils manual. The default value is -320x240. +@ref{video size syntax,,Video size section in the ffmpeg-utils
[FFmpeg-cvslog] Changelog: add ffprobe -show_pixel_formats option
ffmpeg | branch: master | Tobias Rapp t.r...@noa-audio.com | Wed Oct 8 09:59:23 2014 +0200| [33db99548b99ebecb82b32cb82b4e49e3ecd4794] | committer: Michael Niedermayer Changelog: add ffprobe -show_pixel_formats option Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=33db99548b99ebecb82b32cb82b4e49e3ecd4794 --- Changelog |1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index 039d1ca..b59058b 100644 --- a/Changelog +++ b/Changelog @@ -4,6 +4,7 @@ releases are sorted from youngest to oldest. version next: - HEVC/H.265 RTP payload format (draft v6) packetizer - SUP/PGS subtitle demuxer +- ffprobe -show_pixel_formats option version 2.4: - Icecast protocol ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffprobe: add pixel format component bit depth output
ffmpeg | branch: master | Tobias Rapp t.r...@noa-audio.com | Mon Sep 15 17:15:42 2014 +0200| [7d327d62426206bd89fc2e0b996faa5be867c0a2] | committer: Michael Niedermayer ffprobe: add pixel format component bit depth output Adds output of bit depth per pixel format component to ffprobe -show_pixel_formats option. Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7d327d62426206bd89fc2e0b996faa5be867c0a2 --- doc/ffprobe.xsd | 12 ffprobe.c | 20 ++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd index e460e01..bf17186 100644 --- a/doc/ffprobe.xsd +++ b/doc/ffprobe.xsd @@ -290,9 +290,21 @@ xsd:attribute name=alpha type=xsd:int use=required/ /xsd:complexType +xsd:complexType name=pixelFormatComponentType + xsd:attribute name=index type=xsd:int use=required/ + xsd:attribute name=bit_depth type=xsd:int use=required/ +/xsd:complexType + +xsd:complexType name=pixelFormatComponentsType + xsd:sequence +xsd:element name=component type=ffprobe:pixelFormatComponentType minOccurs=0 maxOccurs=unbounded/ + /xsd:sequence +/xsd:complexType + xsd:complexType name=pixelFormatType xsd:sequence xsd:element name=flags type=ffprobe:pixelFormatFlagsType minOccurs=0 maxOccurs=1/ +xsd:element name=components type=ffprobe:pixelFormatComponentsType minOccurs=0 maxOccurs=1/ /xsd:sequence xsd:attribute name=nametype=xsd:string use=required/ diff --git a/ffprobe.c b/ffprobe.c index c0f9b84..b6df74b 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -68,6 +68,7 @@ static int do_show_program_version = 0; static int do_show_library_versions = 0; static int do_show_pixel_formats = 0; static int do_show_pixel_format_flags = 0; +static int do_show_pixel_format_components = 0; static int do_show_chapter_tags = 0; static int do_show_format_tags = 0; @@ -136,6 +137,8 @@ typedef enum { SECTION_ID_PACKETS_AND_FRAMES, SECTION_ID_PIXEL_FORMAT, SECTION_ID_PIXEL_FORMAT_FLAGS, +SECTION_ID_PIXEL_FORMAT_COMPONENT, +SECTION_ID_PIXEL_FORMAT_COMPONENTS, SECTION_ID_PIXEL_FORMATS, SECTION_ID_PROGRAM_STREAM_DISPOSITION, SECTION_ID_PROGRAM_STREAM_TAGS, @@ -171,8 +174,10 @@ static struct section sections[] = { [SECTION_ID_PACKETS_AND_FRAMES] = { SECTION_ID_PACKETS_AND_FRAMES, packets_and_frames, SECTION_FLAG_IS_ARRAY, { SECTION_ID_PACKET, -1} }, [SECTION_ID_PACKET] = { SECTION_ID_PACKET, packet, 0, { -1 } }, [SECTION_ID_PIXEL_FORMATS] = { SECTION_ID_PIXEL_FORMATS, pixel_formats, SECTION_FLAG_IS_ARRAY, { SECTION_ID_PIXEL_FORMAT, -1 } }, -[SECTION_ID_PIXEL_FORMAT] = { SECTION_ID_PIXEL_FORMAT, pixel_format, 0, { SECTION_ID_PIXEL_FORMAT_FLAGS, -1 } }, +[SECTION_ID_PIXEL_FORMAT] = { SECTION_ID_PIXEL_FORMAT, pixel_format, 0, { SECTION_ID_PIXEL_FORMAT_FLAGS, SECTION_ID_PIXEL_FORMAT_COMPONENTS, -1 } }, [SECTION_ID_PIXEL_FORMAT_FLAGS] = { SECTION_ID_PIXEL_FORMAT_FLAGS, flags, 0, { -1 }, .unique_name = pixel_format_flags }, +[SECTION_ID_PIXEL_FORMAT_COMPONENTS] = { SECTION_ID_PIXEL_FORMAT_COMPONENTS, components, SECTION_FLAG_IS_ARRAY, {SECTION_ID_PIXEL_FORMAT_COMPONENT, -1 }, .unique_name = pixel_format_components }, +[SECTION_ID_PIXEL_FORMAT_COMPONENT] = { SECTION_ID_PIXEL_FORMAT_COMPONENT, component, 0, { -1 } }, [SECTION_ID_PROGRAM_STREAM_DISPOSITION] = { SECTION_ID_PROGRAM_STREAM_DISPOSITION, disposition, 0, { -1 }, .unique_name = program_stream_disposition }, [SECTION_ID_PROGRAM_STREAM_TAGS] ={ SECTION_ID_PROGRAM_STREAM_TAGS, tags, SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = tag, .unique_name = program_stream_tags }, [SECTION_ID_PROGRAM] ={ SECTION_ID_PROGRAM, program, 0, { SECTION_ID_PROGRAM_TAGS, SECTION_ID_PROGRAM_STREAMS, -1 } }, @@ -2574,7 +2579,7 @@ static void ffprobe_show_library_versions(WriterContext *w) static void ffprobe_show_pixel_formats(WriterContext *w) { const AVPixFmtDescriptor *pixdesc = NULL; -int n; +int i, n; writer_print_section_header(w, SECTION_ID_PIXEL_FORMATS); while (pixdesc = av_pix_fmt_desc_next(pixdesc)) { @@ -2596,6 +2601,16 @@ static void ffprobe_show_pixel_formats(WriterContext *w) PRINT_PIX_FMT_FLAG(ALPHA, alpha); writer_print_section_footer(w); } +if (do_show_pixel_format_components (pixdesc-nb_components 0)) { +writer_print_section_header(w, SECTION_ID_PIXEL_FORMAT_COMPONENTS); +for (i = 0; i pixdesc-nb_components; i++) { +writer_print_section_header(w, SECTION_ID_PIXEL_FORMAT_COMPONENT); +print_int(index, i + 1); +print_int(bit_depth, pixdesc-comp[i].depth_minus1 + 1); +writer_print_section_footer(w
[FFmpeg-cvslog] ffprobe: add -show_pixel_formats option
ffmpeg | branch: master | Tobias Rapp t.r...@noa-audio.com | Thu Sep 11 09:16:52 2014 +0200| [143a8a44f4ec7a9a0fbd10909cc0cc93d5f39ace] | committer: Michael Niedermayer ffprobe: add -show_pixel_formats option Adds option -show_pixel_formats to ffprobe which lists all available pixel formats with some details. Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=143a8a44f4ec7a9a0fbd10909cc0cc93d5f39ace --- doc/ffprobe.texi |6 ++ doc/ffprobe.xsd | 13 + ffprobe.c| 33 +++-- 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/doc/ffprobe.texi b/doc/ffprobe.texi index 0a39ed4..5c90470 100644 --- a/doc/ffprobe.texi +++ b/doc/ffprobe.texi @@ -321,6 +321,12 @@ Show information related to program and library versions. This is the equivalent of setting both @option{-show_program_version} and @option{-show_library_versions} options. +@item -show_pixel_formats +Show information about all pixel formats supported by FFmpeg. + +Pixel format information for each format is printed within a section +with name PIXEL_FORMAT. + @item -bitexact Force bitexact output, useful to produce output which is not dependent on the specific build. diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd index 5dfbb47..598f651 100644 --- a/doc/ffprobe.xsd +++ b/doc/ffprobe.xsd @@ -10,6 +10,7 @@ xsd:sequence xsd:element name=program_version type=ffprobe:programVersionType minOccurs=0 maxOccurs=1 / xsd:element name=library_versions type=ffprobe:libraryVersionsType minOccurs=0 maxOccurs=1 / +xsd:element name=pixel_formats type=ffprobe:pixelFormatsTypeminOccurs=0 maxOccurs=1 / xsd:element name=packets type=ffprobe:packetsType minOccurs=0 maxOccurs=1 / xsd:element name=frames type=ffprobe:framesType minOccurs=0 maxOccurs=1 / xsd:element name=programs type=ffprobe:programsType minOccurs=0 maxOccurs=1 / @@ -277,4 +278,16 @@ xsd:element name=library_version type=ffprobe:libraryVersionType minOccurs=0 maxOccurs=unbounded/ /xsd:sequence /xsd:complexType + +xsd:complexType name=pixelFormatType + xsd:attribute name=nametype=xsd:string use=required/ + xsd:attribute name=nb_components type=xsd:int use=required/ + xsd:attribute name=bits_per_pixel type=xsd:int/ +/xsd:complexType + +xsd:complexType name=pixelFormatsType + xsd:sequence +xsd:element name=pixel_format type=ffprobe:pixelFormatType minOccurs=0 maxOccurs=unbounded/ + /xsd:sequence +/xsd:complexType /xsd:schema diff --git a/ffprobe.c b/ffprobe.c index 9bb0f0f..41667f1 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -66,6 +66,7 @@ static int do_show_stream_disposition = 0; static int do_show_data= 0; static int do_show_program_version = 0; static int do_show_library_versions = 0; +static int do_show_pixel_formats = 0; static int do_show_chapter_tags = 0; static int do_show_format_tags = 0; @@ -132,6 +133,8 @@ typedef enum { SECTION_ID_PACKET, SECTION_ID_PACKETS, SECTION_ID_PACKETS_AND_FRAMES, +SECTION_ID_PIXEL_FORMAT, +SECTION_ID_PIXEL_FORMATS, SECTION_ID_PROGRAM_STREAM_DISPOSITION, SECTION_ID_PROGRAM_STREAM_TAGS, SECTION_ID_PROGRAM, @@ -165,6 +168,8 @@ static struct section sections[] = { [SECTION_ID_PACKETS] ={ SECTION_ID_PACKETS, packets, SECTION_FLAG_IS_ARRAY, { SECTION_ID_PACKET, -1} }, [SECTION_ID_PACKETS_AND_FRAMES] = { SECTION_ID_PACKETS_AND_FRAMES, packets_and_frames, SECTION_FLAG_IS_ARRAY, { SECTION_ID_PACKET, -1} }, [SECTION_ID_PACKET] = { SECTION_ID_PACKET, packet, 0, { -1 } }, +[SECTION_ID_PIXEL_FORMATS] = { SECTION_ID_PIXEL_FORMATS, pixel_formats, SECTION_FLAG_IS_ARRAY, { SECTION_ID_PIXEL_FORMAT, -1 } }, +[SECTION_ID_PIXEL_FORMAT] = { SECTION_ID_PIXEL_FORMAT, pixel_format, 0, { -1 } }, [SECTION_ID_PROGRAM_STREAM_DISPOSITION] = { SECTION_ID_PROGRAM_STREAM_DISPOSITION, disposition, 0, { -1 }, .unique_name = program_stream_disposition }, [SECTION_ID_PROGRAM_STREAM_TAGS] ={ SECTION_ID_PROGRAM_STREAM_TAGS, tags, SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = tag, .unique_name = program_stream_tags }, [SECTION_ID_PROGRAM] ={ SECTION_ID_PROGRAM, program, 0, { SECTION_ID_PROGRAM_TAGS, SECTION_ID_PROGRAM_STREAMS, -1 } }, @@ -175,7 +180,8 @@ static struct section sections[] = { [SECTION_ID_PROGRAMS] = { SECTION_ID_PROGRAMS, programs, SECTION_FLAG_IS_ARRAY, { SECTION_ID_PROGRAM, -1 } }, [SECTION_ID_ROOT] = { SECTION_ID_ROOT, root, SECTION_FLAG_IS_WRAPPER, { SECTION_ID_CHAPTERS, SECTION_ID_FORMAT, SECTION_ID_FRAMES, SECTION_ID_PROGRAMS, SECTION_ID_STREAMS
[FFmpeg-cvslog] cmdutils: Add some whitespace when printing layouts
ffmpeg | branch: master | Tobias Rapp t.r...@noa-audio.com | Tue Sep 2 16:20:45 2014 +0200| [2c43cfe2d4051c14c18d904c830d4f0a2b1dbef1] | committer: Michael Niedermayer cmdutils: Add some whitespace when printing layouts Adds some more whitespace between channel layout name and decomposition. Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2c43cfe2d4051c14c18d904c830d4f0a2b1dbef1 --- cmdutils.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmdutils.c b/cmdutils.c index a71c7db..1143ea1 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -1639,19 +1639,19 @@ int show_layouts(void *optctx, const char *opt, const char *arg) const char *name, *descr; printf(Individual channels:\n - NAMEDESCRIPTION\n); + NAME DESCRIPTION\n); for (i = 0; i 63; i++) { name = av_get_channel_name((uint64_t)1 i); if (!name) continue; descr = av_get_channel_description((uint64_t)1 i); -printf(%-12s%s\n, name, descr); +printf(%-14s %s\n, name, descr); } printf(\nStandard channel layouts:\n - NAMEDECOMPOSITION\n); + NAME DECOMPOSITION\n); for (i = 0; !av_get_standard_channel_layout(i, layout, name); i++) { if (name) { -printf(%-12s, name); +printf(%-14s , name); for (j = 1; j; j = 1) if ((layout j)) printf(%s%s, (layout (j - 1)) ? + : , av_get_channel_name(j)); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog