[FFmpeg-devel] [PATCH] libavformat/dashenc: Reduce confusion in par error message

2020-08-30 Thread Chris Miceli
In ticket #8754 there is discourse surrounding the error message which is printed upon a mismatched aspect ratio in derived encodings. This should make it clearer to the user as to the issues which they are experiencing. --- libavformat/dashenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

[FFmpeg-devel] [PATCH] avcodec/encode: unref the packet on AVCodec.receive_packet() failure

2020-08-30 Thread James Almer
Fixes memleaks with some encoders that don't unref the packet before returning. This is consistent with the behavior of AVCodec.encode() implementations in encode_simple_internal(). Found-by: mkver Signed-off-by: James Almer --- libavcodec/encode.c | 4 +++- 1 file changed, 3 insertions(+), 1 de

[FFmpeg-devel] Data Partition and FMO

2020-08-30 Thread 13018256776
Dear all, I am new to ffmpeg and x264. I find that “extended” standard supports fmo and data participation. But I didn’t find the information about how to set FMO mode (such as fore-ground with left-over) and data partition mode. Could you give me some suggestions? Thank you so much! Best re

Re: [FFmpeg-devel] [PATCH 2/2] dnn/tensorflow: add log error message

2020-08-30 Thread Guo, Yejun
> -Original Message- > From: ffmpeg-devel On Behalf Of Ting Fu > Sent: 2020年8月27日 12:17 > To: ffmpeg-devel@ffmpeg.org > Subject: [FFmpeg-devel] [PATCH 2/2] dnn/tensorflow: add log error message > > Signed-off-by: Ting Fu > --- > libavfilter/dnn/dnn_backend_tf.c | 59 ++

[FFmpeg-devel] [PATCH v4] avcodec/cfhd: More strictly check tag order and multiplicity

2020-08-30 Thread Michael Niedermayer
This is based on the encoder and a small number of CFHD sample files It should make the decoder more robust against crafted input. Due to the lack of a proper specification it is possible that this may be too strict and may need to be tuned as files not following this ordering are found. Signed-of

[FFmpeg-devel] [PATCH] avfilter/vf_alphamerge: use framesync

2020-08-30 Thread Paul B Mahol
Signed-off-by: Paul B Mahol --- doc/filters.texi| 6 -- libavfilter/vf_alphamerge.c | 136 +--- 2 files changed, 63 insertions(+), 79 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index b0cdf92845..6d2c234b37 100644 --- a/doc/filters.

Re: [FFmpeg-devel] libopenjpeg decoder not correctly setting the pixel format for cinema JP2K wrapped MXF

2020-08-30 Thread Carl Eugen Hoyos
Am So., 30. Aug. 2020 um 21:39 Uhr schrieb Paul B Mahol : > > On 8/30/20, Carl Eugen Hoyos wrote: > > Am So., 30. Aug. 2020 um 19:28 Uhr schrieb Rémi Achard > > : > > > >> As you are probably aware, the libopenjpeg decoder is not able > >> to interpret cinema jp2k mxf correctly, the pixel format b

Re: [FFmpeg-devel] libopenjpeg decoder not correctly setting the pixel format for cinema JP2K wrapped MXF

2020-08-30 Thread Carl Eugen Hoyos
Am So., 30. Aug. 2020 um 19:28 Uhr schrieb Rémi Achard : > As you are probably aware, the libopenjpeg decoder is not able > to interpret cinema jp2k mxf correctly, the pixel format being > assigned as rgb48 instead of xyz12 as it should. Do you have a cinema xyz12 sample that does not work with t

[FFmpeg-devel] [PATCH v3] avcodec/cfhd: More strictly check tag order and multiplicity

2020-08-30 Thread Michael Niedermayer
This is based on the encoder and a small number of CFHD sample files It should make the decoder more robust against crafted input. Due to the lack of a proper specification it is possible that this may be too strict and may need to be tuned as files not following this ordering are found. Signed-of

Re: [FFmpeg-devel] libopenjpeg decoder not correctly setting the pixel format for cinema JP2K wrapped MXF

