[FFmpeg-devel] [PATCH v8 1/2] lavc/svt_hevc: add libsvt hevc encoder wrapper
Signed-off-by: Zhengxu Huang Signed-off-by: Hassene Tmar Signed-off-by: Jun Zhao Signed-off-by: Jing Sun --- configure| 4 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/libsvt_hevc.c | 505 +++ 4 files changed, 511 insertions(+) create mode 100644 libavcodec/libsvt_hevc.c diff --git a/configure b/configure index dcead3a..2884ad7 100755 --- a/configure +++ b/configure @@ -264,6 +264,7 @@ External library support: --enable-libspeexenable Speex de/encoding via libspeex [no] --enable-libsrt enable Haivision SRT protocol via libsrt [no] --enable-libssh enable SFTP protocol via libssh [no] + --enable-libsvthevc enable HEVC encoding via svt [no] --enable-libtensorflow enable TensorFlow as a DNN module backend for DNN based filters like sr [no] --enable-libtesseractenable Tesseract, needed for ocr filter [no] @@ -1784,6 +1785,7 @@ EXTERNAL_LIBRARY_LIST=" libspeex libsrt libssh +libsvthevc libtensorflow libtesseract libtheora @@ -3173,6 +3175,7 @@ libshine_encoder_select="audio_frame_queue" libspeex_decoder_deps="libspeex" libspeex_encoder_deps="libspeex" libspeex_encoder_select="audio_frame_queue" +libsvt_hevc_encoder_deps="libsvthevc" libtheora_encoder_deps="libtheora" libtwolame_encoder_deps="libtwolame" libvo_amrwbenc_encoder_deps="libvo_amrwbenc" @@ -6209,6 +6212,7 @@ enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr enabled libssh&& require_pkg_config libssh libssh libssh/sftp.h sftp_init enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init enabled libsrt&& require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket +enabled libsvthevc&& require_pkg_config libsvthevc SvtHevcEnc EbApi.h EbInitHandle enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 15c43a8..c93e545 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -987,6 +987,7 @@ OBJS-$(CONFIG_LIBOPUS_ENCODER)+= libopusenc.o libopus.o \ OBJS-$(CONFIG_LIBSHINE_ENCODER) += libshine.o OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o +OBJS-$(CONFIG_LIBSVT_HEVC_ENCODER)+= libsvt_hevc.o OBJS-$(CONFIG_LIBTHEORA_ENCODER) += libtheoraenc.o OBJS-$(CONFIG_LIBTWOLAME_ENCODER) += libtwolame.o OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index b26aeca..e93f66f 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -703,6 +703,7 @@ extern AVCodec ff_librsvg_decoder; extern AVCodec ff_libshine_encoder; extern AVCodec ff_libspeex_encoder; extern AVCodec ff_libspeex_decoder; +extern AVCodec ff_libsvt_hevc_encoder; extern AVCodec ff_libtheora_encoder; extern AVCodec ff_libtwolame_encoder; extern AVCodec ff_libvo_amrwbenc_encoder; diff --git a/libavcodec/libsvt_hevc.c b/libavcodec/libsvt_hevc.c new file mode 100644 index 000..5bed83e --- /dev/null +++ b/libavcodec/libsvt_hevc.c @@ -0,0 +1,505 @@ +/* +* Scalable Video Technology for HEVC encoder library plugin +* +* Copyright (c) 2018 Intel Corporation +* +* This file is part of FFmpeg. +* +* FFmpeg is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; either +* version 2.1 of the License, or (at your option) any later version. +* +* FFmpeg is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "EbErrorCodes.h" +#include "EbTime.h" +#include "EbApi.h" + +#include "libavutil/common.h" +#include "libavutil/frame.h" +#include "libavutil/opt.h" + +#include "internal.h" +#include "avcodec.h" + +typedef enum eos_status { +EOS_NOT_REACHED = 0, +EOS_REACHED, +EOS_TOTRIGGER +}EOS_STATUS; + +typedef struct SvtContext { +AVClass *class; + +EB_H265_ENC_CONFIGURATION enc_params; +EB_COMPONENTTYPE *svt_handle; +EB_BUFFERHEADERTYPE in_buf; +EOS_STATUS eos_flag; + +// User options. +int vui_info; +
[FFmpeg-devel] [PATCH v8 2/2] doc: Add libsvt_hevc encoder docs
Add docs for libsvt_hevc encoder in encoders.texi and general.texi Signed-off-by: Jun Zhao Signed-off-by: Zhengxu Huang Signed-off-by: Hassene Tmar Signed-off-by: Jing Sun --- doc/encoders.texi | 145 ++ doc/general.texi | 8 +++ 2 files changed, 153 insertions(+) diff --git a/doc/encoders.texi b/doc/encoders.texi index 29625ba..0b30776 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -1569,6 +1569,151 @@ Set maximum NAL size in bytes. Allow skipping frames to hit the target bitrate if set to 1. @end table +@section libsvt_hevc + +Scalable Video Technology for HEVC encoder (SVT-HEVC encoder) wrapper. + +This encoder requires the presence of the headers and +library during configuration. You need to explicitly configure the +build with @code{--enable-libsvthevc}. The library is detected using +@command{pkg-config}. + +For more information about the library see +@url{https://github.com/intel/SVT-HEVC.git}. + +@subsection Options + +The following FFmpeg global options affect the configurations of the +libsvt_hevc encoder. + +@table @option +@item b (@emph{bitrate}) +Set the bitrate (as a number of bits per second). Default is 7M. + +@item g / @option{gop_size} +Set the GOP size. Default is -2 (unspecified). + +@item flags +cgop +Enable closed GOP. + +@item qmin (@emph{min-q}) +Defaults 10 + +@item qmax (@emph{max-q}) +Defaults 48 + +Set minimum/maximum quantisation values. Valid range is from 0 to 51 +(Only used when bit rate control mode @option{rc} is set to 1(vbr) mode. +Has to be qmax > = qmin). + +@item profile (@emph{profile}) +Set profile restrictions. Can assume one of the following possible values: + +Default is 2 (main10). + +@table @samp +@item main +main profile +@item main10 +main10 profile +@end table + +@item level + +@option{profile} sets the value of @emph{profile}. +@option{level} sets the value of @emph{level}. + +The encoder also has its own specific options: + +@table @option +@item vui +Enables or disables the vui structure in the HEVC elementary +bitstream. 0 = Off, 1 = On. Default is 0 (Off). + +@item aud (@emph{aud}) +Enable use of access unit delimiters when set to 1. Default is 0 (Off). + +@item hielevel +Set hierarchical levels. Can assume one of the following possible values: + +Default is 3 (4level). + +@table @samp +@item flat +none hierarchy level +@item 2level +2-level hierarchy +@item 3level +3-level hierarchy +@item 4level +4-level hierarchy +@end table + +@item la_depth +Set look-ahead depth, depending on bit rate control mode @option{rc}, when +bit rate control mode is set to vbr it's best to set this parameter to be +equal to the intra period value (such is the default set by the encoder), +when cqp is chosen, then a look ahead is recommended. The range is from @var{0-256}. + +@item preset +A preset defining the quality vs density tradeoff point that the +encoding is to be performed at.(e.g. 0 is the highest quality mode, +12 is the highest density mode). The range is from @var{0-12}. Default is 9. + +@item tier +Set @emph{general_tier_flag}. This may affect the level chosen for the stream +if it is not explicitly specified. Can assume one of the following possible values: + +Default is 1 (main). + +@table @samp +@item main +main tier +@item high +high tier +@end table + +@item rc +Set bit rate control mode. Can assume one of the following possible values: + +Default is 0 (cqp). + +@table @samp +@item cqp +Constant QP (CQP) mode +@item vbr +Variable Bit Rate (VBR) mode +@end table + +@item qp +Initial quantization parameter for the intra pictures used when +@option{rc} is cqp mode. The range is from @var{0-51}. Default is 32. + +@item sc_detection +Enables or disables the scene change detection algorithm. Default is 0 (disable). + +@item tune +Set quality tuning mode. Can assume one of the following possible values: + +Default is 1 (oq). + +@table @samp +@item sq +Visually optimized mode +@item oq +PSNR / SSIM optimized mode +@item vmaf +VMAF optimized mode +@end table + +@item bl_mode +Enables or disables Random Access Prediction. Default is 0 (disable). +@end table + +@item hdr +High dynamic range input. Default is 0 (disable). +@end table + @section libtheora libtheora Theora encoder wrapper. diff --git a/doc/general.texi b/doc/general.texi index fe94c40..f90e188 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -234,6 +234,14 @@ FFmpeg can use the OpenJPEG libraries for decoding/encoding J2K videos. Go to instructions. To enable using OpenJPEG in FFmpeg, pass @code{--enable-libopenjpeg} to @file{./configure}. +@section Scalable Video Technology for HEVC + +FFmpeg can make use of the SVT-HEVC library for HEVC encoding. + +Go to @url{https://github.com/intel/SVT-HEVC.git} and follow the instructions +for installing the library. Pass @code{--enable-libsvthevc} to configure to +enable it. + @section TwoLAME FFmpeg can make use of the TwoLAME library for MP2 encoding. --
[FFmpeg-devel] [PATCH v8 1/2] lavc/svt_hevc: add libsvt hevc encoder wrapper
Signed-off-by: Zhengxu Huang Signed-off-by: Hassene Tmar Signed-off-by: Jun Zhao Signed-off-by: Jing Sun --- configure| 4 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/libsvt_hevc.c | 505 +++ 4 files changed, 511 insertions(+) create mode 100644 libavcodec/libsvt_hevc.c diff --git a/configure b/configure index dcead3a..36bc8c1 100755 --- a/configure +++ b/configure @@ -264,6 +264,7 @@ External library support: --enable-libspeexenable Speex de/encoding via libspeex [no] --enable-libsrt enable Haivision SRT protocol via libsrt [no] --enable-libssh enable SFTP protocol via libssh [no] + --enable-libsvthevc enable HEVC encoding via svt [no] --enable-libtensorflow enable TensorFlow as a DNN module backend for DNN based filters like sr [no] --enable-libtesseractenable Tesseract, needed for ocr filter [no] @@ -1784,6 +1785,7 @@ EXTERNAL_LIBRARY_LIST=" libspeex libsrt libssh +libsvthevc libtensorflow libtesseract libtheora @@ -3173,6 +3175,7 @@ libshine_encoder_select="audio_frame_queue" libspeex_decoder_deps="libspeex" libspeex_encoder_deps="libspeex" libspeex_encoder_select="audio_frame_queue" +libsvt_hevc_encoder_deps="libsvthevc" libtheora_encoder_deps="libtheora" libtwolame_encoder_deps="libtwolame" libvo_amrwbenc_encoder_deps="libvo_amrwbenc" @@ -6209,6 +6212,7 @@ enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr enabled libssh&& require_pkg_config libssh libssh libssh/sftp.h sftp_init enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init enabled libsrt&& require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket +enabled libsvthevc&& require_pkg_config libsvthevc SvtHevcEnc svt-hevc/EbApi.h EbInitHandle enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 15c43a8..c93e545 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -987,6 +987,7 @@ OBJS-$(CONFIG_LIBOPUS_ENCODER)+= libopusenc.o libopus.o \ OBJS-$(CONFIG_LIBSHINE_ENCODER) += libshine.o OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o +OBJS-$(CONFIG_LIBSVT_HEVC_ENCODER)+= libsvt_hevc.o OBJS-$(CONFIG_LIBTHEORA_ENCODER) += libtheoraenc.o OBJS-$(CONFIG_LIBTWOLAME_ENCODER) += libtwolame.o OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index b26aeca..e93f66f 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -703,6 +703,7 @@ extern AVCodec ff_librsvg_decoder; extern AVCodec ff_libshine_encoder; extern AVCodec ff_libspeex_encoder; extern AVCodec ff_libspeex_decoder; +extern AVCodec ff_libsvt_hevc_encoder; extern AVCodec ff_libtheora_encoder; extern AVCodec ff_libtwolame_encoder; extern AVCodec ff_libvo_amrwbenc_encoder; diff --git a/libavcodec/libsvt_hevc.c b/libavcodec/libsvt_hevc.c new file mode 100644 index 000..c6ec3ff --- /dev/null +++ b/libavcodec/libsvt_hevc.c @@ -0,0 +1,505 @@ +/* +* Scalable Video Technology for HEVC encoder library plugin +* +* Copyright (c) 2018 Intel Corporation +* +* This file is part of FFmpeg. +* +* FFmpeg is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; either +* version 2.1 of the License, or (at your option) any later version. +* +* FFmpeg is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "svt-hevc/EbErrorCodes.h" +#include "svt-hevc/EbTime.h" +#include "svt-hevc/EbApi.h" + +#include "libavutil/common.h" +#include "libavutil/frame.h" +#include "libavutil/opt.h" + +#include "internal.h" +#include "avcodec.h" + +typedef enum eos_status { +EOS_NOT_REACHED = 0, +EOS_REACHED, +EOS_TOTRIGGER +}EOS_STATUS; + +typedef struct SvtContext { +AVClass *class; + +EB_H265_ENC_CONFIGURATION enc_params; +EB_COMPONENTTYPE *svt_handle; +EB_BUFFERHEADERTYPE in_buf; +EOS_STATUS eos_flag; + +// U
Re: [FFmpeg-devel] [PATCH v5] avformat/smoothstreamingenc:add bitrate calculate
> 在 2019年3月18日,下午4:33,Liu Steven 写道: > > > >> 在 2019年3月18日,上午8:52,Jun Li 写道: >> >> On Fri, Mar 15, 2019 at 6:04 PM Jun Li wrote: >> >>> Calculate bitrate based on fragment size, only applied when >>> bitrate is not set, for example rtsp source. >>> >>> Signed-off-by: Jun Li >>> --- >>> libavformat/smoothstreamingenc.c | 32 +++- >>> 1 file changed, 27 insertions(+), 5 deletions(-) >>> >>> diff --git a/libavformat/smoothstreamingenc.c >>> b/libavformat/smoothstreamingenc.c >>> index 094712af27..bd7f841dc7 100644 >>> --- a/libavformat/smoothstreamingenc.c >>> +++ b/libavformat/smoothstreamingenc.c >>> @@ -320,11 +320,13 @@ static int ism_write_header(AVFormatContext *s) >>>AVDictionary *opts = NULL; >>> >>>if (!s->streams[i]->codecpar->bit_rate) { >>> -av_log(s, AV_LOG_ERROR, "No bit rate set for stream %d\n", i); >>> -ret = AVERROR(EINVAL); >>> -goto fail; >>> +av_log(s, AV_LOG_WARNING, "No bit rate set for stream %d\n", >>> i); >>> +// create a tmp name for the directory of fragments >>> +snprintf(os->dirname, sizeof(os->dirname), >>> "%s/QualityLevels(Tmp_%d)", s->url, i); >>> +} else { >>> +snprintf(os->dirname, sizeof(os->dirname), >>> "%s/QualityLevels(%"PRId64")", s->url, s->streams[i]->codecpar->bit_rate); >>>} >>> -snprintf(os->dirname, sizeof(os->dirname), >>> "%s/QualityLevels(%"PRId64")", s->url, s->streams[i]->codecpar->bit_rate); >>> + >>>if (mkdir(os->dirname, 0777) == -1 && errno != EEXIST) { >>>ret = AVERROR(errno); >>>av_log(s, AV_LOG_ERROR, "mkdir failed\n"); >>> @@ -519,7 +521,7 @@ static int ism_flush(AVFormatContext *s, int final) >>> >>>for (i = 0; i < s->nb_streams; i++) { >>>OutputStream *os = &c->streams[i]; >>> -char filename[1024], target_filename[1024], header_filename[1024]; >>> +char filename[1024], target_filename[1024], >>> header_filename[1024], curr_dirname[1024]; >>>int64_t size; >>>int64_t start_ts, duration, moof_size; >>>if (!os->packets_written) >>> @@ -541,6 +543,26 @@ static int ism_flush(AVFormatContext *s, int final) >>>size = os->tail_pos - os->cur_start_pos; >>>if ((ret = parse_fragment(s, filename, &start_ts, &duration, >>> &moof_size, size)) < 0) >>>break; >>> + >>> +if (!s->streams[i]->codecpar->bit_rate) { >>> +int64_t bitrate = (int64_t) size * 8 * AV_TIME_BASE / >>> av_rescale_q(duration, s->streams[i]->time_base, AV_TIME_BASE_Q); >>> +if (!bitrate) { >>> +av_log(s, AV_LOG_ERROR, "calculating bitrate got >>> zero.\n"); >>> +ret = AVERROR(EINVAL); >>> +return ret; >>> +} >>> + >>> +av_log(s, AV_LOG_DEBUG, "calculated bitrate: %"PRId64"\n", >>> bitrate); >>> +s->streams[i]->codecpar->bit_rate = bitrate; >>> +memcpy(curr_dirname, os->dirname, sizeof(os->dirname)); >>> +snprintf(os->dirname, sizeof(os->dirname), >>> "%s/QualityLevels(%"PRId64")", s->url, s->streams[i]->codecpar->bit_rate); >>> +snprintf(filename, sizeof(filename), "%s/temp", os->dirname); >>> + >>> +// rename the tmp folder back to the correct name since we >>> now have the bitrate >>> +if ((ret = ff_rename((const char*)curr_dirname, os->dirname, >>> s)) < 0) >>> +return ret; >>> +} >>> + >>>snprintf(header_filename, sizeof(header_filename), >>> "%s/FragmentInfo(%s=%"PRIu64")", os->dirname, os->stream_type_tag, >>> start_ts); >>>snprintf(target_filename, sizeof(target_filename), >>> "%s/Fragments(%s=%"PRIu64")", os->dirname, os->stream_type_tag, start_ts); >>>copy_moof(s, filename, header_filename, moof_size); >>> -- >>> 2.17.1 >>> >> >> >> Ping. >> ___ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > LGTM Applied. Thanks > > > Thanks > > Steven > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/tiff: Add support for recognizing DNG files
Hello, >Similarly if we support demuxing "auxilary / secondary or what they are called >images" and muxing then we should be able to connect these and not just be >able to extract one image. >Thats the ideal. The question how to implement this, or if this is the way to >go or if this is too complex to do is up to the mentor for a GSoC project. >It could be done by spliting into streams at the demuxer level, by using side >data or decoding the images in sequence in the decoder or other ways. Each of >these seem to have disadvanatges ... Ok, but what does this have to do with my patch though? Isn't something like this possible with TIFF images too? As far as I know, that's not supported at the moment either, I only know of -subimage which I don't think does exactly what you mean. Not to mention, this patch is for preliminary support, I don't suppose you require a massive patchset that implements everything altogether? Besides, GSoC requirements state that I need to get a minor patch in, before I can even apply. This is what this patch is for. >Here is one file that works just fine with current ffmpeg: >https://0x0.st/z8pf.dng Not sure why this was mentioned? It works with my patch too. I thought we came to an agreement, that by default it should show a message, instructing the user to show that they can decode the thumbnail with -subimage. This is what my patch does. Nick R. Στις Τρί, 19 Μαρ 2019 στις 12:58 μ.μ., ο/η Paul B Mahol έγραψε: > > On 3/19/19, Nick Renieris wrote: > > Yes, obviously this is not complete. As was said, the DNG spec is huge > > and I did bring up this concern in a personal email to Paul a few days > > ago. > > I was told that: > >> 3 months should be enough to finish most of specification, note you work > >> on real world DNG files, so if some feature from spec is not present in > >> any file you have less work to do > > which I absolutely agree with. > > The context of my contribution in this case is GSoC, so let's talk > > about that: Wouldn't it be better if by the end of GSoC, FFmpeg could > > open all or most of the DNG files that actually exist out there, > > instead of having only specific parts of the spec implemented > > thoroughly? > > > >>A design that can only extract one image of many or one stream or one > >> channel. Cannot preserve all information so it fails that simple use case. > > > >> Shouldn't, ideally, these image files be demuxed as two image streams? > >> Perhaps with the "main" image as the first stream. > > > > Ideally, yes of course. > > Realistically, I think the images with NewSubFileType != 0 and > > NewSubFileType != 4 are of secondary interest to decode, as they are > > commonly simply reduced resolution images of their counterparts. > > In any case, it will probably not be hard to add once the important > > parts are implemented. > > > >> Still wrong, There are DNG images without thumbnails. > > > > I suspected so but didn't have any examples to test with. > > I just found one. The following happens if -subimage 1 is used: > > > > [tiff @ 0x7fffe4099180] DNG images are not supported > > [tiff @ 0x7fffe4099180] Decoding embedded TIFF thumbnail in DNG image > > [tiff @ 0x7fffe4099180] This format is not supported (bpp=14, bppcount=1) > > > > Is this a problem? If so: > > I'm still not done reading the spec(s), but as far as I understand it, > > there is no way that a DNG image with NewSubFileType != 1 would be in > > a standard TIFF format that we can decode right now. Therefore, I > > propose a check for this in decode_frame (would also check if dng_mode > > is enabled) to prevent the above non-user friendly error from > > happening. > > > > I suspect NewSubFileType is not the right way to go though since the > > actual image format is not specified with it. I looked at the tags > > from some DNGs and I can't narrow it down to any other better field > > for this. > > > > Any better ideas? Should I perhaps just let it succeed or fail based > > on the existing decoding code, as it does above? The error checking in > > that code is the absolute truth of what is actually implemented after > > all. > > > >> I've used their libdng for a project. It's a big LGPL library implementing > >> pretty much everything, but no distro really ships it, so it'd have to be > >> embedded or built manually by the user. > > > > Definitely something to consider. Given the posted GSoC project idea, > > I assumed it was not possible/preferable for it to be embedded. > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > Here is one file that works just fine with current ffmpeg: > https://0x0.st/z8pf.dng > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.o
Re: [FFmpeg-devel] [PATCH v2 1/1] lavc/h264_levels: add MaxMBPS checking and update fate test.
Any comments before applying the patch? > -Original Message- > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of > Decai Lin > Sent: 2019年3月8日 14:39 > To: ffmpeg-devel@ffmpeg.org > Cc: Lin, Decai > Subject: [FFmpeg-devel] [PATCH v2 1/1] lavc/h264_levels: add MaxMBPS > checking and update fate test. > > 1. add MaxMBPS checking for level idc setting to align with AVC spec >AnnexA table A-1/A-6 level limits. > 2. update h264 level fate test. > > Signed-off-by: Decai Lin > --- > libavcodec/h264_levels.c | 6 + > libavcodec/h264_levels.h | 1 + > libavcodec/h264_metadata_bsf.c | 10 +++- > libavcodec/tests/h264_levels.c | 58 > +++--- > libavcodec/vaapi_encode_h264.c | 7 + > 5 files changed, 78 insertions(+), 4 deletions(-) > > diff --git a/libavcodec/h264_levels.c b/libavcodec/h264_levels.c index > 7a55116..7fdb61d 100644 > --- a/libavcodec/h264_levels.c > +++ b/libavcodec/h264_levels.c > @@ -89,6 +89,7 @@ const H264LevelDescriptor *ff_h264_get_level(int > level_idc, > > const H264LevelDescriptor *ff_h264_guess_level(int profile_idc, > int64_t bitrate, > + int framerate, > int width, int height, > int > max_dec_frame_buffering) { @@ -116,6 +117,11 @@ const > H264LevelDescriptor *ff_h264_guess_level(int profile_idc, > continue; > > if (width_mbs && height_mbs) { > +if (framerate > level->max_mbps / (width_mbs * > height_mbs)) > +continue; > +} > + > +if (width_mbs && height_mbs) { > int max_dpb_frames = > FFMIN(level->max_dpb_mbs / (width_mbs * > height_mbs), 16); > if (max_dec_frame_buffering > max_dpb_frames) diff --git > a/libavcodec/h264_levels.h b/libavcodec/h264_levels.h index > 4189fc6..0a0f410 100644 > --- a/libavcodec/h264_levels.h > +++ b/libavcodec/h264_levels.h > @@ -46,6 +46,7 @@ const H264LevelDescriptor *ff_h264_get_level(int > level_idc, > */ > const H264LevelDescriptor *ff_h264_guess_level(int profile_idc, > int64_t bitrate, > + int framerate, > int width, int height, > int > max_dec_frame_buffering); > > diff --git a/libavcodec/h264_metadata_bsf.c > b/libavcodec/h264_metadata_bsf.c index a17987a..4ad9664 100644 > --- a/libavcodec/h264_metadata_bsf.c > +++ b/libavcodec/h264_metadata_bsf.c > @@ -223,6 +223,7 @@ static int > h264_metadata_update_sps(AVBSFContext *bsf, > const H264LevelDescriptor *desc; > int64_t bit_rate; > int width, height, dpb_frames; > +int framerate; > > if (sps->vui.nal_hrd_parameters_present_flag) { > bit_rate = > (sps->vui.nal_hrd_parameters.bit_rate_value_minus1[0] + 1) * @@ -244,7 > +245,14 @@ static int h264_metadata_update_sps(AVBSFContext *bsf, > height = 16 * (sps->pic_height_in_map_units_minus1 + 1) * > (2 - sps->frame_mbs_only_flag); > > -desc = ff_h264_guess_level(sps->profile_idc, bit_rate, > +if (sps->vui.timing_info_present_flag) { > +framerate = sps->vui.time_scale / > sps->vui.num_units_in_tick; > +} > +else { > +framerate = 0; > +} > + > +desc = ff_h264_guess_level(sps->profile_idc, bit_rate, > + framerate, > width, height, dpb_frames); > if (desc) { > level_idc = desc->level_idc; diff --git > a/libavcodec/tests/h264_levels.c b/libavcodec/tests/h264_levels.c index > 0e00f05..1f2c2eb 100644 > --- a/libavcodec/tests/h264_levels.c > +++ b/libavcodec/tests/h264_levels.c > @@ -62,6 +62,48 @@ static const struct { static const struct { > int width; > int height; > +int framerate; > +int level_idc; > +} test_framerate[] = { > +// Some typical sizes and frame rates. > +// (From H.264 table A-1 and table A-6) > +{ 176, 144, 15, 10 }, > +{ 176, 144, 16, 11 }, > +{ 320, 240, 10, 11 }, > +{ 320, 240, 20, 12 }, > +{ 320, 240, 40, 21 }, > +{ 352, 288, 30, 13 }, > +{ 352, 288, 51, 22 }, > +{ 352, 576, 25, 21 }, > +{ 352, 576, 26, 30 }, > +{ 640, 480, 33, 30 }, > +{ 640, 480, 34, 31 }, > +{ 720, 480, 50, 31 }, > +{ 720, 576, 25, 30 }, > +{ 800, 600, 55, 31 }, > +{ 1024, 768, 35, 31 }, > +{ 1024, 768, 70, 32 }, > +{ 1280, 720, 30, 31 }, > +{ 1280, 720, 31, 32 }, > +{ 1280, 960, 45, 32 }, > +{ 1280, 960, 46, 40 }, > +{ 1280, 1024, 42, 32 }
[FFmpeg-devel] [PATCH 1/2] avcodec/jpeg2000dec: Skip de-quantization of empty areas
Fixes: Timeout (26sec -> 18sec) Fixes: 13448/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-576903098243481 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/jpeg2000dec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index a4291bc06b..7749c980e5 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -1730,6 +1730,8 @@ static inline void tile_codeblocks(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile bandpos); if (ret) coded = 1; +else +continue; x = cblk->coord[0][0] - band->coord[0][0]; y = cblk->coord[1][0] - band->coord[1][0]; -- 2.21.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/2] avcodec/prosumer: Check decoded size
Fixes: Timeout (longer than i had patience for -> 2sec) Fixes: 13205/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PROSUMER_fuzzer-5105644481282048 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/prosumer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/prosumer.c b/libavcodec/prosumer.c index ce3cbdbb73..f064f7bad7 100644 --- a/libavcodec/prosumer.c +++ b/libavcodec/prosumer.c @@ -159,6 +159,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, ret = decompress(&s->gb, AV_RL32(avpkt->data + 28) >> 1, &s->pb, s->lut); if (ret < 0) return ret; +if (bytestream2_get_bytes_left_p(&s->pb) > s->size * (int64_t)avctx->discard_damaged_percentage / 100) +return AVERROR_INVALIDDATA; vertical_predict((uint32_t *)s->decbuffer, 0, (uint32_t *)s->initial_line, s->stride, 1); vertical_predict((uint32_t *)s->decbuffer, s->stride, (uint32_t *)s->decbuffer, s->stride, avctx->height - 1); -- 2.21.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] backport fixes for CVE-2019-9718 and CVE-2019-9721
2019-03-19 23:28 GMT+01:00, Dominik 'Rathann' Mierzejewski : > Were the CVE IDs not known at the time these were pushed to master? No, how would this be possible? > Not having them in the commit log made it more difficult to find them. I thought the CVE's themselves contains the commits, no? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2] avformat/http: Add option to disable send-100-continue
On Tue, Mar 19, 2019 at 3:52 PM Jun Li wrote: > The current setting for send-100-continue is either > applicable or enabled, no option to disable the header. > This change is to expand the option setting to provide > more flexibility, which is useful for rstp case. > --- > libavformat/http.c | 15 +-- > 1 file changed, 9 insertions(+), 6 deletions(-) > > diff --git a/libavformat/http.c b/libavformat/http.c > index ed0eb1c875..7e74719450 100644 > --- a/libavformat/http.c > +++ b/libavformat/http.c > @@ -113,7 +113,7 @@ typedef struct HTTPContext { > uint8_t *inflate_buffer; > #endif /* CONFIG_ZLIB */ > AVDictionary *chained_options; > -int send_expect_100; > +int send_expect_100;/* -1 = try to send if applicable, 0 = always > disabled, 1 = always enabled */ > char *method; > int reconnect; > int reconnect_at_eof; > @@ -155,7 +155,7 @@ static const AVOption options[] = { > { "auth_type", "HTTP authentication type", > OFFSET(auth_state.auth_type), AV_OPT_TYPE_INT, { .i64 = HTTP_AUTH_NONE }, > HTTP_AUTH_NONE, HTTP_AUTH_BASIC, D | E, "auth_type"}, > { "none", "No auth method set, autodetect", 0, AV_OPT_TYPE_CONST, { > .i64 = HTTP_AUTH_NONE }, 0, 0, D | E, "auth_type"}, > { "basic", "HTTP basic authentication", 0, AV_OPT_TYPE_CONST, { .i64 > = HTTP_AUTH_BASIC }, 0, 0, D | E, "auth_type"}, > -{ "send_expect_100", "Force sending an Expect: 100-continue header > for POST", OFFSET(send_expect_100), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, E > }, > +{ "send_expect_100", "Force sending an Expect: 100-continue header > for POST", OFFSET(send_expect_100), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, > E }, > { "location", "The actual location of the data received", > OFFSET(location), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, > { "offset", "initial byte offset", OFFSET(off), AV_OPT_TYPE_INT64, { > .i64 = 0 }, 0, INT64_MAX, D }, > { "end_offset", "try to limit the request to bytes preceding this > offset", OFFSET(end_off), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, D > }, > @@ -1179,12 +1179,15 @@ static int http_connect(URLContext *h, const char > *path, const char *local_path, > local_path, method); > proxyauthstr = ff_http_auth_create_response(&s->proxy_auth_state, > proxyauth, > local_path, method); > -if (post && !s->post_data) { > + > +if (s->send_expect_100 != -1) { > +send_expect_100 = s->send_expect_100; > +} else if (post && !s->post_data) { > send_expect_100 = s->send_expect_100; > /* The user has supplied authentication but we don't know the > auth type, > - * send Expect: 100-continue to get the 401 response including the > - * WWW-Authenticate header, or an 100 continue if no auth actually > - * is needed. */ > +* send Expect: 100-continue to get the 401 response including the > +* WWW-Authenticate header, or an 100 continue if no auth actually > +* is needed. */ > if (auth && *auth && > s->auth_state.auth_type == HTTP_AUTH_NONE && > s->http_code != 401) > -- > 2.17.1 This patch is for the issue I found when I test "RTSP tunnel HTTP" (protocol defined by Apple, but no RFC found) on Bosch and Axix IP cameras. It caused when RTP/RTSP tunnelling in HTTP, post-data is empty when sending http header(because data for tunnel is not ready yet, rtsp.c line 1816, function "ffurl_connect"), our http implementation will send "EXPECT: 100-continue" in the header. The post data is actually tunneled and sent out later in the rtsp implementation. This header is not widely used by web server, even less for RTSP servers. Neither Bosch and Axis cameras support that. Meanwhile, when I go through the Apple spec, it does not have any 100-continue header at all. I am not sure this is a regression after introducing 100-continue or not. But based on my testing on IP cameras, it always fail when tunneling RTSP into HTTP with credentials. Thanks -Jun ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v1 1/3] avformat/http: Add option to disable send-100-continue
On Tue, Mar 19, 2019 at 3:21 PM Carl Eugen Hoyos wrote: > 2019-03-19 22:58 GMT+01:00, Jun Li : > > The current setting for send-100-continue is either > > applicable or enabled, no option to disable the header. > > This change is to expand the option setting to provide > > more flexibility, which is useful for rstp case. > > --- > > libavformat/http.c | 15 +-- > > 1 file changed, 9 insertions(+), 6 deletions(-) > > > > diff --git a/libavformat/http.c b/libavformat/http.c > > index ed0eb1c875..7e74719450 100644 > > --- a/libavformat/http.c > > +++ b/libavformat/http.c > > @@ -113,7 +113,7 @@ typedef struct HTTPContext { > > uint8_t *inflate_buffer; > > #endif /* CONFIG_ZLIB */ > > AVDictionary *chained_options; > > -int send_expect_100; > > +// -1 = try to send if applicable, 0 = always disabled, 1 = always > > enabled > > int send_expect_100; > > char *method; > > int reconnect; > > int reconnect_at_eof; > > It seems to me that something is broken in this hunk. > > Carl Eugen > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel Yes Carl, Thanks for review. I updated the version: https://patchwork.ffmpeg.org/patch/12359/ ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v2] avformat/westwood_aud: Adds PCM format demux.
PCM format AUD files are found in Westwood's Blade Runner game. --- libavformat/westwood_aud.c | 83 -- 1 file changed, 66 insertions(+), 17 deletions(-) diff --git a/libavformat/westwood_aud.c b/libavformat/westwood_aud.c index 9c2d35cb8a..b25d299bf0 100644 --- a/libavformat/westwood_aud.c +++ b/libavformat/westwood_aud.c @@ -41,6 +41,12 @@ #define AUD_HEADER_SIZE 12 #define AUD_CHUNK_PREAMBLE_SIZE 8 #define AUD_CHUNK_SIGNATURE 0xDEAF +#define AUD_PCM_CHUNK_SIZE 2048 /* arbitrary size to pull out of PCM data*/ + +typedef struct AUDDemuxContext { +int size; +int pos; +} AUDDemuxContext; static int wsaud_probe(AVProbeData *p) { @@ -50,10 +56,10 @@ static int wsaud_probe(AVProbeData *p) * so perform sanity checks on various header parameters: * 8000 <= sample rate (16 bits) <= 48000 ==> 40001 acceptable numbers * flags <= 0x03 (2 LSBs are used) ==> 4 acceptable numbers - * compression type (8 bits) = 1 or 99 ==> 2 acceptable numbers + * compression type (8 bits) = 0, 1 or 99 ==> 3 acceptable numbers * first audio chunk signature (32 bits) ==> 1 acceptable number - * The number space contains 2^64 numbers. There are 40001 * 4 * 2 * 1 = - * 320008 acceptable number combinations. + * The number space contains 2^64 numbers. There are 40001 * 4 * 3 * 1 = + * 480012 acceptable number combinations. */ if (p->buf_size < AUD_HEADER_SIZE + AUD_CHUNK_PREAMBLE_SIZE) @@ -69,13 +75,25 @@ static int wsaud_probe(AVProbeData *p) if (p->buf[10] & 0xFC) return 0; -if (p->buf[11] != 99 && p->buf[11] != 1) +/* valid format values are 99 == adpcm, 1 == snd1 and 0 == pcm */ +if (p->buf[11] != 99 && p->buf[11] != 1 && p->buf[11] != 0) return 0; -/* read ahead to the first audio chunk and validate the first header signature */ -if (AV_RL32(&p->buf[16]) != AUD_CHUNK_SIGNATURE) +/* read ahead to the first audio chunk and validate the first header + * signature pcm format does not use a chunk format, so don't check + * for that codec */ +if (p->buf[11] != 0 && AV_RL32(&p->buf[16]) != AUD_CHUNK_SIGNATURE) return 0; +/* if we have pcm format then compressed size should equal + * uncompressed size */ +if (p->buf[11] == 0) { +if (AV_RL32(&p->buf[2]) != AV_RL32(&p->buf[6])) +return 0; +if (AV_RL32(&p->buf[2]) + AUD_HEADER_SIZE < p->buf_size) +return 0; +} + /* return 1/2 certainty since this file check is a little sketchy */ return AVPROBE_SCORE_EXTENSION; } @@ -83,16 +101,20 @@ static int wsaud_probe(AVProbeData *p) static int wsaud_read_header(AVFormatContext *s) { AVIOContext *pb = s->pb; +AUDDemuxContext *aud = s->priv_data; AVStream *st; unsigned char header[AUD_HEADER_SIZE]; -int sample_rate, channels, codec; +int sample_rate, channels, codec, bits_per_sample; if (avio_read(pb, header, AUD_HEADER_SIZE) != AUD_HEADER_SIZE) return AVERROR(EIO); sample_rate = AV_RL16(&header[0]); channels= (header[10] & 0x1) + 1; +bits_per_sample = (header[10] & 0x2) ? 16 : 8; codec = header[11]; +aud->size = AV_RL32(&header[2]); +aud->pos= 0; /* used to track position in a PCM stream */ /* initialize the audio decoder stream */ st = avformat_new_stream(s, NULL); @@ -100,6 +122,15 @@ static int wsaud_read_header(AVFormatContext *s) return AVERROR(ENOMEM); switch (codec) { +case 0: +if (bits_per_sample == 8) { +st->codecpar->codec_id = AV_CODEC_ID_PCM_U8; +} else { +st->codecpar->codec_id = AV_CODEC_ID_PCM_S16LE; +} +st->codecpar->bits_per_coded_sample = bits_per_sample; +st->codecpar->bit_rate = channels * sample_rate * bits_per_sample; +break; case 1: if (channels != 1) { avpriv_request_sample(s, "Stereo WS-SND1"); @@ -130,20 +161,24 @@ static int wsaud_read_packet(AVFormatContext *s, AVPacket *pkt) { AVIOContext *pb = s->pb; +AUDDemuxContext *aud = s->priv_data; unsigned char preamble[AUD_CHUNK_PREAMBLE_SIZE]; -unsigned int chunk_size; +unsigned int chunk_size, bytes_per_sample; int ret = 0; AVStream *st = s->streams[0]; -if (avio_read(pb, preamble, AUD_CHUNK_PREAMBLE_SIZE) != -AUD_CHUNK_PREAMBLE_SIZE) -return AVERROR(EIO); +/* AUD files don't store PCM audio in chunks */ +if (st->codecpar->codec_id != AV_CODEC_ID_PCM_S16LE) { +if (avio_read(pb, preamble, AUD_CHUNK_PREAMBLE_SIZE) != +AUD_CHUNK_PREAMBLE_SIZE) +return AVERROR(EIO); -/* validate the chunk */ -if (AV_RL32(&preamble[4]) != AUD_CHUNK_SIGNATURE) -return AVERROR_INVALIDDATA; +/* validate the chunk */ +if (AV_RL32(&preamble[4]) !=
[FFmpeg-devel] [PATCH v2] avformat/http: Add option to disable send-100-continue
The current setting for send-100-continue is either applicable or enabled, no option to disable the header. This change is to expand the option setting to provide more flexibility, which is useful for rstp case. --- libavformat/http.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index ed0eb1c875..7e74719450 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -113,7 +113,7 @@ typedef struct HTTPContext { uint8_t *inflate_buffer; #endif /* CONFIG_ZLIB */ AVDictionary *chained_options; -int send_expect_100; +int send_expect_100;/* -1 = try to send if applicable, 0 = always disabled, 1 = always enabled */ char *method; int reconnect; int reconnect_at_eof; @@ -155,7 +155,7 @@ static const AVOption options[] = { { "auth_type", "HTTP authentication type", OFFSET(auth_state.auth_type), AV_OPT_TYPE_INT, { .i64 = HTTP_AUTH_NONE }, HTTP_AUTH_NONE, HTTP_AUTH_BASIC, D | E, "auth_type"}, { "none", "No auth method set, autodetect", 0, AV_OPT_TYPE_CONST, { .i64 = HTTP_AUTH_NONE }, 0, 0, D | E, "auth_type"}, { "basic", "HTTP basic authentication", 0, AV_OPT_TYPE_CONST, { .i64 = HTTP_AUTH_BASIC }, 0, 0, D | E, "auth_type"}, -{ "send_expect_100", "Force sending an Expect: 100-continue header for POST", OFFSET(send_expect_100), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, E }, +{ "send_expect_100", "Force sending an Expect: 100-continue header for POST", OFFSET(send_expect_100), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, E }, { "location", "The actual location of the data received", OFFSET(location), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, { "offset", "initial byte offset", OFFSET(off), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, D }, { "end_offset", "try to limit the request to bytes preceding this offset", OFFSET(end_off), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, D }, @@ -1179,12 +1179,15 @@ static int http_connect(URLContext *h, const char *path, const char *local_path, local_path, method); proxyauthstr = ff_http_auth_create_response(&s->proxy_auth_state, proxyauth, local_path, method); -if (post && !s->post_data) { + +if (s->send_expect_100 != -1) { +send_expect_100 = s->send_expect_100; +} else if (post && !s->post_data) { send_expect_100 = s->send_expect_100; /* The user has supplied authentication but we don't know the auth type, - * send Expect: 100-continue to get the 401 response including the - * WWW-Authenticate header, or an 100 continue if no auth actually - * is needed. */ +* send Expect: 100-continue to get the 401 response including the +* WWW-Authenticate header, or an 100 continue if no auth actually +* is needed. */ if (auth && *auth && s->auth_state.auth_type == HTTP_AUTH_NONE && s->http_code != 401) -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] backport fixes for CVE-2019-9718 and CVE-2019-9721
Hello, please backport fixes for CVE-2019-9718 and CVE-2019-9721 to 3.4 and 4.0 branches. The relevant commits seem to be: 1f00c97bc3475c477f3c468cf2d924d5761d0982 894995c41e0795c7a44f81adc4838dedc3932e65 Thanks in advance. Were the CVE IDs not known at the time these were pushed to master? Not having them in the commit log made it more difficult to find them. Regards, Dominik -- Fedora https://getfedora.org | RPM Fusion http://rpmfusion.org There should be a science of discontent. People need hard times and oppression to develop psychic muscles. -- from "Collected Sayings of Muad'Dib" by the Princess Irulan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v1 1/3] avformat/http: Add option to disable send-100-continue
2019-03-19 22:58 GMT+01:00, Jun Li : > The current setting for send-100-continue is either > applicable or enabled, no option to disable the header. > This change is to expand the option setting to provide > more flexibility, which is useful for rstp case. > --- > libavformat/http.c | 15 +-- > 1 file changed, 9 insertions(+), 6 deletions(-) > > diff --git a/libavformat/http.c b/libavformat/http.c > index ed0eb1c875..7e74719450 100644 > --- a/libavformat/http.c > +++ b/libavformat/http.c > @@ -113,7 +113,7 @@ typedef struct HTTPContext { > uint8_t *inflate_buffer; > #endif /* CONFIG_ZLIB */ > AVDictionary *chained_options; > -int send_expect_100; > +// -1 = try to send if applicable, 0 = always disabled, 1 = always > enabled > int send_expect_100; > char *method; > int reconnect; > int reconnect_at_eof; It seems to me that something is broken in this hunk. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v1 3/3] avformat/rtsp: Disable send-100-continue for http tunnelling
Expect:100-continue is not widely supported by http server, even less for rtsp servers. Apple's http tunnelling spec does not have any 100-continue setting. So disable this header. --- libavformat/rtsp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 975637cf54..68c9c3ab9b 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1793,6 +1793,7 @@ redirect: sessioncookie); av_opt_set(rt->rtsp_hd_out->priv_data, "headers", headers, 0); av_opt_set(rt->rtsp_hd_out->priv_data, "chunked_post", "0", 0); +av_opt_set(rt->rtsp_hd_out->priv_data, "send_expect_100", "0", 0); /* Initialize the authentication state for the POST session. The HTTP * protocol implementation doesn't properly handle multi-pass -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v1 2/3] avformat/icecast: Modify send-100-continue setting
Modify send-100-continue option to -1 because the default behavior is changed in http.c --- libavformat/icecast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/icecast.c b/libavformat/icecast.c index c93b06b553..d2198b78ec 100644 --- a/libavformat/icecast.c +++ b/libavformat/icecast.c @@ -115,7 +115,7 @@ static int icecast_open(URLContext *h, const char *uri, int flags) av_dict_set(&opt_dict, "auth_type", "basic", 0); av_dict_set(&opt_dict, "headers", headers, 0); av_dict_set(&opt_dict, "chunked_post", "0", 0); -av_dict_set(&opt_dict, "send_expect_100", s->legacy_icecast ? "0" : "1", 0); +av_dict_set(&opt_dict, "send_expect_100", s->legacy_icecast ? "-1" : "1", 0); if (NOT_EMPTY(s->content_type)) av_dict_set(&opt_dict, "content_type", s->content_type, 0); else -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v1 1/3] avformat/http: Add option to disable send-100-continue
The current setting for send-100-continue is either applicable or enabled, no option to disable the header. This change is to expand the option setting to provide more flexibility, which is useful for rstp case. --- libavformat/http.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index ed0eb1c875..7e74719450 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -113,7 +113,7 @@ typedef struct HTTPContext { uint8_t *inflate_buffer; #endif /* CONFIG_ZLIB */ AVDictionary *chained_options; -int send_expect_100; +// -1 = try to send if applicable, 0 = always disabled, 1 = always enabled int send_expect_100; char *method; int reconnect; int reconnect_at_eof; @@ -155,7 +155,7 @@ static const AVOption options[] = { { "auth_type", "HTTP authentication type", OFFSET(auth_state.auth_type), AV_OPT_TYPE_INT, { .i64 = HTTP_AUTH_NONE }, HTTP_AUTH_NONE, HTTP_AUTH_BASIC, D | E, "auth_type"}, { "none", "No auth method set, autodetect", 0, AV_OPT_TYPE_CONST, { .i64 = HTTP_AUTH_NONE }, 0, 0, D | E, "auth_type"}, { "basic", "HTTP basic authentication", 0, AV_OPT_TYPE_CONST, { .i64 = HTTP_AUTH_BASIC }, 0, 0, D | E, "auth_type"}, -{ "send_expect_100", "Force sending an Expect: 100-continue header for POST", OFFSET(send_expect_100), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, E }, +{ "send_expect_100", "Force sending an Expect: 100-continue header for POST", OFFSET(send_expect_100), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, E }, { "location", "The actual location of the data received", OFFSET(location), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, { "offset", "initial byte offset", OFFSET(off), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, D }, { "end_offset", "try to limit the request to bytes preceding this offset", OFFSET(end_off), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, D }, @@ -1179,12 +1179,15 @@ static int http_connect(URLContext *h, const char *path, const char *local_path, local_path, method); proxyauthstr = ff_http_auth_create_response(&s->proxy_auth_state, proxyauth, local_path, method); -if (post && !s->post_data) { + +if (s->send_expect_100 != -1) { +send_expect_100 = s->send_expect_100; +} else if (post && !s->post_data) { send_expect_100 = s->send_expect_100; /* The user has supplied authentication but we don't know the auth type, - * send Expect: 100-continue to get the 401 response including the - * WWW-Authenticate header, or an 100 continue if no auth actually - * is needed. */ +* send Expect: 100-continue to get the 401 response including the +* WWW-Authenticate header, or an 100 continue if no auth actually +* is needed. */ if (auth && *auth && s->auth_state.auth_type == HTTP_AUTH_NONE && s->http_code != 401) -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] (no subject)
An issue was found when I test 'RTSP tunnel HTTP' (protocol defined by Apple, but no RFC found) on Bosch and Axix IP cameras. The issue is caused when RTP/RTSP tunnelling in HTTP, post-data is empty when sending http header(because data for tunnel is not ready yet), thus our http implementation will send "EXPECT: 100-continue" in the header. However this header is not widely used by web server, even less for RTSP servers. Neither Bosch and Axis cameras support that. Meanwhile, when I go through the Apple spec, it does not have any 100-continue header at all. I am not sure this is a regression after introducing 100-continue or not. But based on my testing on IP cameras, it always fail when tunneling RTSP into HTTP with credentials. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [Patch] beautified + accelerated vf_fillborders – Please review
Am 19.03.19 um 17:31 schrieb Carl Eugen Hoyos: > This does not look like a command line but to avoid the encoding > time, "-f null -" can be used. > >> 122670 decicycles in fillborders=0:0:5:5:mirror 3p-8bit-1x1, >> 1 runs, 0 skips > One run is not good. > Either use the loop option to filter the same frame again and > again or feed a video to ffmpeg. With: ./ffmpeg -y -v error -stream_loop 100 -i input.jpg -vf fillborders=5:5:5:5:mirror -f null - I still see only 1 run. What I'm doing wrong? -Ulf ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] News: Removal of libndi
>+Support for the nonfree NDI protocol has been removed, it had > been a common source of GPL violations. > > This doesn't justify to break user tools (who respect the ffmpeg licence) and remove contributor's work. Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [Patch] beautified + accelerated vf_fillborders – Please review
Am 19.03.19 um 17:31 schrieb Carl Eugen Hoyos: >> $ debug/fillborders.sh >> Test[0] ==> 3-plane 8-bit YUV-colour:CYD_1005.jpg <== >> ./ffmpeg-p1 : CYD_1005.jpg --> ZZ_CYD_1005_mirror-0-0-5-5.jpg > This does not look like a command line The command line is in the script file debug/fillborders.sh. This echo comment line with ./ffmpeg-p1 means that the following runs were done with the build from patch 1 and with ./ffmpeg-2 from patch 2 for comparison. > but to avoid the encoding > time, "-f null -" can be used. You mean this as answer for using the -benchmark option? Thanks for the hint. But the CPU time for the decoding would still be there, which i'm afraid, it will too much overflow the little CPU time for the filter. >> 122670 decicycles in fillborders=0:0:5:5:mirror 3p-8bit-1x1, >> 1 runs, 0 skips > One run is not good. I did 6 runs for each command line pattern by loop in debug/fillborders.sh (included in vf_fillbd_benchmark_2.patch). > Either use the loop option to filter the same frame again and > again or feed a video to ffmpeg. Ok, I'll try this. -Ulf ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] News: Removal of libndi
On 20-03-2019 12:03 AM, Kieran Kunhya wrote: >From a84db9c39d382a37f76ae72e490d25ca451155c4 Mon Sep 17 00:00:00 2001 >From: Kieran Kunhya >Date: Tue, 19 Mar 2019 18:31:39 + >Subject: [PATCH] News: Removal of libndi > >--- > src/index | 5 + > 1 file changed, 5 insertions(+) > >diff --git a/src/index b/src/index >index 0dcf6c1..a5de03e 100644 >--- a/src/index >+++ b/src/index >@@ -37,6 +37,11 @@ > News > > >+ March 19th, 2019, libndi removed. >+ >+ Support for the nonfree NDI protocol has been removed, it had been a common source of GPL violations. Do you have citations for these violation*s*? I'm only aware of Newtek's distribution of ffmpeg in their SDK, as reported in trac #7589. Are there others? >+ >+ > November 6th, 2018, FFmpeg 4.1 "al-Khwarizmi" > > FFmpeg 4.1 "al-Khwarizmi", a new >-- >1.9.1 > > Trailing whitespace present. Gyan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] News: Removal of libndi
0001-News-Removal-of-libndi.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/libdav1d: use a reference to the allocated buffer instead of wrapping the Dav1dPicture
On 3/18/2019 10:38 AM, James Almer wrote: > Removes an av_malloc() per frame. > > Signed-off-by: James Almer > --- > libavcodec/libdav1d.c | 20 > 1 file changed, 4 insertions(+), 16 deletions(-) Pushed. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/libdav1d: reset pool size on allocation failure
On 3/15/2019 11:55 PM, James Almer wrote: > Signed-off-by: James Almer > --- > No testcase for this, just the theoretical scenario where a library user could > flush the decoder after ENOMEM was signaled here, then pass new data where a > frame with the same size as the last successfully allocated one is the first > in > line. > > libavcodec/libdav1d.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c > index 8c8584f4e8..d9079cbbef 100644 > --- a/libavcodec/libdav1d.c > +++ b/libavcodec/libdav1d.c > @@ -72,8 +72,10 @@ static int libdav1d_picture_allocator(Dav1dPicture *p, > void *cookie) > av_buffer_pool_uninit(&dav1d->pool); > // Use twice the amount of required padding bytes for aligned_ptr > below. > dav1d->pool = av_buffer_pool_init(ret + DAV1D_PICTURE_ALIGNMENT * 2, > NULL); > -if (!dav1d->pool) > +if (!dav1d->pool) { > +dav1d->pool_size = 0; > return AVERROR(ENOMEM); > +} > dav1d->pool_size = ret; > } > buf = av_buffer_pool_get(dav1d->pool); Pushed. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/flvdec: added support for KUX container
From: Swaraj Hota Fixes ticket #4519. --- This is my qualification task for GSoC 2019. Please suggest any more changes if required. Signed-off-by: Swaraj Hota --- Changelog| 1 + libavformat/allformats.c | 1 + libavformat/flvdec.c | 38 ++ libavformat/version.h| 4 ++-- 4 files changed, 42 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 4d80e5b54f..8ec6b88d66 100644 --- a/Changelog +++ b/Changelog @@ -19,6 +19,7 @@ version : - ARBC decoder - libaribb24 based ARIB STD-B24 caption support (profiles A and C) - Support decoding of HEVC 4:4:4 content in nvdec and cuviddec +- KUX demuxer version 4.1: diff --git a/libavformat/allformats.c b/libavformat/allformats.c index 06844986f3..a7bea4efe2 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -210,6 +210,7 @@ extern AVInputFormat ff_ivr_demuxer; extern AVInputFormat ff_jacosub_demuxer; extern AVOutputFormat ff_jacosub_muxer; extern AVInputFormat ff_jv_demuxer; +extern AVInputFormat ff_kux_demuxer; extern AVOutputFormat ff_latm_muxer; extern AVInputFormat ff_lmlm4_demuxer; extern AVInputFormat ff_loas_demuxer; diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 972e13..090de3db5c 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -106,6 +106,20 @@ static int live_flv_probe(AVProbeData *p) return probe(p, 1); } +static int kux_probe(AVProbeData *p) +{ +const uint8_t *d = p->buf; + +if (d[0] == 'K' && +d[1] == 'D' && +d[2] == 'K' && +d[3] == 0 && +d[4] == 0) { +return AVPROBE_SCORE_MAX; +} +return 0; +} + static void add_keyframes_index(AVFormatContext *s) { FLVContext *flv = s->priv_data; @@ -718,6 +732,10 @@ static int flv_read_header(AVFormatContext *s) int offset; int pre_tag_size = 0; +/* Actual FLV data at 0xe4 in KUX file */ +if(!strcmp(s->iformat->name, "kux")) +avio_skip(s->pb, 0xe4); + avio_skip(s->pb, 4); flags = avio_r8(s->pb); @@ -1366,3 +1384,23 @@ AVInputFormat ff_live_flv_demuxer = { .priv_class = &live_flv_class, .flags = AVFMT_TS_DISCONT }; + +static const AVClass kux_class = { +.class_name = "kuxdec", +.item_name = av_default_item_name, +.option = options, +.version= LIBAVUTIL_VERSION_INT, +}; + +AVInputFormat ff_kux_demuxer = { +.name = "kux", +.long_name = NULL_IF_CONFIG_SMALL("KUX (YouKu)"), +.priv_data_size = sizeof(FLVContext), +.read_probe = kux_probe, +.read_header= flv_read_header, +.read_packet= flv_read_packet, +.read_seek = flv_read_seek, +.read_close = flv_read_close, +.extensions = "kux", +.priv_class = &kux_class, +}; diff --git a/libavformat/version.h b/libavformat/version.h index 2e83eb4f23..7efc774b7d 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -32,8 +32,8 @@ // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) // Also please add any ticket numbers that you believe might be affected here #define LIBAVFORMAT_VERSION_MAJOR 58 -#define LIBAVFORMAT_VERSION_MINOR 26 -#define LIBAVFORMAT_VERSION_MICRO 101 +#define LIBAVFORMAT_VERSION_MINOR 27 +#define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \ -- 2.21.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [Patch] beautified + accelerated vf_fillborders – Please review
2019-03-19 15:57 GMT+01:00, Ulf Zibis : > $ debug/fillborders.sh > Test[0] ==> 3-plane 8-bit YUV-colour:CYD_1005.jpg <== > ./ffmpeg-p1 : CYD_1005.jpg --> ZZ_CYD_1005_mirror-0-0-5-5.jpg This does not look like a command line but to avoid the encoding time, "-f null -" can be used. > 122670 decicycles in fillborders=0:0:5:5:mirror 3p-8bit-1x1, > 1 runs, 0 skips One run is not good. Either use the loop option to filter the same frame again and again or feed a video to ffmpeg. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [Patch] beautified + accelerated vf_fillborders – Please review
Hi again, Am 12.03.19 um 00:37 schrieb Carl Eugen Hoyos: > 2019-03-12 0:25 GMT+01:00, Moritz Barsnick : >> Ideally, you use the START_TIMER/STOP_TIMER macros to >> profile the actual functions you changed. (Check this mailing list's >> archives for some examples, and play with the code.) > But this should not be needed if time (the command) and / or > benchmark (the FFmpeg option) show clear improvements. With the benchmark option I can not see the time for the filter, just for the de/encoding, and as I assume, that this filter is much faster than the de/encoding around it, I suspect, the overall time will be helpful. So I have "played" with the START_TIMER/STOP_TIMER macros. Now I'm kind of helpless, as the numbers I get are varying in wide range. It seems, that my changes help a little for e.g. "-vf fillborders:0:0:5:5:mirror". This is what I expected by bypassing the code loops for the right/left borders, when there is nothing to do, but the timer results are "noisy". I attach the patches for the first 2 chunks again, and too the patches for my timed version. Hopefully you have the time to play a little with that and can give me hints, how I could get more reliable numbers. (I just had closed all other applications like Firefox, Transmission etc. before running the benchmarks) -Ulf == $ debug/fillborders.sh Test[0] ==> 3-plane 8-bit YUV-colour: CYD_1005.jpg <== ./ffmpeg-p1 : CYD_1005.jpg --> ZZ_CYD_1005_mirror-0-0-5-5.jpg 122670 decicycles in fillborders=0:0:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 133020 decicycles in fillborders=0:0:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 119430 decicycles in fillborders=0:0:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 118350 decicycles in fillborders=0:0:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 124740 decicycles in fillborders=0:0:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 122130 decicycles in fillborders=0:0:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips ./ffmpeg-p2 : CYD_1005.jpg --> ZZ_CYD_1005_mirror-0-0-5-5.jpg 118800 decicycles in fillborders=0:0:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 123840 decicycles in fillborders=0:0:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 121500 decicycles in fillborders=0:0:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 135090 decicycles in fillborders=0:0:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 126270 decicycles in fillborders=0:0:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 125730 decicycles in fillborders=0:0:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips ./ffmpeg-p1 : CYD_1005.jpg --> ZZ_CYD_1005_mirror-5-5-0-0.jpg 557730 decicycles in fillborders=5:5:0:0:mirror 3p-8bit-1x1, 1 runs, 0 skips 614880 decicycles in fillborders=5:5:0:0:mirror 3p-8bit-1x1, 1 runs, 0 skips 598410 decicycles in fillborders=5:5:0:0:mirror 3p-8bit-1x1, 1 runs, 0 skips 545940 decicycles in fillborders=5:5:0:0:mirror 3p-8bit-1x1, 1 runs, 0 skips 591030 decicycles in fillborders=5:5:0:0:mirror 3p-8bit-1x1, 1 runs, 0 skips 566910 decicycles in fillborders=5:5:0:0:mirror 3p-8bit-1x1, 1 runs, 0 skips ./ffmpeg-p2 : CYD_1005.jpg --> ZZ_CYD_1005_mirror-5-5-0-0.jpg 542430 decicycles in fillborders=5:5:0:0:mirror 3p-8bit-1x1, 1 runs, 0 skips 567900 decicycles in fillborders=5:5:0:0:mirror 3p-8bit-1x1, 1 runs, 0 skips 490050 decicycles in fillborders=5:5:0:0:mirror 3p-8bit-1x1, 1 runs, 0 skips 579330 decicycles in fillborders=5:5:0:0:mirror 3p-8bit-1x1, 1 runs, 0 skips 521370 decicycles in fillborders=5:5:0:0:mirror 3p-8bit-1x1, 1 runs, 0 skips 890370 decicycles in fillborders=5:5:0:0:mirror 3p-8bit-1x1, 1 runs, 0 skips ./ffmpeg-p1 : CYD_1005.jpg --> ZZ_CYD_1005_mirror-5-5-5-5.jpg 576540 decicycles in fillborders=5:5:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 597060 decicycles in fillborders=5:5:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 599940 decicycles in fillborders=5:5:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 621900 decicycles in fillborders=5:5:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 588870 decicycles in fillborders=5:5:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 606600 decicycles in fillborders=5:5:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips ./ffmpeg-p2 : CYD_1005.jpg --> ZZ_CYD_1005_mirror-5-5-5-5.jpg 522090 decicycles in fillborders=5:5:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 655650 decicycles in fillborders=5:5:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 609660 decicycles in fillborders=5:5:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 600300 decicycles in fillborders=5:5:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 561510 decicycles in fillborders=5:5:5:5:mirror 3p-8bit-1x1, 1 runs, 0 skips 630090 decicycles in fillborders=5
Re: [FFmpeg-devel] [PATCH v7 1/2] lavc/svt_hevc: add libsvt hevc encoder wrapper.
On Tue, Mar 19, 2019 at 2:17 AM Sun, Jing A wrote: > -Original Message- > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of > Jing SUN > Sent: Monday, March 11, 2019 6:38 PM > To: ffmpeg-devel@ffmpeg.org > Cc: Sun, Jing A ; Huang, Zhengxu < > zhengxu.hu...@intel.com>; Jun Zhao ; Tmar, Hassene < > hassene.t...@intel.com> > Subject: [FFmpeg-devel] [PATCH v7 1/2] lavc/svt_hevc: add libsvt hevc > encoder wrapper. > > From: Jing Sun > > base on patch by Huang, Zhengxu from https://github.com/intel/SVT-HEVC > > V4: - Fix the build error with new API in PR#52 > - Fix the encoding hang issue by API change in PR#52 > - Fix the last frame dropping issue > - Fix the invalid parameter causing segmentation fault issue > - Add the support to svt hevc and av1 plugins coexistance > - Add the VMAF optimized mode to "-tune" > - Add the "-hdr" parameter > > V3: - Fix the build error with new API > > V2: - Change the config options (didn't need to enable-gpl for BSD+Patent, > it's can compatible with LGPL2+, thanks Xavier correct this part), > now just need to "--enable-libsvthevc" option > - Add force_idr option > - Remove default GoP size setting in the wrapper, SVT-HEVC will calc > the the GoP size internal > - Refine the code as the FFmpeg community's comments > (https://patchwork.ffmpeg.org/patch/11347/) > > V1: - base on patch by Huang, Zhengxu, then refine some code. > all this version history should be in the email thread but not in the commit section in my opinion > > Change-Id: If0dcc5044ab9effd6847a8f48797b985d02b0816 > this id means nothing in ffmpeg git, I'd suggest dropping it > Signed-off-by: Huang, Zhengxu > Signed-off-by: hassene > Should there be a real name here? > Signed-off-by: Jun Zhao > Signed-off-by: Jing Sun > Signed-off-by: Jing SUN > double sign-off? --- > [..] > -- > 1.8.3.1 > > Hi maintainers, > > A week has passed and no negative comment is received except a new feature > request, which will be considered in the next version. Is the first version > good to be picked? > Until that feature request is added, there should be a warning about that missing missing feature IMO. -- Vittorio ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/tiff: Add support for recognizing DNG files
On 3/19/19, Nick Renieris wrote: > Yes, obviously this is not complete. As was said, the DNG spec is huge > and I did bring up this concern in a personal email to Paul a few days > ago. > I was told that: >> 3 months should be enough to finish most of specification, note you work >> on real world DNG files, so if some feature from spec is not present in >> any file you have less work to do > which I absolutely agree with. > The context of my contribution in this case is GSoC, so let's talk > about that: Wouldn't it be better if by the end of GSoC, FFmpeg could > open all or most of the DNG files that actually exist out there, > instead of having only specific parts of the spec implemented > thoroughly? > >>A design that can only extract one image of many or one stream or one >> channel. Cannot preserve all information so it fails that simple use case. > >> Shouldn't, ideally, these image files be demuxed as two image streams? >> Perhaps with the "main" image as the first stream. > > Ideally, yes of course. > Realistically, I think the images with NewSubFileType != 0 and > NewSubFileType != 4 are of secondary interest to decode, as they are > commonly simply reduced resolution images of their counterparts. > In any case, it will probably not be hard to add once the important > parts are implemented. > >> Still wrong, There are DNG images without thumbnails. > > I suspected so but didn't have any examples to test with. > I just found one. The following happens if -subimage 1 is used: > > [tiff @ 0x7fffe4099180] DNG images are not supported > [tiff @ 0x7fffe4099180] Decoding embedded TIFF thumbnail in DNG image > [tiff @ 0x7fffe4099180] This format is not supported (bpp=14, bppcount=1) > > Is this a problem? If so: > I'm still not done reading the spec(s), but as far as I understand it, > there is no way that a DNG image with NewSubFileType != 1 would be in > a standard TIFF format that we can decode right now. Therefore, I > propose a check for this in decode_frame (would also check if dng_mode > is enabled) to prevent the above non-user friendly error from > happening. > > I suspect NewSubFileType is not the right way to go though since the > actual image format is not specified with it. I looked at the tags > from some DNGs and I can't narrow it down to any other better field > for this. > > Any better ideas? Should I perhaps just let it succeed or fail based > on the existing decoding code, as it does above? The error checking in > that code is the absolute truth of what is actually implemented after > all. > >> I've used their libdng for a project. It's a big LGPL library implementing >> pretty much everything, but no distro really ships it, so it'd have to be >> embedded or built manually by the user. > > Definitely something to consider. Given the posted GSoC project idea, > I assumed it was not possible/preferable for it to be embedded. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > Here is one file that works just fine with current ffmpeg: https://0x0.st/z8pf.dng ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/tiff: Add support for recognizing DNG files
On Tue, Mar 19, 2019 at 03:03:20AM +0200, Nick Renieris wrote: > Yes, obviously this is not complete. As was said, the DNG spec is huge > and I did bring up this concern in a personal email to Paul a few days > ago. > I was told that: > > 3 months should be enough to finish most of specification, note you work on > > real world DNG files, so if some feature from spec is not present in any > > file you have less work to do > which I absolutely agree with. > The context of my contribution in this case is GSoC, so let's talk > about that: Wouldn't it be better if by the end of GSoC, FFmpeg could > open all or most of the DNG files that actually exist out there, > instead of having only specific parts of the spec implemented > thoroughly? Theres no need to implement every feature, but what FFmpeg supports should work. For example if we support audio and video demuxing from mpeg-ps and support audio and video muxing in mpeg-ts we should be able to convert one to the other with both audio and video. Similarly if we support demuxing "auxilary / secondary or what they are called images" and muxing then we should be able to connect these and not just be able to extract one image. Thats the ideal. The question how to implement this, or if this is the way to go or if this is too complex to do is up to the mentor for a GSoC project. It could be done by spliting into streams at the demuxer level, by using side data or decoding the images in sequence in the decoder or other ways. Each of these seem to have disadvanatges ... Thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB "I am not trying to be anyone's saviour, I'm trying to think about the future and not be sad" - Elon Musk signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel