Re: [FFmpeg-devel] [PATCH 1/3] avcodec/avpacket: add av_packet_resize()

2021-03-14 Thread Andreas Rheinhardt
James Almer: > On 3/11/2021 5:08 PM, Andreas Rheinhardt wrote: >> James Almer: >>> On 3/11/2021 3:26 PM, Andreas Rheinhardt wrote: James Almer: > On 3/11/2021 2:48 PM, Andreas Rheinhardt wrote: >> James Almer: >>> On 3/11/2021 2:27 PM, Andreas Rheinhardt wrote: James Almer

Re: [FFmpeg-devel] Guided Filter Project | GSoC 2021

2021-03-14 Thread Piyush Chauhan
Hello Steven, Thanks for the instructions. I'm done with the first two-step and currently working on the implementation. I'll get back to you once it's finished. Thanks Piyush Chauhan On Mon, 15 Mar 2021 at 07:14, Steven Liu wrote: > > > > 2021年3月15日 上午5:36,Piyush Chauhan 写道: > > > > Hello Ev

[FFmpeg-devel] [PATCH v2] lavfi/qsvvpp: support async depth

2021-03-14 Thread Fei Wang
Async depth will allow qsv filter cache few frames, and avoid force switch and end filter task frame by frame. This change will improve performance for some multi-task case, for example 1:N transcode( decode + vpp + encode) with all QSV plugins. Signed-off-by: Fei Wang --- Change: combine used an

Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg: use the correct size value for wrapped_avframe packets

2021-03-14 Thread Andreas Rheinhardt
James Almer: > pkt->size on packets wrapping an AVFrame signaled by the wrapped_avframe > codec_id are set to the size of the AVFrame structure and not the actual raw > data contained in it. > ffmpeg.c was using those values to print bogus stats about the resulting > output > file. > > Before thi

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/avpacket: add av_packet_resize()

2021-03-14 Thread Andreas Rheinhardt
James Almer: > On 3/14/2021 7:34 AM, Anton Khirnov wrote: >> Quoting James Almer (2021-03-12 18:24:47) >>> >>> The padding exists AFAIK because something, like an optimized bitstream >>> reader that tries to process several bytes at the same time, may end up >>> reading or writing pass the reported

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/avpacket: add av_packet_resize()

2021-03-14 Thread Andreas Rheinhardt
Michael Niedermayer: > On Sun, Mar 14, 2021 at 04:51:44PM +0100, Anton Khirnov wrote: >> Quoting James Almer (2021-03-14 16:35:48) >>> On 3/14/2021 7:34 AM, Anton Khirnov wrote: Quoting James Almer (2021-03-12 18:24:47) > > The padding exists AFAIK because something, like an optimized

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/avpacket: add av_packet_resize()

2021-03-14 Thread Andreas Rheinhardt
Marton Balint: > > > On Fri, 12 Mar 2021, James Almer wrote: > I get a packet from a demuxer. It contains two independent portions (NALUs, OBUs, etc) i want to separate in order to feed them to something like a multi threaded decoder. And so I create a new reference to i

Re: [FFmpeg-devel] Guided Filter Project | GSoC 2021

2021-03-14 Thread Steven Liu
> 2021年3月15日 上午5:36,Piyush Chauhan 写道: > > Hello Everyone, > First: Thank You so much for making this awesome tool. > Second: My name is Piyush Chauhan, I'm a computer science, Undergraduate > student, from India. > Found this project really interesting and coinciding with my skill sets. > I've

Re: [FFmpeg-devel] [PATCH 1/2] avutil/common: Add FFINCREASE_PTR()

2021-03-14 Thread Michael Niedermayer
On Sat, Mar 13, 2021 at 10:20:37PM +0100, Michael Niedermayer wrote: > On Sat, Mar 13, 2021 at 04:41:39PM +0100, Lynne wrote: > > Mar 13, 2021, 16:18 by mich...@niedermayer.cc: > > > > > On Fri, Feb 19, 2021 at 10:00:39PM +0100, Andreas Rheinhardt wrote: > > > > > >> Michael Niedermayer: > > >> >

Re: [FFmpeg-devel] [PATCH 2/2] doc/APIchanges: Fill in some missing information

2021-03-14 Thread Michael Niedermayer
On Wed, Mar 10, 2021 at 07:23:01PM +0100, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer > --- > doc/APIchanges | 48 > 1 file changed, 24 insertions(+), 24 deletions(-) will apply [...] -- Michael GnuPG fingerprint: 9FF2128

