[FFmpeg-devel] [PATCH 2/2] lavfi/dnn: refine code to separate processing and detection in backends

2021-05-16 Thread Guo, Yejun
--- libavfilter/dnn/dnn_backend_native.c | 2 +- libavfilter/dnn/dnn_backend_openvino.c | 6 -- libavfilter/dnn/dnn_backend_tf.c | 20 +++- libavfilter/dnn/dnn_io_proc.c | 18 ++ libavfilter/dnn/dnn_io_proc.h | 3 ++- 5 files changed

[FFmpeg-devel] [PATCH 1/2] lavfi/dnn_filter_common.h: remove filter option 'options'

2021-05-16 Thread Guo, Yejun
we'd use 'backend_configs' to avoid confusion --- libavfilter/dnn_filter_common.h | 1 - 1 file changed, 1 deletion(-) diff --git a/libavfilter/dnn_filter_common.h b/libavfilter/dnn_filter_common.h index 09ddd8a5ca..51caa71c24 100644 --- a/libavfilter/dnn_filter_common.h +++ b/libavfilter/dnn_fil

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

2021-05-16 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 v2 21/22] lavfi/deinterlace_qsv: add more input / output pixel formats

2021-05-16 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 v2 20/22] lavfi/deinterlace_qsv: add async_depth option

2021-05-16 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 c0afb001b9..bb3aebf047 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -711,6 +711,7

[FFmpeg-devel] [PATCH v2 19/22] lavfi/deinterlace_qsv: re-use VPPContext for deinterlace_qsv filter

2021-05-16 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 --- libavfilter/Makefile | 2 +- libavfilter/vf_deinterlace_qsv.c |

[FFmpeg-devel] [PATCH v2 18/22] lavfi/deinterlace_qsv: simplify deinterlace_qsv filter

2021-05-16 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 v2 17/22] lavfi/vpp_qsv: check output format string against NULL pointer

2021-05-16 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 018b0e8689..90b0b25210 100644 ---

[FFmpeg-devel] [PATCH v2 16/22] lavfi/qsvvpp: set PTS for output frame

2021-05-16 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 v2 14/22] lavfi/vpp_qsv: double the framerate for deinterlacing

2021-05-16 Thread Haihao Xiang
--- libavfilter/vf_vpp_qsv.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index 29ba220665..ec35f85b04 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -255,10 +255,14 @@ static int config_inp

[FFmpeg-devel] [PATCH v2 15/22] lavfi/qsvvpp: avoid overriding the returned value

2021-05-16 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 v2 13/22] lavfi/scale_qsv: add more input / output pixel formats

2021-05-16 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 bceee8c4df..29ba220

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

2021-05-16 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 03785e9398..bceee8c4df 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -675,6 +675,10

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

2021-05-16 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 dd3afb5e10..03785e9398 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -105

[FFmpeg-devel] [PATCH v2 07/22] lavfi/vpp_qsv: factorize extra MFX configuration

2021-05-16 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 7afbb3c983..c9a7b0ceb9 100644 --

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

2021-05-16 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 v2 10/22] lavfi/scale_qsv: re-use VPPContext for scale_qsv filter

2021-05-16 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 v2 09/22] lavfi/vpp_qsv: add vpp_preinit callback

2021-05-16 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 v2 08/22] lavfi/vpp_qsv: pass scaling mode to the SDK

2021-05-16 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 v2 05/22] lavfi/vpp_qsv: handle NULL pointer when evaluating an expression

2021-05-16 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 e7

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

2021-05-16 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 72

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

2021-05-16 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 v2 02/22] lavfi/scale_qsv: simplify scale_qsv filter

2021-05-16 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 v2 01/22] lavfi/qsv: use QSVVPPContext as base context in vf_vpp_qsv/vf_overlay_qsv

2021-05-16 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 v2 00/22] clean-up QSV filters

2021-05-16 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. --- Update the commit logs in v2 Haihao Xiang

Re: [FFmpeg-devel] [PATCH 00/22] clean-up QSV filters

2021-05-16 Thread Xiang, Haihao
On Fri, 2021-05-14 at 10:19 +0200, Anton Khirnov wrote: > 'lavf' means libavformat, 'lavfi' is used for libavfilter > Thanks for catching this error, I will update the commit log. Regards Haihao ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org h

Re: [FFmpeg-devel] [PATCH v1] avcodec/vaapi_av1: correct data size when create slice data buffer

