Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Nicolas George
James Almer (12019-01-04): > We already did size_t for AVSphericalMapping and had to change them to > uint32_t. > size_t is not the correct type at all, as video dimensions are not > system dependent, I fully agree with that. > and it will generate the same issues we already >

Re: [FFmpeg-devel] [PATCH 1/2] Support HDR dynamic metdata (HDR10+) in HEVC decoder.

2019-01-04 Thread James Almer
On 1/4/2019 11:45 PM, Rostislav Pehlivanov wrote: > On Fri, 4 Jan 2019 at 23:19, Mohammad Izadi wrote: > >> Thanks James. >> -- >> Best, >> Mohammad >> >> >> On Fri, Jan 4, 2019 at 3:03 PM James Almer wrote: >> >>> On 1/4/2019 7:51 PM, Rostislav Pehlivanov wrote: On Fri, 4 Jan 2019 at

Re: [FFmpeg-devel] [PATCH 1/2] Support HDR dynamic metdata (HDR10+) in HEVC decoder.

2019-01-04 Thread Rostislav Pehlivanov
On Fri, 4 Jan 2019 at 23:19, Mohammad Izadi wrote: > Thanks James. > -- > Best, > Mohammad > > > On Fri, Jan 4, 2019 at 3:03 PM James Almer wrote: > > > On 1/4/2019 7:51 PM, Rostislav Pehlivanov wrote: > > > On Fri, 4 Jan 2019 at 21:08, James Almer wrote: > > > > > >> On 1/4/2019 3:53 PM,

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread James Almer
On 1/4/2019 10:08 AM, Vittorio Giovara wrote: > On Fri, Jan 4, 2019 at 12:22 PM Nicolas George wrote: > >> Rostislav Pehlivanov (12019-01-04): +typedef struct AVRegionOfInterest { +size_t self_size; +size_t top; +size_t bottom; +size_t left; +

Re: [FFmpeg-devel] [PATCH 1/2] Support HDR dynamic metdata (HDR10+) in HEVC decoder.

2019-01-04 Thread Mohammad Izadi
Thanks James. -- Best, Mohammad On Fri, Jan 4, 2019 at 3:03 PM James Almer wrote: > On 1/4/2019 7:51 PM, Rostislav Pehlivanov wrote: > > On Fri, 4 Jan 2019 at 21:08, James Almer wrote: > > > >> On 1/4/2019 3:53 PM, Rostislav Pehlivanov wrote: > >>> On Fri, 4 Jan 2019 at 18:12, Mohammad Izadi

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Rostislav Pehlivanov
On Fri, 4 Jan 2019 at 20:44, Vittorio Giovara wrote: > On Fri, Jan 4, 2019 at 7:57 PM Rostislav Pehlivanov > wrote: > > > On Fri, 4 Jan 2019 at 16:28, Vittorio Giovara < > vittorio.giov...@gmail.com> > > wrote: > > > > > On Fri, Jan 4, 2019 at 2:37 PM Nicolas George wrote: > > > > > > >

Re: [FFmpeg-devel] [PATCH 1/2] Support HDR dynamic metdata (HDR10+) in HEVC decoder.

2019-01-04 Thread Mohammad Izadi
Hi Rostislav, It seems there is a bit miscommunication here. I dont want to create a full struct. However, as James mentioned too, Content Light and Dynamic HDR10+ are two different SEI types. There's no reason to merge them into a single struct within the HEVC decoder. I mean to create the

Re: [FFmpeg-devel] [PATCH 1/2] Support HDR dynamic metdata (HDR10+) in HEVC decoder.

2019-01-04 Thread James Almer
On 1/4/2019 7:51 PM, Rostislav Pehlivanov wrote: > On Fri, 4 Jan 2019 at 21:08, James Almer wrote: > >> On 1/4/2019 3:53 PM, Rostislav Pehlivanov wrote: >>> On Fri, 4 Jan 2019 at 18:12, Mohammad Izadi wrote: >>> You mean a pointer in HEVCSEIDynamicHDRPlus, not in HEVCSEIContentLight?

Re: [FFmpeg-devel] [PATCH] avcodec/utils: Optimize ff_color_frame()

2019-01-04 Thread James Almer
On 1/4/2019 7:07 PM, Michael Niedermayer wrote: > Fixes: Timeout > Fixes: > 10709/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5630617975259136 > > Before change: Executed > clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5630617975259136 > in 28285 ms > After

Re: [FFmpeg-devel] [PATCH 1/2] Support HDR dynamic metdata (HDR10+) in HEVC decoder.

2019-01-04 Thread Rostislav Pehlivanov
On Fri, 4 Jan 2019 at 21:08, James Almer wrote: > On 1/4/2019 3:53 PM, Rostislav Pehlivanov wrote: > > On Fri, 4 Jan 2019 at 18:12, Mohammad Izadi wrote: > > > >> You mean a pointer in HEVCSEIDynamicHDRPlus, not in HEVCSEIContentLight? > >> -- > >> Best, > >> Mohammad > >> > >> > >> On Thu, Jan

[FFmpeg-devel] [PATCH] avcodec/utils: Optimize ff_color_frame()

2019-01-04 Thread Michael Niedermayer
Fixes: Timeout Fixes: 10709/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5630617975259136 Before change: Executed clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5630617975259136 in 28285 ms After change: Executed

Re: [FFmpeg-devel] [PATCHv2 4/4] avformat/concatdec: always re-calculate start time and duration

2019-01-04 Thread Marton Balint
On Fri, 4 Jan 2019, Nicolas George wrote: Marton Balint (12018-12-30): This allows the underlying files to change their duration on subsequent avformat context opens. An example use case where this matters: ffconcat version 1.0 file dummy.mxf file dummy.mxf ffmpeg -re -stream_loop -1 -i

Re: [FFmpeg-devel] [PATCH 1/2] Support HDR dynamic metdata (HDR10+) in HEVC decoder.

2019-01-04 Thread James Almer
On 1/4/2019 3:53 PM, Rostislav Pehlivanov wrote: > On Fri, 4 Jan 2019 at 18:12, Mohammad Izadi wrote: > >> You mean a pointer in HEVCSEIDynamicHDRPlus, not in HEVCSEIContentLight? >> -- >> Best, >> Mohammad >> >> >> On Thu, Jan 3, 2019 at 5:08 PM Rostislav Pehlivanov >> wrote: >> >>> On Thu, 3

Re: [FFmpeg-devel] [PATCH 1/2] Support HDR dynamic metdata (HDR10+) in HEVC decoder.

2019-01-04 Thread James Almer
On 1/4/2019 2:51 PM, Mohammad Izadi wrote: > I did that before and James ask me to copy. So now, James are you OK with > that? Your first patch allocated a second AVDynamicHDRPlus and memcpy'd everything to the new one every frame. Rostislav suggestion is to allocate a single AVDynamicHDRPlus,

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Vittorio Giovara
On Fri, Jan 4, 2019 at 7:57 PM Rostislav Pehlivanov wrote: > On Fri, 4 Jan 2019 at 16:28, Vittorio Giovara > wrote: > > > On Fri, Jan 4, 2019 at 2:37 PM Nicolas George wrote: > > > > > Vittorio Giovara (12019-01-04): > > > > I personally disagree, what are coordinates within an AVFrame if not

Re: [FFmpeg-devel] [PATCH 1/2] Support HDR dynamic metdata (HDR10+) in HEVC decoder.

2019-01-04 Thread Mohammad Izadi
I like your idea of using AVBufferRef. Thanks for that. However, I prefer both HEVCSEIContentLight and HEVCSEIDynamicHDRPlus exist, because ContentLight and Dynamic HDR10+ are two different things. For a frame, we can have both or none of them or only one of them. It would be more complex to set

[FFmpeg-devel] [PATCH] swscale/output: VSX-optimize 9-16 bit yuv2planeX

2019-01-04 Thread Lauri Kasanen
./ffmpeg_g -f rawvideo -pix_fmt rgb24 -s hd1080 -i /dev/zero -pix_fmt yuv420p16be \ -s 1920x1728 -f null -vframes 100 -v error -nostats - 9-14 bit funcs get about 6x speedup, 16-bit gets about 15x. Fate passes, each format tested with an image to video conversion. Only POWER8 includes 32-bit

Re: [FFmpeg-devel] [PATCH] libavcodec: Remove dynamic relocs from aarch64/h264idct_neon.S

2019-01-04 Thread Manoj Gupta
Thanks a lot :-) On Thu, Jan 3, 2019 at 1:53 PM Michael Niedermayer wrote: > > On Wed, Jan 02, 2019 at 06:29:22PM -0800, Manoj Gupta wrote: > > On Wed, Jan 2, 2019 at 2:33 PM Michael Niedermayer > > wrote: > > > > > > On Wed, Jan 02, 2019 at 10:12:33AM -0800, Manoj Gupta wrote: > > > > On Mon,