Re: [FFmpeg-devel] [PATCH] x11grab: capture a window instead of the whole screen

2021-03-14 Thread Andriy Gelman
On Sat, 13. Mar 00:02, Andriy Gelman wrote: > On Sun, 28. Feb 10:39, Andriy Gelman wrote: > > On Sun, 28. Feb 13:57, sgerwk-at-aol@ffmpeg.org wrote: > > > Hi, > > > > > > On Sat, 27 Feb 2021, Andriy Gelman wrote: > > > > > > > On Mon, 22. Feb 17:53, sgerwk-at-aol@ffmpeg.org wrote: > > > >

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/jpegls: Check A[Q] for overflow in ff_jpegls_update_state_regular()

2021-03-14 Thread Michael Niedermayer
On Wed, Mar 03, 2021 at 10:49:01AM +0100, Michael Niedermayer wrote: > Fixes: Timeout > Fixes: > 30912/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5556235476795392 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signe

Re: [FFmpeg-devel] [PATCH 2/4] avformat/voc_packet: prevent remaining size from becoming negative in ff_voc_get_packet()

2021-03-14 Thread Michael Niedermayer
On Wed, Mar 03, 2021 at 10:49:02AM +0100, Michael Niedermayer wrote: > Fixes: memleak > Fixes: > 30909/clusterfuzz-testcase-minimized-ffmpeg_dem_AVS_fuzzer-4886284057313280 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by:

Re: [FFmpeg-devel] [PATCH] avutil/timecode: Avoid fps overflow

