Re: [FFmpeg-devel] [PATCH 1/2] qsvdec: add support for HW_DEVICE_CTX method

2021-07-28 Thread Xiang, Haihao
On Thu, 2021-06-24 at 01:33 +, Xiang, Haihao wrote: > On Wed, 2021-06-23 at 16:41 +, Soft Works wrote: > > > > -Original Message- > > From: ffmpeg-devel On Behalf Of Haihao > > Xiang > > Sent: Mittwoch, 23. Juni 2021 05:04 > > To: ffmpeg-devel@ffmpeg.org > > Cc: Haihao Xiang > >

Re: [FFmpeg-devel] [PATCH 1/2] lavc/qsvdec: update color properties in codec context

2021-07-28 Thread myp...@gmail.com
On Wed, Jul 28, 2021 at 4:16 PM Haihao Xiang wrote: > > User may get color properties from the SDK via VIDEO_SIGNAL_INFO extbuf > --- > libavcodec/qsvdec.c | 20 +++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c > ind

[FFmpeg-devel] [PATCH v3 3/3] avcodec/v4l2_m2m_dec: start capture after source change event is received

2021-07-28 Thread Ming Qian
if client start the capture queue without waiting the source change event, there may be some timing issues. For example, in client, the sequence is: capture streamon -> source change -> capture streamoff -> capture streamon. but in driver side, the sequence may be: source change -> capture streamon

[FFmpeg-devel] [PATCH v3 2/3] avcodec/v4l2_context: resume the decoding process after source change event received.

2021-07-28 Thread Ming Qian
client need to resume the decoding process after it dequeues the source change event. no matter what's the return value of v4l2_resolution_changed(). if the client doesn't resume the decoding process, the decoder may keep waiting in documentation of v4l2 stateful decoder, we can see the following

[FFmpeg-devel] [PATCH v3 1/3] avcodec/v4l2_context: don't reinit output queue when dynamic resolution change

2021-07-28 Thread Ming Qian
in the v4l2 stateful video document, we can see the following description: During the resolution change sequence, the OUTPUT queue must remain streaming. Calling VIDIOC_STREAMOFF() on the OUTPUT queue would abort the sequence and initiate a seek. In principle, the OUTPUT queue oper

Re: [FFmpeg-devel] [PATCH 1/2] lavc/qsvdec: update color properties in codec context

2021-07-28 Thread Xiang, Haihao
On Thu, 2021-07-29 at 13:12 +0800, myp...@gmail.com wrote: > On Wed, Jul 28, 2021 at 4:16 PM Haihao Xiang wrote: > > > > User may get color properties from the SDK via VIDEO_SIGNAL_INFO extbuf > > --- > > libavcodec/qsvdec.c | 20 +++- > > 1 file changed, 19 insertions(+), 1 dele

Re: [FFmpeg-devel] [PATCH 2/2] avformat/movenc: parse h264 packets to build Sync Sample and Recovery Point tables

2021-07-28 Thread ffmpegandmahanstreamer
I always meant to ask what is meaning of your profile picture? July 28, 2021 6:51 PM, "Derek Buitenhuis" wrote: > On 7/27/2021 2:08 PM, James Almer wrote: > >> Since we can't blindly trust the keyframe flag in packets and assume its >> contents are a valid Sync Sample, do some basic bitstream p

Re: [FFmpeg-devel] Hardware purchase request

2021-07-28 Thread ffmpegandmahanstreamer
Well obviously i'm not committer yet or responsible for this but I think its a good idea for Lynne to get the hardware she needs. Price looks reasonable, I would give the goahead. July 28, 2021 7:07 PM, "Lynne" wrote: > 9 Jul 2021, 12:59 by d...@lynne.ee: > >> 8 Jul 2021, 22:32 by stefa...@gm

[FFmpeg-devel] [PATCH v4 11/21] lavfi/vpp_qsv: factor common QSV filter definition