2020-08-30 Thread Paul B Mahol
On 8/30/20, Carl Eugen Hoyos wrote: > Am So., 30. Aug. 2020 um 19:28 Uhr schrieb Rémi Achard > : > >> As you are probably aware, the libopenjpeg decoder is not able >> to interpret cinema jp2k mxf correctly, the pixel format being >> assigned as rgb48 instead of xyz12 as it should. > > Do you have

Re: [FFmpeg-devel] libopenjpeg decoder not correctly setting the pixel format for cinema JP2K wrapped MXF

2020-08-30 Thread Carl Eugen Hoyos
Am So., 30. Aug. 2020 um 19:28 Uhr schrieb Rémi Achard : > As you are probably aware, the libopenjpeg decoder is not able > to interpret cinema jp2k mxf correctly, the pixel format being > assigned as rgb48 instead of xyz12 as it should. Do you have a sample that does not work with the native dec

Re: [FFmpeg-devel] [PATCH 07/19] avfilter/src_movie: Avoid intermediate buffer for writing string

2020-08-30 Thread Paul B Mahol
On 8/25/20, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt > --- > libavfilter/src_movie.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > LGTM > diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c > index 64d82e9df1..eeb8609855 100644 > --- a/libavfilter

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/roqvideodec: Move transient GetByteContext to the stack

2020-08-30 Thread Paul B Mahol
On 8/30/20, Andreas Rheinhardt wrote: > This avoids keeping potentially dangling pointers in the context, > beautifies the code (by replacing "&ri->gb" by gb for every access to > the GetByteContext) and also highlights the GetByteContext's short-lived > nature better. > > Signed-off-by: Andreas R

Re: [FFmpeg-devel] [PATCH 10/13] avcodec/bitstream: Remove outdated comment

2020-08-30 Thread Paul B Mahol
On 8/29/20, Andreas Rheinhardt wrote: > The comment referred to the INIT_VLC_USE_STATIC flag which has been > removed in 2009 in 595324e143b57a52e2329eb47b84395c70f93087; the > function it referred to was removed even earlier in commit > 83422c1940d963d395a64bee0cbb9c637192ce8c in 2008. > > Signed

Re: [FFmpeg-devel] [PATCH 14/19] avfilter/af_amerge: Fix segfault upon allocation failure

2020-08-30 Thread Paul B Mahol
On 8/25/20, Andreas Rheinhardt wrote: > The amerge filter uses a variable number of inpads and allocates them > in its init function; if all goes well, the number of inpads coincides > with a number stored in the filter's private context. Yet if allocating a > subsequent inpad fails, the uninit fu

[FFmpeg-devel] [PATCH v2] doc/decoders: Document default value of ac3's drc_scale option

2020-08-30 Thread Aman Verma
Signed-off-by: Aman Verma --- This is a revision of the previous patch taking Jim's comments into consideration. Thanks to him and Gyan for the help. doc/decoders.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/decoders.texi b/doc/decoders.texi index 9005714..8649f83

Re: [FFmpeg-devel] [PATCH] avcodec/ff_mpv_encode_end: fix a crash for null s->avctx

2020-08-30 Thread Michael Niedermayer
On Sun, Aug 30, 2020 at 05:07:03PM +0800, Guangxin Xu wrote: > thanks, James and Michael. > Are we ready to merge this? ive applied the avctx change patch which should fix this thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No human being will ever know th

[FFmpeg-devel] libopenjpeg decoder not correctly setting the pixel format for cinema JP2K wrapped MXF

2020-08-30 Thread Rémi Achard
Hi, As you are probably aware, the libopenjpeg decoder is not able to interpret cinema jp2k mxf correctly, the pixel format being assigned as rgb48 instead of xyz12 as it should. Note that ffmpeg native jp2k decoder parse the RSIZ descriptor from the jp2k bitstream and is able to correctly assign

Re: [FFmpeg-devel] [PATCH 5/5] avdevice/lavfi: Don't set pkt->size to the value it already has

2020-08-30 Thread Paul B Mahol
On 8/30/20, Andreas Rheinhardt wrote: > av_new_packet() already sets the size. And if the packet is not > allocated by av_new_packet() (which seems to be impossible atm), both > pkt->size as well as size are 0, so setting it again is unnecessary in > this scenario, too. > > Signed-off-by: Andreas