Re: [FFmpeg-devel] [PATCH 1/3] vcodec/gdv: Optimize unscaled loop

2019-01-04 Thread Paul B Mahol
On 1/4/19, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer > --- > libavcodec/gdv.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) OK ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

Re: [FFmpeg-devel] [PATCH 2/2] tools/target_dec_fate: Add entries from around issue 500 to 700

2019-01-04 Thread Michael Niedermayer
On Sat, Dec 29, 2018 at 02:35:19AM +0100, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer > --- > tools/target_dec_fate.list | 61 ++ > 1 file changed, 61 insertions(+) will apply [...] -- Michael GnuPG fingerprint:

Re: [FFmpeg-devel] [PATCH 1/2] tools/target_dec_fate.sh: print some statistics

2019-01-04 Thread Michael Niedermayer
On Sat, Dec 29, 2018 at 10:47:16AM +0100, Moritz Barsnick wrote: > On Sat, Dec 29, 2018 at 02:35:18 +0100, Michael Niedermayer wrote: > > +CACHED=$((CACHED+1)) > > I believe this is the sort of math that won't work on old, non-POSIX > Bourne shells. (I'm thinking Solaris /bin/sh here.) In

[FFmpeg-devel] [PATCH 1/3] vcodec/gdv: Optimize unscaled loop