2021-03-14 Thread Michael Niedermayer
On Mon, Mar 01, 2021 at 03:32:09PM +0100, Michael Niedermayer wrote: > Fixes: Integer overflow and division by 0 > Fixes: poc-202102-div.mov > > Found-by: 1vanChen of NSFOCUS Security Team > Signed-off-by: Michael Niedermayer > --- > libavutil/timecode.c | 4 ++-- > 1 file changed, 2 insertions(

Re: [FFmpeg-devel] [PATCH 1/2] avformat/mvi: Check audio size for more overflows

2021-03-14 Thread Michael Niedermayer
On Sat, Feb 27, 2021 at 11:28:09PM +0100, Michael Niedermayer wrote: > Fixes: left shift of negative value -352256000 > Fixes: > 30837/clusterfuzz-testcase-minimized-ffmpeg_dem_MVI_fuzzer-5755626262888448 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/p

Re: [FFmpeg-devel] [PATCH] avcodec/cfhd: Fix negative shift in cfhd_decode()

2021-03-14 Thread Michael Niedermayer
On Wed, Feb 17, 2021 at 06:10:40PM +0100, Michael Niedermayer wrote: > Fixes: left shift of negative value -1 > Fixes: > 30714/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-4867823371419648 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/

[FFmpeg-devel] Guided Filter Project | GSoC 2021

2021-03-14 Thread Piyush Chauhan
Hello Everyone, First: Thank You so much for making this awesome tool. Second: My name is Piyush Chauhan, I'm a computer science, Undergraduate student, from India. Found this project really interesting and coinciding with my skill sets. I've started grokking through the codebase, read the guided f

Re: [FFmpeg-devel] [PATCH] avcodec/wrapped_avframe: stop using sizeof(AVFrame)

2021-03-14 Thread James Almer
On 3/14/2021 6:10 PM, Marton Balint wrote: On Sun, 14 Mar 2021, James Almer wrote: On 3/14/2021 3:25 PM, Marton Balint wrote: On Sun, 14 Mar 2021, James Almer wrote: I guess the fundamental problem of WRAPPED_AVFRAME is that deep copying it is not supported, but you don't exactly disallo

Re: [FFmpeg-devel] [PATCH 2/2] RFC ffmpeg: exit demuxers earlier after signal received

2021-03-14 Thread Michael Niedermayer
On Sat, Nov 28, 2020 at 02:46:54PM -0500, Andriy Gelman wrote: > From: Andriy Gelman > > We currently use the same interrupt_callback function for both muxers > and demuxers to break out of potential infinite loops. > > The function decode_interrupt_cb() checks for how many SIGINT/SIGTERM > inte

Re: [FFmpeg-devel] [PATCH] avcodec/wrapped_avframe: stop using sizeof(AVFrame)

2021-03-14 Thread Marton Balint
On Sun, 14 Mar 2021, James Almer wrote: On 3/14/2021 3:25 PM, Marton Balint wrote: On Sun, 14 Mar 2021, James Almer wrote: I guess the fundamental problem of WRAPPED_AVFRAME is that deep copying it is not supported, but you don't exactly disallow that by using a size of 0, because the de

Re: [FFmpeg-devel] [PATCH] avfilter/setparams: add FF_FILTER_FLAG_HWFRAME_AWARE

2021-03-14 Thread Pavel Koshevoy
On Sun, Mar 14, 2021 at 1:59 PM Pavel Koshevoy wrote: > > I guess I no longer know how to use avfilter api: > > I've been doing this: > ``` > graph_ = avfilter_graph_alloc(); > > if (nb_threads_ > 0) > { > graph_->nb_threads = nb_threads_; > } > > int err = avfilter_grap

Re: [FFmpeg-devel] [PATCH] avfilter/setparams: add FF_FILTER_FLAG_HWFRAME_AWARE

2021-03-14 Thread Pavel Koshevoy
On Thu, Oct 1, 2020 at 4:24 PM Mark Thompson wrote: > On 29/09/2020 19:49, Pavel Koshevoy wrote: > > On Tue, Sep 29, 2020 at 12:14 PM Mark Thompson wrote: > > > >> On 29/09/2020 18:14, Pavel Koshevoy wrote: > >>> On Tue, Sep 29, 2020 at 10:09 AM Mark Thompson wrote: > >>> > >> > >> > >> >

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/avpacket: add av_packet_resize()

2021-03-14 Thread Michael Niedermayer
On Sun, Mar 14, 2021 at 04:51:44PM +0100, Anton Khirnov wrote: > Quoting James Almer (2021-03-14 16:35:48) > > On 3/14/2021 7:34 AM, Anton Khirnov wrote: > > > Quoting James Almer (2021-03-12 18:24:47) > > >> > > >> The padding exists AFAIK because something, like an optimized bitstream > > >> read

Re: [FFmpeg-devel] [PATCH] avcodec/wrapped_avframe: stop using sizeof(AVFrame)

2021-03-14 Thread James Almer
On 3/14/2021 3:25 PM, Marton Balint wrote: On Sun, 14 Mar 2021, James Almer wrote: Is using sizeof(AVFrame) an issue apart from that it is not part of ABI? Is there an actual issue this patch fix? It doesn't fix a current issue, it ensures an issue doesn't arise in the future when a new fi

Re: [FFmpeg-devel] [PATCH] avcodec/wrapped_avframe: stop using sizeof(AVFrame)

2021-03-14 Thread Marton Balint
On Sun, 14 Mar 2021, James Almer wrote: Is using sizeof(AVFrame) an issue apart from that it is not part of ABI? Is there an actual issue this patch fix? It doesn't fix a current issue, it ensures an issue doesn't arise in the future when a new field is added to AVFrame and it's lost when

Re: [FFmpeg-devel] [PATCH v2] avcodec: add a mention about get_encode_buffer in the old encode API doxy

2021-03-14 Thread James Almer
On 3/14/2021 8:09 AM, Anton Khirnov wrote: Quoting James Almer (2021-03-13 14:34:05) Direct users to the callback that should be used to keep supporting user provided buffers with the new encode API. Signed-off-by: James Almer --- libavcodec/avcodec.h | 8 ++-- 1 file changed, 6 inserti

[FFmpeg-devel] Re: [PATCH 1/3] avcodec/avpacket: add av_packet_resize()

2021-03-14 Thread Anton Khirnov
Quoting James Almer (2021-03-14 16:35:48) > On 3/14/2021 7:34 AM, Anton Khirnov wrote: > > Quoting James Almer (2021-03-12 18:24:47) > >> > >> The padding exists AFAIK because something, like an optimized bitstream > >> reader that tries to process several bytes at the same time, may end up > >> re

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/avpacket: add av_packet_resize()

2021-03-14 Thread James Almer
On 3/14/2021 7:34 AM, Anton Khirnov wrote: Quoting James Almer (2021-03-12 18:24:47) The padding exists AFAIK because something, like an optimized bitstream reader that tries to process several bytes at the same time, may end up reading or writing pass the reported end of the buffer. That means

[FFmpeg-devel] [PATCH] avcodec: add Actimagine VX video decoder

2021-03-14 Thread Florian Nouwt
This video format is mainly used in older Nintendo DS games in a .vx container. It is the predecessor of the Mobiclip format. Signed-off-by: Florian Nouwt --- Changelog |1 + configure |1 + doc/general_contents.texi |2 + libavcodec/Makefile |

Re: [FFmpeg-devel] [PATCH] avutil/frame: ensure the frame is writable in av_frame_copy()

2021-03-14 Thread Anton Khirnov
Quoting James Almer (2021-03-14 15:28:31) > On 3/14/2021 7:47 AM, Anton Khirnov wrote: > > Quoting James Almer (2021-03-11 15:18:38) > >> On 3/11/2021 10:56 AM, Andreas Rheinhardt wrote: > >>> James Almer: > Signed-off-by: James Almer > --- > libavutil/frame.c | 2 ++ > 1

Re: [FFmpeg-devel] [PATCH] avutil/frame: ensure the frame is writable in av_frame_copy()

2021-03-14 Thread James Almer
On 3/14/2021 7:47 AM, Anton Khirnov wrote: Quoting James Almer (2021-03-11 15:18:38) On 3/11/2021 10:56 AM, Andreas Rheinhardt wrote: James Almer: Signed-off-by: James Almer --- libavutil/frame.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavutil/frame.c b/libavutil/frame.c

Re: [FFmpeg-devel] [PATCH] avcodec/wrapped_avframe: stop using sizeof(AVFrame)

2021-03-14 Thread James Almer
On 3/14/2021 9:23 AM, Marton Balint wrote: On Sat, 13 Mar 2021, James Almer wrote: Signed-off-by: James Almer --- Setting pkt->size to 0 but leaving pkt->data pointing to the frame ensures that the packet isn't mistaken for an empty one, and prevents wrong use of the data pointer in case a

Re: [FFmpeg-devel] [PATCH] Fix wrong time_base bug

2021-03-14 Thread Donough Liu
But using framerate to calculate time_base is also an error, you can try transcoding this video: https://drive.google.com/file/d/1bOV90UP61GbSAyzgsfzBZAOU_9feLPpm/view?usp=sharing On Sun, Mar 14, 2021 at 7:14 PM Anton Khirnov wrote: > Quoting Donough Liu (2021-03-12 18:47:09) > > Set time_base t

Re: [FFmpeg-devel] [PATCH] avcodec/wrapped_avframe: stop using sizeof(AVFrame)

2021-03-14 Thread Marton Balint
On Sat, 13 Mar 2021, James Almer wrote: Signed-off-by: James Almer --- Setting pkt->size to 0 but leaving pkt->data pointing to the frame ensures that the packet isn't mistaken for an empty one, and prevents wrong use of the data pointer in case av_packet_make_writable() is called on it (The

Re: [FFmpeg-devel] [PATCH] Fix wrong time_base bug

2021-03-14 Thread Anton Khirnov
Quoting Donough Liu (2021-03-12 18:47:09) > Set time_base to inv of frame rate is only valid when input video have fixed > frame rate. > > Signed-off-by: Donough Liu > --- > doc/examples/transcoding.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/doc/examples/transco

Re: [FFmpeg-devel] [PATCH v2] avcodec: add a mention about get_encode_buffer in the old encode API doxy

2021-03-14 Thread Anton Khirnov
Quoting James Almer (2021-03-13 14:34:05) > Direct users to the callback that should be used to keep supporting user > provided buffers with the new encode API. > > Signed-off-by: James Almer > --- > libavcodec/avcodec.h | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) Looks ok

Re: [FFmpeg-devel] [PATCH] avutil/frame: ensure the frame is writable in av_frame_copy()

2021-03-14 Thread Anton Khirnov
Quoting James Almer (2021-03-11 15:18:38) > On 3/11/2021 10:56 AM, Andreas Rheinhardt wrote: > > James Almer: > >> Signed-off-by: James Almer > >> --- > >> libavutil/frame.c | 2 ++ > >> 1 file changed, 2 insertions(+) > >> > >> diff --git a/libavutil/frame.c b/libavutil/frame.c > >> index eab5

[FFmpeg-devel] Re: [PATCH 1/3] avcodec/avpacket: add av_packet_resize()

2021-03-14 Thread Anton Khirnov
Quoting James Almer (2021-03-12 18:24:47) > > The padding exists AFAIK because something, like an optimized bitstream > reader that tries to process several bytes at the same time, may end up > reading or writing pass the reported end of the buffer. > That means that if reading and it's not all