Re: [FFmpeg-devel] [PATCH 2/5] avdevice/lavfi: Don't reimplement av_frame_get_side_data()

2020-08-30 Thread Paul B Mahol
On 8/30/20, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt > --- > libavdevice/lavfi.c | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > probably ok > diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c > index 2a95cb013c..5e814eada8 100644 > --- a/libavdevic

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/roqvideodec: Remove set-but-unused frame stats

2020-08-30 Thread Paul B Mahol
On 8/30/20, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt > --- > Stange that compilers didn't warn about this. Probably because it is an > array. > probably ok > libavcodec/roqvideodec.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/libavcodec/roqvideodec.c b/liba

[FFmpeg-devel] [PATCH 4/5] avdevice/lavfi: Remove redundant av_packet_unref()

2020-08-30 Thread Andreas Rheinhardt
Since bae8844e35147f92e612a9e0b44e939a293e5bc9, the AVPacket that is intended to be used to return the demuxed packet is automatically unreferenced when the demuxer returns an error. This makes an av_packet_unref() in the lavfi demuxer redundant. Signed-off-by: Andreas Rheinhardt --- libavdevice

[FFmpeg-devel] [PATCH 5/5] avdevice/lavfi: Don't set pkt->size to the value it already has

2020-08-30 Thread Andreas Rheinhardt
av_new_packet() already sets the size. And if the packet is not allocated by av_new_packet() (which seems to be impossible atm), both pkt->size as well as size are 0, so setting it again is unnecessary in this scenario, too. Signed-off-by: Andreas Rheinhardt --- libavdevice/lavfi.c | 1 - 1 file

[FFmpeg-devel] [PATCH 3/5] avdevice/lavfi: Use av_packet_pack_dictionary() to pack dictionary

2020-08-30 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- av_packet_pack_dictionary() returns NULL in case the dictionary's count is zero; but given that the dict API does not return such dicts at all, I have not added any check for this. libavdevice/lavfi.c | 25 - 1 file changed, 8 inserti

[FFmpeg-devel] [PATCH 1/5] avdevice/lavfi: Use av_packet_move_ref() for packet ownership transfer

2020-08-30 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavdevice/lavfi.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index c949ff7e12..2a95cb013c 100644 --- a/libavdevice/lavfi.c +++ b/libavdevice/lavfi.c @@ -392,10 +392,7 @@ static int lavfi

[FFmpeg-devel] [PATCH 2/5] avdevice/lavfi: Don't reimplement av_frame_get_side_data()

2020-08-30 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavdevice/lavfi.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index 2a95cb013c..5e814eada8 100644 --- a/libavdevice/lavfi.c +++ b/libavdevice/lavfi.c @@ -362,16 +362,12 @@ static int

Re: [FFmpeg-devel] Initialize `layout_map` on declaration

2020-08-30 Thread Michael Niedermayer
On Fri, Aug 28, 2020 at 01:00:41PM -0700, Xiaohan Wang (王消寒) wrote: > Resend with @chromium.org account. Sorry for the noise. i think clearing the array is a good idea independant of the bug. It makes bugs like this more repeatable and easier to debug for example and this should have 0 speed effec

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/cfhd: Replace a few literal numbers by named constants

2020-08-30 Thread Michael Niedermayer
On Sat, Aug 29, 2020 at 10:53:21PM +0200, Paul B Mahol wrote: > LGTM will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The misfortune of the wise is better than the prosperity of the fool. -- Epicurus signature.asc Description: PGP signature

Re: [FFmpeg-devel] [RFC PATCH v7 1/4] libavcodec/jpeg2000: Make tag tree functions non static

2020-08-30 Thread Michael Niedermayer
On Fri, Aug 28, 2020 at 12:15:33AM +0530, gautamr...@gmail.com wrote: > From: Gautam Ramakrishnan > > This patch makes the tag_tree_zero() and tag_tree_size() > functions non static and callable from other files. > --- > libavcodec/jpeg2000.c | 12 ++-- > libavcodec/jpeg2000.h | 3 +++ >

Re: [FFmpeg-devel] [PATCH v2 1/2] adtsenc: Add ability to write MPEG2 ID