2019-01-04 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- libavcodec/gdv.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/gdv.c b/libavcodec/gdv.c index 538bc38e3e..132ec7288a 100644 --- a/libavcodec/gdv.c +++ b/libavcodec/gdv.c @@ -470,12 +470,10 @@ static int

[FFmpeg-devel] [PATCH 3/3] avcodec/h264_slice: Fix integer overflow in implicit_weight_table()

2019-01-04 Thread Michael Niedermayer
Fixes: signed integer overflow: 2 * 2132811760 cannot be represented in type 'int' Fixes: 11156/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-6237685933408256 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by:

[FFmpeg-devel] [PATCH 2/3] avcodec/gdv: Optimize and factorize scaling loops

2019-01-04 Thread Michael Niedermayer
Fixes: Timeout Fixes: 11067/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5686623711264768 Before change: Executed clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5686623711264768 in 34386 ms After change: Executed

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Rostislav Pehlivanov
On Fri, 4 Jan 2019 at 16:28, Vittorio Giovara wrote: > On Fri, Jan 4, 2019 at 2:37 PM Nicolas George wrote: > > > Vittorio Giovara (12019-01-04): > > > I personally disagree, what are coordinates within an AVFrame if not > the > > > length/size of an object in memory? > > > > That would be an

Re: [FFmpeg-devel] [PATCH 1/2] Support HDR dynamic metdata (HDR10+) in HEVC decoder.