2021-07-28 Thread Haihao Xiang
--- libavfilter/vf_vpp_qsv.c | 195 +-- 1 file changed, 86 insertions(+), 109 deletions(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index df23dd1e58..25c819d1a0 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -104

[FFmpeg-devel] [PATCH v4 10/21] lavfi/scale_qsv: re-use VPPContext for scale_qsv filter

2021-07-28 Thread Haihao Xiang
All features are implemented in vpp_qsv filter, scale_qsv can be taken as a special case of vpp_qsv filter now, we re-use VPPContext with a different option arrary and pixel formats --- libavfilter/Makefile | 2 +- libavfilter/vf_scale_qsv.c | 334 - lib

[FFmpeg-devel] [PATCH v4 09/21] lavfi/vpp_qsv: add vpp_preinit callback

2021-07-28 Thread Haihao Xiang
Set the expected default value for options in this callback, hence we have the right values even if these options are not included in the option arrray. This is in preparation for re-using VPPContext but with a different option array for other QSV filters --- libavfilter/vf_vpp_qsv.c | 14

[FFmpeg-devel] [PATCH v4 02/21] lavfi/scale_qsv: simplify scale_qsv filter

2021-07-28 Thread Haihao Xiang
Use QSVVPPContext as a base context of QSVScaleContext, hence we may re-use functions defined for QSVVPPContext to manage MFX session for scale_qsv filter too. Because system memory is taken into account in QSVVVPPContext, we may add support for non-QSV pixel formats in the future --- libavfilter/

[FFmpeg-devel] [PATCH v4 08/21] lavfi/vpp_qsv: pass scaling mode to the SDK

2021-07-28 Thread Haihao Xiang
After this patch, the scaling mode will be passed to the SDK when the scaling mode is not equal to the default mode. This is in preparation for re-using VPPContext for scale_qsv filter --- libavfilter/vf_vpp_qsv.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --gi

[FFmpeg-devel] [PATCH v4 01/21] lavfi/qsv: use QSVVPPContext as base context in vf_vpp_qsv/vf_overlay_qsv

2021-07-28 Thread Haihao Xiang
The same members between QSVVPPContext and VPPContext are removed from VPPContext, and async_depth is moved from QSVVPPParam to QSVVPPContext so that all QSV filters using QSVVPPContext may support async depth. In addition we may use QSVVPPContext as base context in other QSV filters in the future.

[FFmpeg-devel] [PATCH v4 12/21] lavfi/scale_qsv: add new options for scale_qsv filter

2021-07-28 Thread Haihao Xiang
Allow user to set crop area and async depth --- libavfilter/vf_vpp_qsv.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index 25c819d1a0..a8d8cf7b98 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -674,6 +674,10

[FFmpeg-devel] [PATCH v4 05/21] lavfi/vpp_qsv: handle NULL pointer when evaluating an expression

2021-07-28 Thread Haihao Xiang
This is in preparation for re-using VPPContext but with a different option array for scale_qsv filter --- libavfilter/vf_vpp_qsv.c | 36 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index cc

[FFmpeg-devel] [PATCH v4 21/21] lavfi/vpp_qsv: allow user to set scaling mode for vpp_qsv filter

2021-07-28 Thread Haihao Xiang
option 'scaling' accepts one of low_power and hq $ ffmpeg -init_hw_device qsv -hwaccel qsv -c:v h264_qsv -i input.h264 -vf "vpp_qsv=scaling=hq" -f null - --- libavfilter/vf_vpp_qsv.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.

[FFmpeg-devel] [PATCH v4 04/21] lavfi/vpp_qsv: add "a", "dar" and "sar" variables

2021-07-28 Thread Haihao Xiang
Also fix the coding style for VAR index. This is in preparation for re-using VPPContext for scale_qsv filter --- libavfilter/vf_vpp_qsv.c | 29 +++-- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index fa

[FFmpeg-devel] [PATCH v4 19/21] lavfi/deinterlace_qsv: add async_depth option

2021-07-28 Thread Haihao Xiang
Allow user to set async depth for deinterlace_qsv --- libavfilter/vf_vpp_qsv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index 59bf83d7af..67e362596e 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -719,6 +719,7

[FFmpeg-devel] [PATCH v4 20/21] lavfi/deinterlace_qsv: add more input / output pixel formats

2021-07-28 Thread Haihao Xiang
NV12 is added in system memory and the command below may work now. $ ffmpeg -init_hw_device qsv -c:v h264_qsv -i input.h264 -vf deinterlace_qsv -f null - --- libavfilter/vf_vpp_qsv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_v

[FFmpeg-devel] [PATCH v4 17/21] lavfi/deinterlace_qsv: simplify deinterlace_qsv filter

2021-07-28 Thread Haihao Xiang
Like what we did for scale_qsv filter, we use QSVVPPContext as a base context to manage MFX session for deinterlace_qsv filter --- libavfilter/vf_deinterlace_qsv.c | 492 ++- 1 file changed, 30 insertions(+), 462 deletions(-) diff --git a/libavfilter/vf_deinterlace_qsv

[FFmpeg-devel] [PATCH v4 18/21] lavfi/deinterlace_qsv: re-use VPPContext for deinterlace_qsv filter

2021-07-28 Thread Haihao Xiang
All features are implemented in vpp_qsv filter now, so deinterlace_qsv can be taken as a specical case of vpp_qsv filter, we re-use VPPContext with a different option array and pix formats for deinterlace_qsv filter A new option -rate is used to control the output frame rate, by default it will ou

[FFmpeg-devel] [PATCH v4 13/21] lavfi/scale_qsv: add more input / output pixel formats

2021-07-28 Thread Haihao Xiang
NV12 and P010 are added $ ffmpeg -init_hw_device qsv -c:v h264_qsv -i input.h264 -vf "scale_qsv=format=p010" -f null - --- libavfilter/vf_vpp_qsv.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index a8d8cf7b98..e16bd09

[FFmpeg-devel] [PATCH v4 15/21] lavfi/qsvvpp: set PTS for output frame

2021-07-28 Thread Haihao Xiang
When the SDK returns MFX_ERR_MORE_SURFACE, the PTS is not set for the output frame. We assign a PTS calculated from the input frame to the output frame. After applying this patch, we may avoid the error below: [null @ 0x56395cab4ae0] Application provided invalid, non monotonically increasing dts t

[FFmpeg-devel] [PATCH v4 16/21] lavfi/vpp_qsv: check output format string against NULL pointer

2021-07-28 Thread Haihao Xiang
This is in preparation for re-using VPPContext but with a different option array for deinterlacing_qsv filter --- libavfilter/vf_vpp_qsv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index b234417663..704db8fdaf 100644 ---

[FFmpeg-devel] [PATCH v4 03/21] lavfi/scale_qsv: don't need variables for constants in FFmpeg

2021-07-28 Thread Haihao Xiang
PI, PHI and E are defined in FFmpeg --- libavfilter/vf_scale_qsv.c | 9 - 1 file changed, 9 deletions(-) diff --git a/libavfilter/vf_scale_qsv.c b/libavfilter/vf_scale_qsv.c index 77a782aa58..f8e937e40e 100644 --- a/libavfilter/vf_scale_qsv.c +++ b/libavfilter/vf_scale_qsv.c @@ -44,9 +44,

[FFmpeg-devel] [PATCH v4 14/21] lavfi/qsvvpp: avoid overriding the returned value

2021-07-28 Thread Haihao Xiang
Currently the returned value from MFXVideoVPP_RunFrameVPPAsync() is overridden, so the check of 'ret == MFX_ERR_MORE_SURFACE' is always false when MFX_ERR_MORE_SURFACE is returned from MFXVideoVPP_RunFrameVPPAsync() --- libavfilter/qsvvpp.c | 11 --- 1 file changed, 8 insertions(+), 3 dele

[FFmpeg-devel] [PATCH v4 07/21] lavfi/vpp_qsv: factorize extra MFX configuration

2021-07-28 Thread Haihao Xiang
This is in preparation for re-using VPPContext for scale_qsv filter --- libavfilter/vf_vpp_qsv.c | 78 +--- 1 file changed, 32 insertions(+), 46 deletions(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index 3505c9fd12..0c2614c95f 100644 --

[FFmpeg-devel] [PATCH v4 06/21] lavfi/vpp_qsv: allow special values for the output dimensions

2021-07-28 Thread Haihao Xiang
Special values are: 0 = original width/height -1 = keep original aspect This is in preparation for re-using VPPContext for scale_qsv filter --- libavfilter/vf_vpp_qsv.c | 47 ++-- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/libavfilter/vf_vpp

[FFmpeg-devel] [PATCH v4 00/21] clean-up QSV filters

2021-07-28 Thread Haihao Xiang
This patchset clean up scale_qsv and deinterlace_qsv filters, and take the two filters as the special cases of vpp_qsv, so vf_scale_qsv.c and vf_deinterlace_qsv.c can be deleted from FFmpeg. In addition, a few small features are added in this patchset. --- v4: * Rebase this patchset against the lat

[FFmpeg-devel] [PATCH v3] ffmpeg_opt: restore documented stream selection behaviour

2021-07-28 Thread Gyan Doshi
11d3b03fcb added consideration of default stream disposition for audio and video when choosing the 'best' stream among all the inputs. This can lead to video streams with lower resolution or audio streams with fewer channels being selected. Stream disposition, however, only sets a priority for a s

Re: [FFmpeg-devel] [PATCH 2/2] avformat/movenc: parse h264 packets to build Sync Sample and Recovery Point tables

2021-07-28 Thread James Almer
On 7/28/2021 7:51 PM, Derek Buitenhuis wrote: On 7/27/2021 2:08 PM, James Almer wrote: Since we can't blindly trust the keyframe flag in packets and assume its contents are a valid Sync Sample, do some basic bitstream parsing to build the Sync Sample table in addition to a Random Access Recovery

Re: [FFmpeg-devel] [PATCH 2/2] avformat/movenc: parse h264 packets to build Sync Sample and Recovery Point tables

2021-07-28 Thread James Almer
On 7/28/2021 7:43 PM, Andreas Rheinhardt wrote: James Almer: Since we can't blindly trust the keyframe flag in packets and assume its contents are a valid Sync Sample, do some basic bitstream parsing to build the Sync Sample table in addition to a Random Access Recovery Point table. Suggested-b

Re: [FFmpeg-devel] [PATCH 2/2] avformat/movenc: parse h264 packets to build Sync Sample and Recovery Point tables

2021-07-28 Thread Derek Buitenhuis
On 7/27/2021 2:08 PM, James Almer wrote: > Since we can't blindly trust the keyframe flag in packets and assume its > contents are a valid Sync Sample, do some basic bitstream parsing to build the > Sync Sample table in addition to a Random Access Recovery Point table. > > Suggested-by: ffm...@fb.

Re: [FFmpeg-devel] Hardware purchase request

2021-07-28 Thread Lynne
9 Jul 2021, 12:59 by d...@lynne.ee: > 8 Jul 2021, 22:32 by stefa...@gmail.com: > >> On Mon, Jun 28, 2021 at 2:50 AM Lynne wrote: >> >>> >>> 27 Jun 2021, 19:33 by kier...@obe.tv: >>> >>> >> >>> >> I'm thinking of getting a: >>> >> LG UltraGear 27GN950-B >>> >> >>> > >>> > Can I ask why you need a

Re: [FFmpeg-devel] [PATCH 2/2] avformat/movenc: parse h264 packets to build Sync Sample and Recovery Point tables

2021-07-28 Thread Andreas Rheinhardt
James Almer: > Since we can't blindly trust the keyframe flag in packets and assume its > contents are a valid Sync Sample, do some basic bitstream parsing to build the > Sync Sample table in addition to a Random Access Recovery Point table. > > Suggested-by: ffm...@fb.com > Signed-off-by: James A

Re: [FFmpeg-devel] [PATCH 1/6] avformat/aviobuf: Make ff_read_line_to_bprint() static

2021-07-28 Thread Andreas Rheinhardt
Andreas Rheinhardt: > It is only used in ff_read_line_to_bprint_overwrite(). > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/aviobuf.c | 4 ++-- > libavformat/internal.h | 13 - > 2 files changed, 2 insertions(+), 15 deletions(-) > > diff --git a/libavformat/aviobuf.c b/

[FFmpeg-devel] [PATCH] avfilter/af_apad: do not add infinte silence for zero pad_dur or whole_dur

2021-07-28 Thread Marton Balint
Unfortunately pad_len and pad_dur behaviour was different if 0 was specified, pad_dur handled 0 duration as infinity, for pad_len, infinity was -1. Let's make the behaviour consistent by handling 0 duration for pad_dur and whole_dur as indeed 0 duration. This somewhat changes the behaviour of the

Re: [FFmpeg-devel] [PATCH 2/5] lavf/concatdec: support per-file options.

2021-07-28 Thread Andreas Rheinhardt
Nicolas George: > Signed-off-by: Nicolas George > --- > doc/demuxers.texi | 4 > libavformat/concatdec.c | 37 - > 2 files changed, 40 insertions(+), 1 deletion(-) > > > I intend to refactor the parser some time later. > > > diff --git a/doc/dem

[FFmpeg-devel] [PATCH] avformat/fifo: Free dict on av_dict_copy() failure

2021-07-28 Thread Andreas Rheinhardt
av_dict_copy() puts the onus on the caller to clean up dst on failure; it can be nonempty if copying a later entry of src fails after having successfully copied an earlier entry. Signed-off-by: Andreas Rheinhardt --- It seems that av_dict_copy() together with the AV_DICT_DONT_STRDUP_KEY/VAL flags

Re: [FFmpeg-devel] [PATCH v3 0/4] avcodec Loongson-2 MMI fixes

2021-07-28 Thread Michael Niedermayer
On Fri, Jul 23, 2021 at 05:01:23PM +0800, yinshiyou...@loongson.cn wrote: > > -原始邮件- > > 发件人: "Jiaxun Yang" > > 发送时间: 2021-07-23 13:53:40 (星期五) > > 收件人: ffmpeg-devel@ffmpeg.org > > 抄送: yinshiyou...@loongson.cn, "Jiaxun Yang" > > 主题: [PATCH v3 0/4] avcodec Loongson-2 MMI fixes > > > > Get

Re: [FFmpeg-devel] [PATCH 2/5] lavf/concatdec: support per-file options.

2021-07-28 Thread Andreas Rheinhardt
Nicolas George: > Signed-off-by: Nicolas George > --- > doc/demuxers.texi | 4 > libavformat/concatdec.c | 37 - > 2 files changed, 40 insertions(+), 1 deletion(-) > > > I intend to refactor the parser some time later. > > > diff --git a/doc/dem

Re: [FFmpeg-devel] [PATCH 01/10] lavu/internal: add hex to int functions.

2021-07-28 Thread Nicolas George
Marton Balint (12021-07-28): > Then maybe add the function to avstring.h? You mean make it public? I am not against it, but I would wait for a third opinion. > c &= ~('a' - 'A') is anything but > readable, at least add a comment if you don't like avstring.h. I can add a comment, no problem. Good

Re: [FFmpeg-devel] [PATCH v2] avcodec/noise_bsf: add expr support

2021-07-28 Thread Michael Niedermayer
On Wed, Jul 28, 2021 at 09:56:35AM +0530, Gyan Doshi wrote: > --- > doc/bitstream_filters.texi | 64 --- > libavcodec/noise_bsf.c | 161 + > tests/fate/matroska.mak| 2 +- > 3 files changed, 199 insertions(+), 28 deletions(-) > > diff --g

Re: [FFmpeg-devel] [PATCH] avformat/wavdec: More accurate duration

2021-07-28 Thread Andreas Rheinhardt
Danivy: > Using data size and nAvgBytesPerSec to calculate the duration will be more > accurate > --- > libavformat/wavdec.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c > index d2fb81ca7f..50b1f81e62 100644 > --- a/l

Re: [FFmpeg-devel] [PATCH v2] ffmpeg_opt: restore documented stream selection behaviour

2021-07-28 Thread Michael Niedermayer
On Wed, Jul 28, 2021 at 02:09:00PM +0530, Gyan Doshi wrote: > 11d3b03fcb added consideration of default stream disposition for audio > and video when choosing the 'best' stream among all the inputs. This can > lead to video streams with lower resolution or audio streams with fewer > channels being

Re: [FFmpeg-devel] [PATCH 01/10] lavu/internal: add hex to int functions.

2021-07-28 Thread Marton Balint
On Wed, 28 Jul 2021, Nicolas George wrote: Marton Balint (12021-07-27): +static inline int ff_between(unsigned min, unsigned max, unsigned val) +{ +return val - min <= max - min; +} This seems a bit too general. What if somebody needs int and not unsigned? I Any type smaller than unsi

Re: [FFmpeg-devel] [PATCH 1/2] tools/target_dec_fuzzer: Adjust threshold for VP6F

2021-07-28 Thread Michael Niedermayer
On Sun, Jul 25, 2021 at 04:01:54PM +0200, Michael Niedermayer wrote: > Fixes: Timeout > Fixes: > 34791/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP6F_fuzzer-4571038838030336 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed

Re: [FFmpeg-devel] [PATCH 2/4] tools/target_dec_fuzzer: Adjust the threshold for VP5

2021-07-28 Thread Michael Niedermayer
On Tue, Jul 20, 2021 at 10:29:40PM +0200, Michael Niedermayer wrote: > Fixes: Timeout > Fixes: > 35793/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP5_fuzzer-6492854393372672 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-

Re: [FFmpeg-devel] [PATCH 1/4] tools/target_dec_fuzzer: Adjust the threshold for VP3

2021-07-28 Thread Michael Niedermayer
On Tue, Jul 20, 2021 at 10:29:39PM +0200, Michael Niedermayer wrote: > Fixes: Timeout > Fixes: > 35855/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP3_fuzzer-4851183540895744 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-

Re: [FFmpeg-devel] [PATCH 3/4] avformat/mov: Fix incorrect overflow detection in mov_read_sidx()

2021-07-28 Thread Michael Niedermayer
On Wed, Apr 28, 2021 at 05:06:35PM +0200, Michael Niedermayer wrote: > Fixes: signed integer overflow: 9223372036854775807 + 1442840321 cannot be > represented in type 'long' > Fixes: > 33670/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6644379491106816 > > Found-by: continuous fuzzing p

Re: [FFmpeg-devel] [PATCH] tools/target_dec_fuzzer: Fix extradata duplication

2021-07-28 Thread Michael Niedermayer
On Sat, Jul 24, 2021 at 11:52:47PM +0200, Michael Niedermayer wrote: > Fixes: out of array access > Fixes: > 36340/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5872546875572224.fuzz > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projec

Re: [FFmpeg-devel] [PATCH] libavcodec/mpeg12dec.c: Switch to init_get_bits8 and checks return value

2021-07-28 Thread Michael Niedermayer
On Tue, Jul 27, 2021 at 11:25:04AM -0700, Thierry Foucu wrote: > --- > libavcodec/mpeg12dec.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c > index b27ed5bd6d..858dca660c 100644 > --- a/libavcodec/mpeg12dec.c > +++ b

[FFmpeg-devel] [PATCH] avformat/wavdec: More accurate duration

2021-07-28 Thread Danivy
Using data size and nAvgBytesPerSec to calculate the duration will be more accurate --- libavformat/wavdec.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index d2fb81ca7f..50b1f81e62 100644 --- a/libavformat/wavdec.c +++ b/

Re: [FFmpeg-devel] [PATCH 5/5] lavf/avio: remove support for proto, , opt, val, , syntax.

2021-07-28 Thread Nicolas George
Gyan Doshi (12021-07-28): > > > On 2021-07-28 17:45, Nicolas George wrote: > > It was only still supported for subfile and only used by dvd2concat. > > Examples at http://www.ffmpeg.org/ffmpeg-protocols.html#subfile should be > updated. Good catch, thanks. Locally committed this chunk: diff -

Re: [FFmpeg-devel] [PATCH 5/5] lavf/avio: remove support for proto, , opt, val, , syntax.

2021-07-28 Thread Gyan Doshi
On 2021-07-28 17:45, Nicolas George wrote: It was only still supported for subfile and only used by dvd2concat. Examples at http://www.ffmpeg.org/ffmpeg-protocols.html#subfile should be updated. Regards, Gyan Signed-off-by: Nicolas George --- libavformat/avio.c| 34 +

[FFmpeg-devel] [PATCH 5/5] lavf/avio: remove support for proto, , opt, val, , syntax.

2021-07-28 Thread Nicolas George
It was only still supported for subfile and only used by dvd2concat. Signed-off-by: Nicolas George --- libavformat/avio.c| 34 +- libavformat/dashdec.c | 2 +- libavformat/hls.c | 2 +- 3 files changed, 3 insertions(+), 35 deletions(-) diff --git a/liba

[FFmpeg-devel] [PATCH 4/5] tools/dvd2concat: use option keyword.

2021-07-28 Thread Nicolas George
subfile,,start,X,end,Y,,: is ugly and will be gone. Signed-off-by: Nicolas George --- tools/dvd2concat | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/dvd2concat b/tools/dvd2concat index 0280838a6b..ef04a87d05 100755 --- a/tools/dvd2concat +++ b/tools/dvd2concat @

[FFmpeg-devel] [PATCH 3/5] tools/dvd2concat: document that -protocol_whitelist is needed.

2021-07-28 Thread Nicolas George
Signed-off-by: Nicolas George --- tools/dvd2concat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/dvd2concat b/tools/dvd2concat index 8effee86b9..0280838a6b 100755 --- a/tools/dvd2concat +++ b/tools/dvd2concat @@ -37,7 +37,8 @@ normally contains a directory named B. I

[FFmpeg-devel] [PATCH 2/5] lavf/concatdec: support per-file options.

2021-07-28 Thread Nicolas George
Signed-off-by: Nicolas George --- doc/demuxers.texi | 4 libavformat/concatdec.c | 37 - 2 files changed, 40 insertions(+), 1 deletion(-) I intend to refactor the parser some time later. diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 5

[FFmpeg-devel] [PATCH 1/5] libavformat/concatdec: remove support for unsafe=-1.

2021-07-28 Thread Nicolas George
It only makes sense as the default value, but it is not the default since 689211d5727231c3fe92762d224dbadebdbf4e30. Signed-off-by: Nicolas George --- doc/demuxers.texi | 9 +++-- libavformat/concatdec.c | 6 ++ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/doc/dem

Re: [FFmpeg-devel] [PATCH] lavfi/formats: describe conversion in negotiation structure.

2021-07-28 Thread Nicolas George
Nicolas George (12021-07-24): > Signed-off-by: Nicolas George > --- > libavfilter/avfiltergraph.c | 45 ++--- > libavfilter/formats.c | 4 > libavfilter/formats.h | 2 ++ > 3 files changed, 18 insertions(+), 33 deletions(-) > > > Obviously to b

Re: [FFmpeg-devel] [PATCH 1/2] lavu/internal: add FF_FIELD_AT().

2021-07-28 Thread Nicolas George
Nicolas George (12021-07-24): > Signed-off-by: Nicolas George > --- > libavutil/internal.h | 5 + > 1 file changed, 5 insertions(+) Will push soon unless somebody wants to comment. Regards, -- Nicolas George signature.asc Description: PGP signature

Re: [FFmpeg-devel] [PATCH 09/10] lavf/file: handle standard file:// URLs.

2021-07-28 Thread Nicolas George
Marton Balint (12021-07-27): > You should mention the relevant rfc - RFC8089. Locally added. > Also there are a couple of common deviations/extensions from the normative > standard, referenced in the RFC: > > https://datatracker.ietf.org/doc/html/rfc8089#appendix-F > > Do you plan to support th

[FFmpeg-devel] [PATCH v2] ffmpeg_opt: restore documented stream selection behaviour

2021-07-28 Thread Gyan Doshi
11d3b03fcb added consideration of default stream disposition for audio and video when choosing the 'best' stream among all the inputs. This can lead to video streams with lower resolution or audio streams with fewer channels being selected. Stream disposition, however, only sets a priority for a s

[FFmpeg-devel] [PATCH 2/2] lavc/qsvenc: pass the color properties to the SDK

2021-07-28 Thread Haihao Xiang
Otherwise the color properties won't be encoded into the bitstream header --- libavcodec/qsvenc.c | 18 ++ libavcodec/qsvenc.h | 4 +++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index f6fa759447..e7e65ebfcf 100644 ---

[FFmpeg-devel] [PATCH 1/2] lavc/qsvdec: update color properties in codec context

2021-07-28 Thread Haihao Xiang
User may get color properties from the SDK via VIDEO_SIGNAL_INFO extbuf --- libavcodec/qsvdec.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index 622750927c..19a6a776db 100644 --- a/libavcodec/qsvdec.c +++ b/lib

Re: [FFmpeg-devel] [PATCH 01/10] lavu/internal: add hex to int functions.

2021-07-28 Thread Nicolas George
Marton Balint (12021-07-27): > > +static inline int ff_between(unsigned min, unsigned max, unsigned val) > > +{ > > +return val - min <= max - min; > > +} > This seems a bit too general. What if somebody needs int and not unsigned? I Any type smaller than unsigned will be promoted to unsigned,

[FFmpeg-devel] [PATCH] ffmpeg_opt: restore documented stream selection behaviour

2021-07-28 Thread Gyan Doshi
11d3b03fcb added consideration of default stream disposition for audio and video when choosing the 'best' stream among all the inputs. This can lead to video streams with lower resolution or audio streams with fewer channels being selected. Stream disposition, however, only sets a priority for a s