2020-08-30 Thread Michael Niedermayer
On Sat, Aug 29, 2020 at 05:36:45PM +0100, Kieran Kunhya wrote: > On Sat, 29 Aug 2020 at 13:27, Marvin Scholz wrote: > > > --- > > libavformat/adtsenc.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > Ok will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147E

Re: [FFmpeg-devel] [PATCH] avcodec/mpegvideo_enc: Replace some s->avctx by avctx

2020-08-30 Thread Michael Niedermayer
On Sun, Aug 30, 2020 at 11:50:25AM +0200, Paul B Mahol wrote: > On 8/25/20, Michael Niedermayer wrote: > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/mpegvideo_enc.c | 56 +++--- > > 1 file changed, 28 insertions(+), 28 deletions(-) > > > > Give so

[FFmpeg-devel] [PATCH 1/2] avcodec/roqvideodec: Move transient GetByteContext to the stack

2020-08-30 Thread Andreas Rheinhardt
This avoids keeping potentially dangling pointers in the context, beautifies the code (by replacing "&ri->gb" by gb for every access to the GetByteContext) and also highlights the GetByteContext's short-lived nature better. Signed-off-by: Andreas Rheinhardt --- libavcodec/roqvideo.h| 1 - l

[FFmpeg-devel] [PATCH 2/2] avcodec/roqvideodec: Remove set-but-unused frame stats

2020-08-30 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- Stange that compilers didn't warn about this. Probably because it is an array. libavcodec/roqvideodec.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c index 93c6e9ddf3..36b4ddf755 100644 --- a/libavc

Re: [FFmpeg-devel] [PATCH 2/2] lavfi/avf_concat: check input timestamp.

2020-08-30 Thread Paul B Mahol
On 8/23/20, Nicolas George wrote: > Michael Niedermayer (12020-08-23): >> > +if (buf->pts == AV_NOPTS_VALUE) { >> > +av_log(ctx, AV_LOG_ERROR, "Frame without timestamp on input >> > %d\n", in_no); >> > +return AVERROR(EINVAL); >> > +} >> >> what if the timestamp is "AV_NOPT

Re: [FFmpeg-devel] [PATCH v2 1/2] ffmpeg: add auto_conversion_filters option.

2020-08-30 Thread Paul B Mahol
On 8/23/20, Nicolas George wrote: > Signed-off-by: Nicolas George > --- > doc/ffmpeg.texi | 10 ++ > fftools/ffmpeg.h| 1 + > fftools/ffmpeg_filter.c | 2 ++ > fftools/ffmpeg_opt.c| 3 +++ > 4 files changed, 16 insertions(+) > LGTM

Re: [FFmpeg-devel] [PATCH] avcodec/mpegvideo_enc: Replace some s->avctx by avctx

2020-08-30 Thread Paul B Mahol
On 8/25/20, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer > --- > libavcodec/mpegvideo_enc.c | 56 +++--- > 1 file changed, 28 insertions(+), 28 deletions(-) > Give some explantation in commit log what this is required. Otherwise LGTM. > diff -

Re: [FFmpeg-devel] [PATCH] avcodec/ff_mpv_encode_end: fix a crash for null s->avctx

2020-08-30 Thread Guangxin Xu
thanks, James and Michael. Are we ready to merge this? thanks On Wed, Aug 26, 2020 at 5:51 AM Michael Niedermayer wrote: > On Tue, Aug 25, 2020 at 11:37:59AM -0300, James Almer wrote: > > On 8/25/2020 6:35 AM, Xu Guangxin wrote: > > > Steps to reproduce: > > > 1. ./configure --enable-debug=3 --d

Re: [FFmpeg-devel] [PATCH] avcodec: add PhotoCD decoder

2020-08-30 Thread Paul B Mahol
On 8/30/20, Andreas Rheinhardt wrote: [...] >> +static int read_hufftable(AVCodecContext *avctx, VLC *vlc) >> +{ >> +PhotoCDContext *s = avctx->priv_data; >> +GetByteContext *gb = &s->gb; >> +int start = s->streampos; >> +int count, ret; >> + >> +bytestream2_seek(gb, start, SEE