2019-01-04 Thread Rostislav Pehlivanov
On Fri, 4 Jan 2019 at 18:12, Mohammad Izadi wrote: > You mean a pointer in HEVCSEIDynamicHDRPlus, not in HEVCSEIContentLight? > -- > Best, > Mohammad > > > On Thu, Jan 3, 2019 at 5:08 PM Rostislav Pehlivanov > wrote: > > > On Thu, 3 Jan 2019 at 20:13, Mohammad Izadi wrote: > > > > > > > > /**

Re: [FFmpeg-devel] [PATCH 1/2] Support HDR dynamic metdata (HDR10+) in HEVC decoder.

2019-01-04 Thread Mohammad Izadi
You mean a pointer in HEVCSEIDynamicHDRPlus, not in HEVCSEIContentLight? -- Best, Mohammad On Thu, Jan 3, 2019 at 5:08 PM Rostislav Pehlivanov wrote: > On Thu, 3 Jan 2019 at 20:13, Mohammad Izadi wrote: > > > > > /** > > @@ -94,6 +95,50 @@ typedef struct HEVCSEIMasteringDisplay { > >

Re: [FFmpeg-devel] [PATCH 1/2] Support HDR dynamic metdata (HDR10+) in HEVC decoder.

2019-01-04 Thread Mohammad Izadi
I did that before and James ask me to copy. So now, James are you OK with that? -- Best, Mohammad On Thu, Jan 3, 2019 at 5:08 PM Rostislav Pehlivanov wrote: > On Thu, 3 Jan 2019 at 20:13, Mohammad Izadi wrote: > > > > > /** > > @@ -94,6 +95,50 @@ typedef struct HEVCSEIMasteringDisplay { > >

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Michael Niedermayer
On Fri, Jan 04, 2019 at 04:26:51PM +, Derek Buitenhuis wrote: > On 04/01/2019 14:15, Nicolas George wrote: > > Rostislav Pehlivanov (12019-01-04): > >> Hence an AVRational is appropriate as you can have fractions between 0 and > >> 1, the encoder can adjust it and it'll be agnostic. > > > >

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Nicolas George
Steinar H. Gunderson (12019-01-04): > Out of curiosity; if it's important to support as large resolutions > as you can address in memory, what would you do with a 1bpp format > on a 32-bit system, where one could easily store more than size_t pixels in > memory? It is not that important, and

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Steinar H. Gunderson
On Fri, Jan 04, 2019 at 05:28:03PM +0100, Vittorio Giovara wrote: > size_t really seems the right choice here Out of curiosity; if it's important to support as large resolutions as you can address in memory, what would you do with a 1bpp format on a 32-bit system, where one could easily store

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Vittorio Giovara
On Fri, Jan 4, 2019 at 2:37 PM Nicolas George wrote: > Vittorio Giovara (12019-01-04): > > I personally disagree, what are coordinates within an AVFrame if not the > > length/size of an object in memory? > > That would be an argument for making AVFrame.width and AVFrame.height > size_t. But they

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Derek Buitenhuis
On 04/01/2019 14:15, Nicolas George wrote: > Rostislav Pehlivanov (12019-01-04): >> Hence an AVRational is appropriate as you can have fractions between 0 and >> 1, the encoder can adjust it and it'll be agnostic. > > Yes, AVRational is fine. Producing warnings for an unexpected > denominator

Re: [FFmpeg-devel] [PATCH] avformat/vapoursynth: properly initialize err variable in read_header_vs()

2019-01-04 Thread Michael Niedermayer
On Fri, Jan 04, 2019 at 02:17:02AM +0900, nu774 wrote: > The variable "err" is not initialized, and set only when something went wrong. > When everything is OK, nobody sets it, so using it result in UB. > --- > libavformat/vapoursynth.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [FFmpeg-devel] [PATCH] avcodec/tests/rangecoder: initialize array to avoid valgrind warning

2019-01-04 Thread Michael Niedermayer
On Fri, Jan 04, 2019 at 05:19:21PM +0800, Steven Liu wrote: > Michael Niedermayer 于2019年1月4日周五 上午9:48写道: > > > > Found-by: jamrial > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/tests/rangecoder.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Nicolas George
Rostislav Pehlivanov (12019-01-04): > Hence an AVRational is appropriate as you can have fractions between 0 and > 1, the encoder can adjust it and it'll be agnostic. Yes, AVRational is fine. Producing warnings for an unexpected denominator would be a bad idea. Regards, -- Nicolas George

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Rostislav Pehlivanov
On Fri, 4 Jan 2019 at 14:02, Nicolas George wrote: > Rostislav Pehlivanov (12019-01-04): > > Which are in pixels, not bytes. > > And plain int, not uint32_t. > > > This is an encoder-only interface for now. For vp9 the denum would be 255 > > for example. They would warn on out of range qdelta. >

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Nicolas George
Rostislav Pehlivanov (12019-01-04): > Which are in pixels, not bytes. And plain int, not uint32_t. > This is an encoder-only interface for now. For vp9 the denum would be 255 > for example. They would warn on out of range qdelta. > I still don't get why this can't be an int. "For now" is the

Re: [FFmpeg-devel] [PATCHv2 4/4] avformat/concatdec: always re-calculate start time and duration

2019-01-04 Thread Nicolas George
Marton Balint (12018-12-30): > This allows the underlying files to change their duration on subsequent > avformat context opens. > > An example use case where this matters: > > ffconcat version 1.0 > file dummy.mxf > file dummy.mxf > > ffmpeg -re -stream_loop -1 -i dummy.ffconcat -f sdl2 none >

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Nicolas George
Vittorio Giovara (12019-01-04): > I personally disagree, what are coordinates within an AVFrame if not the > length/size of an object in memory? That would be an argument for making AVFrame.width and AVFrame.height size_t. But they are not, and therefore these ROI values have no reason to be

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Vittorio Giovara
On Fri, Jan 4, 2019 at 12:22 PM Nicolas George wrote: > Rostislav Pehlivanov (12019-01-04): > > > +typedef struct AVRegionOfInterest { > > > +size_t self_size; > > > +size_t top; > > > +size_t bottom; > > > +size_t left; > > > +size_t right; > > I'd still much rather have

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Rostislav Pehlivanov
On Fri, 4 Jan 2019 at 11:22, Nicolas George wrote: > Rostislav Pehlivanov (12019-01-04): > > > +typedef struct AVRegionOfInterest { > > > +size_t self_size; > > > +size_t top; > > > +size_t bottom; > > > +size_t left; > > > +size_t right; > > I'd still much rather have uints

Re: [FFmpeg-devel] [PATCH V5 2/2] avcodec/libx264: add support for ROI-based encoding

2019-01-04 Thread Moritz Barsnick
On Fri, Jan 04, 2019 at 00:35:43 +0800, Guo, Yejun wrote: > @@ -345,6 +350,50 @@ static int X264_frame(AVCodecContext *ctx, AVPacket > *pkt, const AVFrame *frame, [...] > +if (sd) { > +if (x4->params.rc.i_aq_mode == X264_AQ_NONE) { > +av_log(ctx,

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Nicolas George
Rostislav Pehlivanov (12019-01-04): > > +typedef struct AVRegionOfInterest { > > +size_t self_size; > > +size_t top; > > +size_t bottom; > > +size_t left; > > +size_t right; > I'd still much rather have uints with fixed sizes than these platform > dependent types. Guo, Yejun

Re: [FFmpeg-devel] [PATCH V5 1/2] avutil: add ROI (Region Of Interest) data struct and bump version

2019-01-04 Thread Rostislav Pehlivanov
On Thu, 3 Jan 2019 at 08:41, Guo, Yejun wrote: > The encoders such as libx264 support different QPs offset for different > MBs, > it makes possible for ROI-based encoding. It makes sense to add support > within ffmpeg to generate/accept ROI infos and pass into encoders. > > Typical usage: After

Re: [FFmpeg-devel] [PATCH] avcodec/prores_ks reduce twice fdct calls

2019-01-04 Thread Alex Mogurenko
ping On Mon, Dec 31, 2018 at 11:02 PM Alex Mogurenko wrote: > thanks, > just sent new patch > > On Mon, Dec 31, 2018 at 5:56 PM Derek Buitenhuis < > derek.buitenh...@gmail.com> wrote: > >> On 31/12/2018 09:12, Alex Mogurenko wrote: >> > I seems to be lame as failed to find how to run fate to

Re: [FFmpeg-devel] [PATCH] avcodec/tests/rangecoder: initialize array to avoid valgrind warning

2019-01-04 Thread Steven Liu
Michael Niedermayer 于2019年1月4日周五 上午9:48写道: > > Found-by: jamrial > Signed-off-by: Michael Niedermayer > --- > libavcodec/tests/rangecoder.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/tests/rangecoder.c b/libavcodec/tests/rangecoder.c > index