2021-05-16 Thread Xiang, Haihao
On Mon, 2021-05-17 at 09:50 +0800, Fei Wang wrote: > Set all tiles size to create slice data buffer, hardware will use > slice_data_offset/slice_data_size in slice parameter buffer to get > each tile's data. > > This change will let it success to decode clip which has multi > tiles data inside one

Re: [FFmpeg-devel] [PATCH 3/3] lavfi/vf_dnn_processing.c: fix CID 1460603

2021-05-16 Thread Guo, Yejun
> -Original Message- > From: Guo, Yejun > Sent: 2021年5月11日 15:41 > To: ffmpeg-devel@ffmpeg.org > Cc: Guo, Yejun > Subject: [PATCH 3/3] lavfi/vf_dnn_processing.c: fix CID 1460603 > > CID 1460603 (#1 of 1): Improper use of negative value (NEGATIVE_RETURNS) > --- > libavfilter/vf_dnn_pro

[FFmpeg-devel] [PATCH v1] avcodec/vaapi_av1: correct data size when create slice data buffer

2021-05-16 Thread Fei Wang
Set all tiles size to create slice data buffer, hardware will use slice_data_offset/slice_data_size in slice parameter buffer to get each tile's data. This change will let it success to decode clip which has multi tiles data inside one OBU. Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 2

Re: [FFmpeg-devel] [PATCH V5 5/5] lavfi/dnn_backend_native_layer_mathunary.h: Documentation

2021-05-16 Thread Guo, Yejun
> -Original Message- > From: ffmpeg-devel On Behalf Of > Shubhanshu Saxena > Sent: 2021年5月14日 15:11 > To: ffmpeg-devel@ffmpeg.org > Cc: Shubhanshu Saxena > Subject: [FFmpeg-devel] [PATCH V5 5/5] > lavfi/dnn_backend_native_layer_mathunary.h: Documentation > > Add documentation for Unary

Re: [FFmpeg-devel] [PATCH 3/3] avformat/fifo: check for flushed packets and timeshift

2021-05-16 Thread Marton Balint
On Sun, 16 May 2021, Michael Niedermayer wrote: Fixes: CID1464151 Dereference after null check Signed-off-by: Michael Niedermayer --- libavformat/fifo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/fifo.c b/libavformat/fifo.c index 620fffa032..50656f78b7 10

Re: [FFmpeg-devel] Builds for MAC

2021-05-16 Thread Timo Rothenpieler
On 16.05.2021 21:26, Jan Ekström wrote: On Sun, May 16, 2021 at 10:02 PM Timo Rothenpieler wrote: On 16.05.2021 19:46, Jan Ekström wrote: If you have interest in figuring out building binaries for distribution, I would recommend contributing to one of the public and automated build systems su

[FFmpeg-devel] [PATCH 3/3] avformat/fifo: check for flushed packets and timeshift

2021-05-16 Thread Michael Niedermayer
Fixes: CID1464151 Dereference after null check Signed-off-by: Michael Niedermayer --- libavformat/fifo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/fifo.c b/libavformat/fifo.c index 620fffa032..50656f78b7 100644 --- a/libavformat/fifo.c +++ b/libavformat/fifo

[FFmpeg-devel] [PATCH 1/3] avcodec/dpx: fix off by 1 in bits_per_color check

2021-05-16 Thread Michael Niedermayer
Fixes: CID1476303 Bad bit shift operation Signed-off-by: Michael Niedermayer --- libavcodec/dpx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c index 8e77c09bb1..3563bdc538 100644 --- a/libavcodec/dpx.c +++ b/libavcodec/dpx.c @@ -242,

[FFmpeg-devel] [PATCH 2/3] tools/cws2fws: Check read() for failure

2021-05-16 Thread Michael Niedermayer
Fixes: CID1452579 Argument cannot be negative Signed-off-by: Michael Niedermayer --- tools/cws2fws.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/cws2fws.c b/tools/cws2fws.c index 7046b69957..9ce321fe20 100644 --- a/tools/cws2fws.c +++ b/tools/cws2fws.c @@ -89,6 +89,12 @@ int

Re: [FFmpeg-devel] Builds for MAC

2021-05-16 Thread Jan Ekström
On Sun, May 16, 2021 at 10:02 PM Timo Rothenpieler wrote: > > On 16.05.2021 19:46, Jan Ekström wrote: > > If you have interest in figuring out building binaries for > > distribution, I would recommend contributing to one of the public and > > automated build systems such as https://github.com/BtbN

Re: [FFmpeg-devel] Builds for MAC

2021-05-16 Thread Martin Storsjö
On Sun, 16 May 2021, Timo Rothenpieler wrote: On 16.05.2021 19:46, Jan Ekström wrote: If you have interest in figuring out building binaries for distribution, I would recommend contributing to one of the public and automated build systems such as https://github.com/BtbN/FFmpeg-Builds . Current

Re: [FFmpeg-devel] [PATCH] lavf/flvdec: normalize exporting date metadata

2021-05-16 Thread Anton Khirnov
Quoting Alexander Strasser (2021-05-15 20:20:30) > Hi Anton! > > On 2021-05-14 10:09 +0200, Anton Khirnov wrote: > > Quoting Alexander Strasser (2021-05-12 01:04:28) > > > > > > If the timezone data of an AMF 0 date type is non-zero, include that > > > information as UTC offset in hours and minute

Re: [FFmpeg-devel] Builds for MAC

2021-05-16 Thread Timo Rothenpieler
On 16.05.2021 19:46, Jan Ekström wrote: If you have interest in figuring out building binaries for distribution, I would recommend contributing to one of the public and automated build systems such as https://github.com/BtbN/FFmpeg-Builds . Currently it has Windows and 64bit Linux in there, and

Re: [FFmpeg-devel] Builds for MAC

2021-05-16 Thread Jan Ekström
On Sun, May 16, 2021 at 4:00 PM wrote: > > Hi > > Would you be interested in me making additional unofficial mac > builds for you to add to the downloads page? I have an intel mac, and > I should be getting a sillicon mac soon so I can make builds for ARM > (unlike the existing person) The only pr

Re: [FFmpeg-devel] [PATCH v3 1/3] libavcodec: write out user data unregistered SEI for x264

2021-05-16 Thread Marton Balint
On Sat, 15 May 2021, Brad Hards wrote: Signed-off-by: Brad Hards --- libavcodec/libx264.c | 35 ++- 1 file changed, 30 insertions(+), 5 deletions(-) Please designate the name of the touched component in the prefix of the commit message, e.g: libavcodec/lib

Re: [FFmpeg-devel] Builds for MAC

2021-05-16 Thread Carl Eugen Hoyos
Am So., 16. Mai 2021 um 15:00 Uhr schrieb : > Would you be interested in me making additional unofficial > mac builds for you to add to the downloads page? There is nothing wrong with more builds but we will not promise anything before your download page exists. Carl Eugen __

Re: [FFmpeg-devel] [PATCH] fate/integer.c: Connect test to fuzzer

2021-05-16 Thread Michael Niedermayer
On Sat, May 15, 2021 at 10:08:17PM +0530, Vedaa wrote: > Hi, > > Apologies for the trivial mistakes. I have fixed them in this patch. > I have also added simple checks for overflow and underflow. Would this > be sufficient or should I reduce the bits I read from the fuzzer? its ok but theres a mi

[FFmpeg-devel] Builds for MAC

2021-05-16 Thread libav
Hi Would you be interested in me making additional unofficial mac builds for you to add to the downloads page? I have an intel mac, and I should be getting a sillicon mac soon so I can make builds for ARM (unlike the existing person) The only provider listed stated that he would not be offering

Re: [FFmpeg-devel] [PATCH v2] avformat/flvdec: use milisecond precision for parsing timestamps

2021-05-16 Thread Anton Khirnov
Quoting Marton Balint (2021-05-14 21:28:06) > Also use helper function to set the timestamp. Maybe we could also use > nanosecond precision, but there were some float rounding concerns. > > Signed-off-by: Marton Balint > --- > libavformat/flvdec.c | 11 ++- > tests/ref/fate/flv-demux

Re: [FFmpeg-devel] [PATCH] Add optional NIT table generation

2021-05-16 Thread Marton Balint
On Fri, 14 May 2021, Dominguez Bonini, David wrote: Hi, Hi Marton, Il 2021-05-12 19:18 Marton Balint ha scritto: On Wed, 12 May 2021, Ubaldo Porcheddu wrote: Hi Marton, +} + +//private data +desc_len += 6 + 2; +*q++ = 0x5F; +*q++ = 4; +*q++ = 0x00; +*q++ =

[FFmpeg-devel] [PATCH 1/1] avformat/hlsenc: Fix bug on start_pts

2021-05-16 Thread Hongcheng Zhong
From: spartazhc This patch fixes Bug #9237 In some bitstream, pts of some video packet can be N/A, which will set start_pts to AV_NOPTS_VALUE. Adding an if condition can fix it. Signed-off-by: spartazhc --- libavformat/hlsenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --gi