Re: [FFmpeg-devel] [PATCH] set AVFrame decode_error_flags in case of decoding error by h264dec

2019-06-09 Thread James Almer
_INVALID_BITSTREAM, FF_DECODE_ERROR_MISSING_REFERENCE, or both, since as you mentioned they describe the errors that could take place in ff_h264_execute_decode_slices() just fine. > > Thanks > > > On Sun, Jun 9, 2019 at 10:15 PM James Almer wrote: > >> On 6/10/2019 12

Re: [FFmpeg-devel] [PATCH] avformat/oggparseogm: unknown codec triggers error

2019-06-14 Thread James Almer
On 6/14/2019 11:52 AM, Reimar Döffinger wrote: > > > On 14.06.2019, at 03:15, Chris Cunningham wrote: > >> Only "succeed" to read a header if the codec is valid. Otherwise >> return AVERROR_INVALIDDATA. > > That doesn't sound right to me, an unknown codec in (possibly) a single > stream is no

Re: [FFmpeg-devel] [PATCH 4/5] avcodec/bink: Reorder operations in init to avoid memleak on error

2019-06-16 Thread James Almer
On 6/15/2019 7:00 PM, Michael Niedermayer wrote: > Fixes: Direct leak of 536 byte(s) in 1 object(s) > Fixes: > 15266/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINK_fuzzer-5629530426834944 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/f

Re: [FFmpeg-devel] [PATCH 2/4] avcodec/hevc_ps: Fix integer overflow with num_tile_rows

2019-06-16 Thread James Almer
On 6/13/2019 3:32 PM, Michael Niedermayer wrote: > Fixes: signed integer overflow: -2147483648 - 1 cannot be represented in type > 'int' > Fixes: > 14880/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5130977304641536 > > Found-by: continuous fuzzing process > https://github.com/

Re: [FFmpeg-devel] [PATCH 01/18] cbs: Allow non-blank packets in ff_cbs_write_packet

2019-06-17 Thread James Almer
On 6/17/2019 12:42 AM, Andreas Rheinhardt wrote: > Up until now, ff_cbs_write_packet always initialized the packet > structure it received without documenting this behaviour; furthermore, > the packet's buffer would (on success) be overwritten with the new > buffer without unreferencing the old. Th

Re: [FFmpeg-devel] [PATCH 01/18] cbs: Allow non-blank packets in ff_cbs_write_packet

2019-06-17 Thread James Almer
On 6/17/2019 9:44 AM, James Almer wrote: > On 6/17/2019 12:42 AM, Andreas Rheinhardt wrote: >> Up until now, ff_cbs_write_packet always initialized the packet >> structure it received without documenting this behaviour; furthermore, >> the packet's buffer would (on succes

Re: [FFmpeg-devel] [PATCH 10/18] cbs: Remove superfluous checks for ff_cbs_delete_unit

2019-06-17 Thread James Almer
On 6/17/2019 12:42 AM, Andreas Rheinhardt wrote: > ff_cbs_delete_unit never fails if the index of the unit to delete is > valid; document this behaviour explicitly and remove the checks for > whether ff_cbs_delete_unit failed, because all the callers of > ff_cbs_delete_unit already make sure that t

Re: [FFmpeg-devel] [PATCH 11/18] cbs_h264, h264_metadata: Deleting SEI messages never fails

2019-06-17 Thread James Almer
On 6/17/2019 12:42 AM, Andreas Rheinhardt wrote: > Deleting a unit from a fragment in CBS only fails if there is no unit > in the fragment corresponding to the position given as argument to > ff_cbs_delete_unit. Given that ff_cbs_h264_delete_sei_message asserts > this to be so, we know that the cal

Re: [FFmpeg-devel] [PATCH 01/18] cbs: Allow non-blank packets in ff_cbs_write_packet

2019-06-17 Thread James Almer
On 6/17/2019 11:34 AM, Andreas Rheinhardt wrote: > James Almer: >> On 6/17/2019 9:44 AM, James Almer wrote: >>> On 6/17/2019 12:42 AM, Andreas Rheinhardt wrote: >>>> Up until now, ff_cbs_write_packet always initialized the packet >>>> structure it r

Re: [FFmpeg-devel] [PATCH 2/4] avcodec/hevc_ps: Fix integer overflow with num_tile_rows

2019-06-17 Thread James Almer
On 6/17/2019 6:54 PM, Michael Niedermayer wrote: > On Sun, Jun 16, 2019 at 11:10:43PM -0300, James Almer wrote: >> On 6/13/2019 3:32 PM, Michael Niedermayer wrote: >>> Fixes: signed integer overflow: -2147483648 - 1 cannot be represented in >>> type 'int&#x

Re: [FFmpeg-devel] [PATCH 2/4] avcodec/hevc_ps: Fix integer overflow with num_tile_rows

2019-06-19 Thread James Almer
On 6/19/2019 6:22 AM, Michael Niedermayer wrote: > On Mon, Jun 17, 2019 at 07:55:45PM -0300, James Almer wrote: >> On 6/17/2019 6:54 PM, Michael Niedermayer wrote: >>> On Sun, Jun 16, 2019 at 11:10:43PM -0300, James Almer wrote: >>>> On 6/13/2019 3:32 PM, Michael

Re: [FFmpeg-devel] [PATCH 2/4] avcodec/hevc_ps: Fix integer overflow with num_tile_rows

2019-06-19 Thread James Almer
On 6/19/2019 3:13 PM, Michael Niedermayer wrote: > On Wed, Jun 19, 2019 at 12:54:25PM -0300, James Almer wrote: >> On 6/19/2019 6:22 AM, Michael Niedermayer wrote: >>> On Mon, Jun 17, 2019 at 07:55:45PM -0300, James Almer wrote: >>>> On 6/17/2019 6:54 PM, Michael N

Re: [FFmpeg-devel] [FFmpeg-cvslog] av_format/hlsenc: fix %v handling by format_name function

2019-06-19 Thread James Almer
On 6/19/2019 3:19 PM, Bodecs Bela wrote: > > 2019.06.19. 19:37 keltezéssel, Michael Niedermayer írta: >> On Wed, Jun 19, 2019 at 10:03:51AM +, Bodecs Bela wrote: >>> ffmpeg | branch: master | Bodecs Bela | Mon Jun >>> 17 23:05:21 2019 +0200| [09a4853930e7950f423e9161004871afe659ed84] | >>> co

Re: [FFmpeg-devel] [PATCH] avformat/oggdec: only parse headers before data

2019-06-19 Thread James Almer
On 6/19/2019 11:11 PM, Chris Cunningham wrote: > On Wed, Jun 19, 2019 at 11:25 AM Michael Niedermayer > wrote: > > breaks: > ./ffmpeg -i bgc.sub.dub.ogm -vframes 3 -y test.webm > sample: http://samples.mplayerhq.hu/ogg/bgc.sub.dub.ogm > > [...] > > -- > Michael     GnuP

Re: [FFmpeg-devel] [PATCH 2/4] avcodec/hevc_ps: Fix integer overflow with num_tile_rows

2019-06-19 Thread James Almer
On 6/19/2019 3:59 PM, James Almer wrote: > On 6/19/2019 3:13 PM, Michael Niedermayer wrote: >> On Wed, Jun 19, 2019 at 12:54:25PM -0300, James Almer wrote: >>> On 6/19/2019 6:22 AM, Michael Niedermayer wrote: >>>> On Mon, Jun 17, 2019 at 07:55:45PM -0300, James Almer

Re: [FFmpeg-devel] [PATCH v4 1/5] lavc/h265_profile_level: Fix DPB size calculation

2019-06-20 Thread James Almer
On 6/2/2019 1:48 PM, Mark Thompson wrote: > On 06/05/2019 22:02, Mark Thompson wrote: >> The maxDpbPicBuf value which is used in the DPB size calculation depends >> on the profile (it's usually 6, but 7 for screen-extended profiles). >> --- >> libavcodec/h265_profile_level.c | 86 -

[FFmpeg-devel] [PATCH 1/2] avcodec/cbs_h265: fix valid range of num_tile_{columns, rows}_minus1 in H265RawPPS

2019-06-20 Thread James Almer
The spec states they can't be higher than the respective dimensions of the stream in CTBs. Signed-off-by: James Almer --- I don't think it's wise further limiting the range to the maximum currently defined for level 6.2 using those two HEVC_ defines, since a stream could in theory

[FFmpeg-devel] [PATCH 2/2] avcodec/cbs_h265: fix valid range of column_{width, height}_minus1 in H265RawPPS

2019-06-20 Thread James Almer
The spec states they are in units of CTBs. Signed-off-by: James Almer --- libavcodec/cbs_h265_syntax_template.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/cbs_h265_syntax_template.c b/libavcodec/cbs_h265_syntax_template.c index d2a20ddb35..571c9d3544

Re: [FFmpeg-devel] [PATCH] libavcodec: Reduce the size of some arrays

2019-06-20 Thread James Almer
On 6/19/2019 4:08 PM, Michael Niedermayer wrote: > On Wed, Jun 19, 2019 at 04:39:47AM +0200, Andreas Rheinhardt wrote: >> This commit uses smaller types for some static const arrays to reduce >> their size in case the entries can be represented in the smaller type. >> The biggest savings came from

[FFmpeg-devel] [PATCH] avcodec/cbs_h265: add support for Alpha Channel Info SEI messages

2019-06-20 Thread James Almer
As defined in section F.14.2.8 and F.14.3.8 Signed-off-by: James Almer --- https://trac.ffmpeg.org/attachment/ticket/7965/puppets_with_alpha_hevc.mov libavcodec/cbs_h2645.c| 1 + libavcodec/cbs_h265.h | 12 + libavcodec/cbs_h265_syntax_template.c | 37

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/cbs_h265: fix valid range of num_tile_{columns, rows}_minus1 in H265RawPPS

2019-06-21 Thread James Almer
On 6/21/2019 1:24 AM, Gyan wrote: > > > On 20-06-2019 11:15 PM, James Almer wrote: >> The spec states they can't be higher than the respective dimensions of >> the >> stream in CTBs. >> >> Signed-off-by: James Almer >> --- >> I don

Re: [FFmpeg-devel] [PATCH] ffprobe: Fix memory leak

2019-06-21 Thread James Almer
On 6/21/2019 10:36 AM, Derek Buitenhuis wrote: > This packet was not necessarily unreferenced. > > Signed-off-by: Derek Buitenhuis > --- > fftools/ffprobe.c | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c > index 3becb6330

Re: [FFmpeg-devel] [PATCH] ffprobe: Fix memory leak

2019-06-21 Thread James Almer
On 6/21/2019 11:13 AM, Derek Buitenhuis wrote: > On 21/06/2019 14:46, James Almer wrote: >> Why not just call this unconditionally instead of the init() + zero below? > > I wasn't sure from a quick skim if these packets were > referenced elsewhere (and thus unref

Re: [FFmpeg-devel] [PATCH v2] ffprobe: Fix memory leak

2019-06-21 Thread James Almer
On 6/21/2019 11:15 AM, Derek Buitenhuis wrote: > This packet was not necessarily unreferenced. > > Signed-off-by: Derek Buitenhuis > --- > fftools/ffprobe.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c > index 3becb6330e..dac70ba5a1 100644 > -

Re: [FFmpeg-devel] [PATCH v2] ffprobe: Fix memory leak

2019-06-21 Thread James Almer
On 6/21/2019 11:39 AM, Derek Buitenhuis wrote: > On 21/06/2019 15:26, James Almer wrote: >> Remove the three lines below as well before pushing. They are >> superfluous as av_packet_unref() does the same internally. > > OK. > > The documentation for av_packet_unref

Re: [FFmpeg-devel] [PATCH v3] ffprobe: Fix memory leak

2019-06-21 Thread James Almer
On 6/21/2019 11:41 AM, Derek Buitenhuis wrote: > This packet was not necessarily unreferenced. > > Signed-off-by: Derek Buitenhuis > --- > fftools/ffprobe.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c > index 3becb6330e..5aad

Re: [FFmpeg-devel] [PATCH] avcodec/cbs_h265: add support for Alpha Channel Info SEI messages

2019-06-22 Thread James Almer
ionality. I'd rather not change h2645_parse for this and risk unpredictable behavior from the decoder. > > James Almer: >> As defined in section F.14.2.8 and F.14.3.8 >> >> Signed-off-by: James Almer >> --- >> https://trac.ffmpeg.org/attachme

Re: [FFmpeg-devel] [PATCH 08/37] avformat/matroskadec: Don't copy attached pictures

2019-06-22 Thread James Almer
On 5/16/2019 7:29 PM, Andreas Rheinhardt wrote: > This commit replaces copying attached pictures by using references to > the already existing buffers. > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/matroskadec.c | 16 ++-- > 1 file changed, 10 insertions(+), 6 deletions(-

Re: [FFmpeg-devel] [PATCH 06/37] avformat/matroskadec: Use generic size check for signed integers

2019-06-22 Thread James Almer
On 5/16/2019 7:29 PM, Andreas Rheinhardt wrote: > and drop the redundant checks contained in ebml_read_uint and > ebml_read_sint. > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/matroskadec.c | 7 +-- > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/libavformat/ma

Re: [FFmpeg-devel] [PATCH 14/37] avformat/matroskadec: Remove non-incremental parsing of clusters

2019-06-22 Thread James Almer
On 5/16/2019 7:29 PM, Andreas Rheinhardt wrote: > When the new incremental parser was introduced, the old parser was > kept, because the new parser was unable to handle the way SSA packets > are put into Matroska. But since 2014 (since c7d8dbad) this is no > longer needed, so that the old parser ca

Re: [FFmpeg-devel] [PATCH 07/37] avformat/matroskadec: Set offset of first cluster

2019-06-22 Thread James Almer
On 5/16/2019 7:29 PM, Andreas Rheinhardt wrote: > By default, the data_offset member of the AVFormatInternal of the > AVFormatContext associated with the MatroskaDemuxContext has not been > initialized explicitly by any Matroska-specific function, so that it was > initialized by default to the offs

Re: [FFmpeg-devel] [PATCH 05/37] avformat/matroskadec: Get rid of cluster size field assumption

2019-06-22 Thread James Almer
On 5/16/2019 7:29 PM, Andreas Rheinhardt wrote: > The earlier code relied on the length of clusters always being coded on > eight bytes as was the behaviour of libavformat's Matroska muxer until > recently. But given that our own Matroska muxer now (and mkvmerge from > time immemorial) creates file

Re: [FFmpeg-devel] [PATCH 15/37] avformat/matroskadec: Don't keep old blocks

2019-06-22 Thread James Almer
On 5/16/2019 7:29 PM, Andreas Rheinhardt wrote: > Before this commit, the Matroska muxer would read a block when required > to do so, parse the block, create and return the necessary AVPackets and > yet keep the blocks (in a dynamically allocated list), although they > aren't used at all any more.

Re: [FFmpeg-devel] [PATCH 09/37] avformat/matroskadec: Remove redundant initialization

2019-06-22 Thread James Almer
On 5/16/2019 7:29 PM, Andreas Rheinhardt wrote: > Every new element of an EbmlList is zeroed initially in > ebml_parse_elem, so that in particular a SimpleBlock's duration is > initialized to zero. Therefore it is unnecessary to initialize this > field again (for SimpleBlocks) in matroska_parse_clu

Re: [FFmpeg-devel] [PATCH 05/37] avformat/matroskadec: Get rid of cluster size field assumption

2019-06-23 Thread James Almer
On 6/23/2019 1:28 AM, Andreas Rheinhardt wrote: > James Almer: >> On 5/16/2019 7:29 PM, Andreas Rheinhardt wrote: >>> The earlier code relied on the length of clusters always being coded on >>> eight bytes as was the behaviour of libavformat's Matroska muxer until

Re: [FFmpeg-devel] [PATCH 12/37] avformat/matroskadec: Improve read error/EOF checks II

2019-06-23 Thread James Almer
On 5/16/2019 7:29 PM, Andreas Rheinhardt wrote: > This commit fixes a number of bugs: > > 1. There was no check that no read error/EOF occured during > ebml_read_uint, ebml_read_sint and ebml_read_float. > 2. ebml_read_ascii and ebml_read_binary did sometimes not forward > error codes; instead the

Re: [FFmpeg-devel] [PATCH 12/37] avformat/matroskadec: Improve read error/EOF checks II

2019-06-23 Thread James Almer
On 6/23/2019 1:01 PM, Andreas Rheinhardt wrote: > James Almer: >> On 5/16/2019 7:29 PM, Andreas Rheinhardt wrote: >>> This commit fixes a number of bugs: >>> >>> 1. There was no check that no read error/EOF occured during >>> ebml_read_ui

Re: [FFmpeg-devel] [PATCH 11/37] avformat/matroskadec: Improve read error/EOF checks I

2019-06-23 Thread James Almer
On 5/16/2019 7:29 PM, Andreas Rheinhardt wrote: > ebml_read_num had a number of flaws: > > 1. The check for read errors/EOF was totally wrong. E.g. an EBML number > beginning with the invalid 0x00 would be considered a read error, > although it is just invalid data. > 2. The check for read errors/

Re: [FFmpeg-devel] [PATCH 04/37] avformat/matroskadec: Don't zero unnecessarily

2019-06-24 Thread James Almer
On 5/16/2019 7:29 PM, Andreas Rheinhardt wrote: > It is only necessary to zero the initial allocated memory used to store > the size of laced frames if the block used Xiph lacing. Otherwise no > unintialized data was ever used, so use av_malloc instead of av_mallocz. > > Also use the correct type

Re: [FFmpeg-devel] [PATCH 11/13] avformat/matroskadec: Improve read error/EOF checks I

2019-06-24 Thread James Almer
On 6/23/2019 8:42 PM, Andreas Rheinhardt wrote: > ebml_read_num had a number of flaws: > > 1. The check for read errors/EOF was totally wrong. E.g. an EBML number > beginning with the invalid 0x00 would be considered a read error, > although it is just invalid data. > 2. The check for read errors/

Re: [FFmpeg-devel] [PATCH] avformat/matroskadec: Improve read error/EOF checks I

2019-06-24 Thread James Almer
On 6/24/2019 10:08 PM, Andreas Rheinhardt wrote: > ebml_read_num had a number of flaws: > > 1. The check for read errors/EOF was totally wrong. E.g. an EBML number > beginning with the invalid 0x00 would be considered a read error, > although it is just invalid data. > 2. The check for read errors

Re: [FFmpeg-devel] [PATCH 13/13] avformat/matroskadec: Improve error/EOF checks III

2019-06-24 Thread James Almer
On 6/23/2019 8:42 PM, Andreas Rheinhardt wrote: > Up until now, when an element was skipped, it was relied upon > ffio_limit to make sure that there is enough data available to skip. > ffio_limit itself relies upon the availability of the file's size. As > this needn't be available, the check has b

Re: [FFmpeg-devel] [PATCH 16/37] avformat/matroskadec: Treat SimpleBlock as EBML_BIN

2019-06-24 Thread James Almer
On 5/16/2019 7:30 PM, Andreas Rheinhardt wrote: > Up until now, the SimpleBlock was treated specially: It basically had > its own EBML category and it was also included in the BlockGroup EBML > syntax (although a SimpleBlock must not exist in a BlockGroup according > to the Matroska specifications)

Re: [FFmpeg-devel] [PATCH 12/13] avformat/matroskadec: Improve read error/EOF checks II

2019-06-24 Thread James Almer
On 6/23/2019 8:42 PM, Andreas Rheinhardt wrote: > This commit fixes a number of bugs: > > 1. There was no check that no read error/EOF occured during > ebml_read_uint, ebml_read_sint and ebml_read_float. > 2. ebml_read_ascii and ebml_read_binary did sometimes not forward > error codes; instead the

Re: [FFmpeg-devel] [PATCH] movsub_bsf: Fix mov2textsub regression

2019-06-24 Thread James Almer
On 6/23/2019 10:26 PM, Philip Langdale wrote: > On Sun, 23 Jun 2019 06:46:12 +0200 > Andreas Rheinhardt wrote: > >> The mov flavour of timed text uses the first two bytes of the packet >> as a length field. And up until 11bef2fe said length field has been >> read correctly in the mov2textsub bsf.

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/hevc_ps: Fix integer overflow with num_tile_rows and num_tile_columns

2019-06-25 Thread James Almer
On 6/25/2019 5:55 AM, Michael Niedermayer wrote: > Fixes: signed integer overflow: -2147483648 - 1 cannot be represented in type > 'int' > Fixes: > 14880/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5130977304641536 > > Found-by: continuous fuzzing process > https://github.com/

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/hevc_ps: Fix integer overflow with num_tile_rows and num_tile_columns

2019-06-25 Thread James Almer
On 6/25/2019 10:30 AM, James Almer wrote: > On 6/25/2019 5:55 AM, Michael Niedermayer wrote: >> +num_tile_columns_minus1 >= sps->width - 1) { > > Should be sps->ctb_width > > From 7.4.3.3.1: > > "num_tile_columns_minus1 plus 1 specifies the

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/hevc_ps: Change num_tile_rows/columns checks to sps->ctb_height/weight

2019-06-25 Thread James Almer
On 6/25/2019 5:55 AM, Michael Niedermayer wrote: > Suggested-by: James Almer > > Signed-off-by: Michael Niedermayer > --- > libavcodec/hevc_ps.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc

Re: [FFmpeg-devel] [PATCH] avformat/oggparseogm: sync avctx w/ codecpar

2019-06-25 Thread James Almer
On 6/25/2019 1:44 PM, Chris Cunningham wrote: > Friendly ping. > > On Thu, Jun 20, 2019 at 11:17 AM Chris Cunningham > wrote: > >> On Thu, Feb 28, 2019 at 9:13 AM James Almer wrote: >> >>> On 2/26/2019 10:18 PM, Chris Cunningham wrote: >>>>

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/hevc_ps: Fix integer overflow with num_tile_rows and num_tile_columns

2019-06-26 Thread James Almer
On 6/26/2019 9:41 AM, Michael Niedermayer wrote: > On Tue, Jun 25, 2019 at 10:30:45AM -0300, James Almer wrote: >> On 6/25/2019 5:55 AM, Michael Niedermayer wrote: >>> Fixes: signed integer overflow: -2147483648 - 1 cannot be represented in >>> type 'int&#x

Re: [FFmpeg-devel] [PATCH v2 5/9] lavc/qsvdec: Add VP9 decoder support

2019-06-26 Thread James Almer
On 6/26/2019 3:00 AM, Li, Zhong wrote: > > >> -Original Message- >> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf >> Of Li, Zhong >> Sent: Tuesday, April 16, 2019 10:32 AM >> To: FFmpeg development discussions and patches >> >> Subject: Re: [FFmpeg-devel] [PATCH v

Re: [FFmpeg-devel] [PATCH] Avoid integer to float point domain crossing penalties

2019-06-27 Thread James Almer
On 6/27/2019 3:01 AM, Adrian Tong wrote: > Anyone interested in reviewing this patch ? > > Thanks > -Adrian > > On Mon, 24 Jun 2019 at 13:57, wrote: > >> From: Adrian Tong >> >> On internal benchmark, I see a noisy-level difference (more likely to be >> an improvement) in ff_h264_decode_mb_cab

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/cfhd: remove unused function

2019-06-27 Thread James Almer
On 6/27/2019 10:44 AM, Nicolas George wrote: > Kieran Kunhya (12019-06-27): >> I'm happy to do it now that I am aware of the issue. I will do it when I am >> at home in a few days. > > Thanks. I am sure Steven will not mind waiting a few days. > >> This absolutism is absurd. > > Do you have an e

Re: [FFmpeg-devel] [PATCH 1/5] lavu/pixfmt: add Y210/AYUV/Y410 pixel formats

2019-06-27 Thread James Almer
On 6/27/2019 11:26 PM, Linjie Fu wrote: > Previously, media driver provided planar format(like 420 8 bit), but > for HEVC Range Extension (422/444 8/10 bit), the decoded image is > produced in packed format. > > Y210/AYUV/Y410 are packed formats which are needed in HEVC Rext decoding > for both VA

Re: [FFmpeg-devel] [PATCH] libavformat/mux: Fix mixed delarations and code

2019-06-27 Thread James Almer
On 6/27/2019 2:47 PM, Andreas Rheinhardt wrote: > This commit fixes mixed declarations and code introduced in 1889e316. > > Signed-off-by: Andreas Rheinhardt > --- > Sorry for the oversight. > > libavformat/mux.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/lib

Re: [FFmpeg-devel] [PATCH 2/3] lavc/mjpeg_parser: use ff_mjpeg_decode_header to parse frame info

2019-06-28 Thread James Almer
On 6/27/2019 9:59 AM, Zhong Li wrote: > Signed-off-by: Zhong Li > --- > libavcodec/mjpeg_parser.c | 158 > +- > 1 file changed, 157 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/mjpeg_parser.c b/libavcodec/mjpeg_parser.c > index 07a6b2b..f5

[FFmpeg-devel] [PATCH] avcodec/hevc_ps: fix valid range of num_tile_{columns, rows}_minus1

2019-06-30 Thread James Almer
From 7.4.3.3.1: num_tile_columns_minus1 shall be in the range of 0 to PicWidthInCtbsY - 1, inclusive. num_tile_rows_minus1 shall be in the range of 0 to PicHeightInCtbsY - 1, inclusive. Signed-off-by: James Almer --- Sorry for not noticing it when reviewing c692051252 and 3b2082c663

Re: [FFmpeg-devel] [PATCH]lavf/rawenc: Do not allow encoding 0 audio channels

2019-06-30 Thread James Almer
On 6/30/2019 7:01 PM, Carl Eugen Hoyos wrote: > Hi! > > Attached patch fixes ticket #7979 for me, please comment. > > Thank you, Carl Eugen > > > 0001-lavf-rawenc-Do-not-allow-encoding-0-audio-channels.patch > > From 976b294c10be32667852729c3652dbec466ac091 Mon Sep 17 00:00:00 2001 > From: Car

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/hevcdec: Fix memleak of a53_caption

2019-06-30 Thread James Almer
On 6/30/2019 7:16 PM, Michael Niedermayer wrote: > Fixes: > 15295/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5675655187922944 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- >

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/hevcdec: Fix memleak of a53_caption

2019-06-30 Thread James Almer
On 6/30/2019 10:43 PM, James Almer wrote: > On 6/30/2019 7:16 PM, Michael Niedermayer wrote: >> Fixes: >> 15295/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5675655187922944 >> >> Found-by: continuous fuzzing process >> https://github.com/goo

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/hevcdec: Fix memleak of a53_caption

2019-07-01 Thread James Almer
On 7/1/2019 11:24 AM, Michael Niedermayer wrote: > On Sun, Jun 30, 2019 at 11:18:55PM -0300, James Almer wrote: >> On 6/30/2019 10:43 PM, James Almer wrote: >>> On 6/30/2019 7:16 PM, Michael Niedermayer wrote: >>>> Fixes: >>>> 15295/clusterfuzz-testcas

Re: [FFmpeg-devel] [PATCH] avutil: add av_memcpy() to avoid undefined behavior with NULL, NULL, 0

2019-07-02 Thread James Almer
On 7/2/2019 5:56 PM, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer > --- > doc/APIchanges | 3 +++ > libavutil/mem.h | 13 + > libavutil/version.h | 2 +- > 3 files changed, 17 insertions(+), 1 deletion(-) > > diff --git a/doc/APIchanges b/doc/APIchanges

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/mediacodec_wrapper: add missing include

2019-07-04 Thread James Almer
On 7/4/2019 10:43 AM, Matthieu Bouron wrote: > --- > libavcodec/mediacodec_wrapper.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavcodec/mediacodec_wrapper.h b/libavcodec/mediacodec_wrapper.h > index f0de16d669..58e5dc7d39 100644 > --- a/libavcodec/mediacodec_wrapper.h > +++ b/l

Re: [FFmpeg-devel] [PATCH] avcodec/hevc_ps: fix valid range of num_tile_{columns, rows}_minus1

2019-07-04 Thread James Almer
On 6/30/2019 5:45 PM, James Almer wrote: > From 7.4.3.3.1: > > num_tile_columns_minus1 shall be in the range of 0 to PicWidthInCtbsY - 1, > inclusive. > num_tile_rows_minus1 shall be in the range of 0 to PicHeightInCtbsY - 1, > inclusive. > > Signed-off-by: James Alme

Re: [FFmpeg-devel] [PATCH] avcodec/hevc_ps: fix valid range of num_tile_{columns, rows}_minus1

2019-07-05 Thread James Almer
On 7/5/2019 11:13 AM, Michael Niedermayer wrote: > On Sun, Jun 30, 2019 at 05:45:58PM -0300, James Almer wrote: >> From 7.4.3.3.1: >> >> num_tile_columns_minus1 shall be in the range of 0 to PicWidthInCtbsY - 1, >> inclusive. >> num_tile_rows_minus1 shall be in t

Re: [FFmpeg-devel] [PATCH] matroskadec: Fix overflow introduced in a569a7b3

2019-07-06 Thread James Almer
On 7/6/2019 1:59 PM, Andreas Rheinhardt wrote: > This commit fixes an overflow introduced in a569a7b3 that affected EBML > elements that the Matroska demuxer doesn't want to parse like CRC-32 > elements. The return value of avio_skip (the new position on success or > an AVERROR on failure) has been

Re: [FFmpeg-devel] [PATCH 29/31] vp9_metadata: Update AVCodecParameters

2019-07-07 Thread James Almer
On 6/19/2019 8:45 PM, Andreas Rheinhardt wrote: > This commit adds an option to not only update the bitstream parameters > when using the vp9_metadata bitstream filter, but also the relevant > AVCodecParameters. The new option is on by default. > > This commit also adds documentation for this valu

Re: [FFmpeg-devel] [PATCHv4] avcodec: Add librav1e encoder

2019-07-09 Thread James Almer
On 7/9/2019 3:34 PM, Derek Buitenhuis wrote: > Port to the new send/receive API by: James Almer . > > Signed-off-by: Derek Buitenhuis > --- > Lots of stuff happened since v3! > > * The C API / library is now in rav1e's main repo, and officially supported. > * rav1e

[FFmpeg-devel] [PATCH v2] avcodec/cbs_h265: add support for Alpha Channel Info SEI messages

2019-07-09 Thread James Almer
As defined in sections F.14.2.8 and F.14.3.8 Signed-off-by: James Almer --- libavcodec/cbs_h2645.c| 1 + libavcodec/cbs_h265.h | 12 +++ libavcodec/cbs_h265_syntax_template.c | 29 +++ libavcodec/hevc_sei.h | 1

Re: [FFmpeg-devel] [PATCHv4] avcodec: Add librav1e encoder

2019-07-10 Thread James Almer
On 7/10/2019 9:22 AM, Derek Buitenhuis wrote: > On 09/07/2019 22:06, James Almer wrote: >>> @@ -3174,6 +3176,7 @@ libopenmpt_demuxer_deps="libopenmpt" >>> libopus_decoder_deps="libopus" >>> libopus_encoder_deps="libopus" >>>

Re: [FFmpeg-devel] [PATCH 1/3] tools/target_dec_fuzzer: fix memleak of extradata

2019-07-11 Thread James Almer
On 7/11/2019 9:29 AM, Michael Niedermayer wrote: > Fixes: memleak > Fixes: > 15535/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKER_fuzzer-5692162424963072 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/mpc8: Fixes invalid shift in mpc8_decode_frame()

2019-07-11 Thread James Almer
On 7/11/2019 6:49 PM, Michael Niedermayer wrote: > Fixes: left shift of negative value -456 > Fixes: > 15561/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPC8_fuzzer-5758130404720640 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg >

Re: [FFmpeg-devel] [PATCH 4/4] avcodec/dirac_parser: Fix overflow in dts

2019-07-11 Thread James Almer
On 7/11/2019 6:49 PM, Michael Niedermayer wrote: > Fixes: signed integer overflow: -2147483648 - 1 cannot be represented in type > 'int' > Fixes: > 15568/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5634719611355136 > > Found-by: continuous fuzzing process > https://github.com

Re: [FFmpeg-devel] [PATCH] avformat: Don't suggest deprecated function

2019-07-13 Thread James Almer
On 7/13/2019 1:48 PM, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt > --- > libavformat/avformat.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavformat/avformat.h b/libavformat/avformat.h > index 734ae54cac..6eb329f13f 100644 > --- a/libavforma

Re: [FFmpeg-devel] [PATCHv4] avcodec: Add librav1e encoder

2019-07-13 Thread James Almer
On 7/9/2019 3:34 PM, Derek Buitenhuis wrote: > Port to the new send/receive API by: James Almer . > > Signed-off-by: Derek Buitenhuis > --- > Lots of stuff happened since v3! > > * The C API / library is now in rav1e's main repo, and officially supported. > * rav1e

[FFmpeg-devel] [PATCH] avcodec: list the allocation requirements for intra_matrix and inter_matrix fields

2019-07-15 Thread James Almer
Signed-off-by: James Almer --- See https://git.videolan.org/?p=vlc.git;a=commitdiff;h=d86c4c87aa78130a4fd00294e25df865d0e2b327 libavcodec/avcodec.h | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 2528bd89ab

Re: [FFmpeg-devel] [PATCHv4] avcodec: Add librav1e encoder

2019-07-15 Thread James Almer
On 7/15/2019 11:23 AM, Derek Buitenhuis wrote: > On 13/07/2019 19:37, James Almer wrote: >> Just use av_reallocp(). Each call will make the buffer bigger, so you're >> not really making use the no-op benefits from av_fast_realloc(), which >> only trigger if newsize <=

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

2019-07-15 Thread James Almer
On 7/15/2019 6:20 PM, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol > --- > configure | 1 + > libavcodec/Makefile | 1 + > libavcodec/allcodecs.c | 1 + > libavcodec/avcodec.h| 1 + > libavcodec/codec_desc.c | 7 ++ > libavcodec/imm5.c | 234 +++

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

2019-07-16 Thread James Almer
On 7/16/2019 9:19 AM, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol > --- > configure | 1 + > libavcodec/Makefile | 1 + > libavcodec/allcodecs.c | 1 + > libavcodec/avcodec.h| 1 + > libavcodec/codec_desc.c | 7 ++ > libavcodec/imm5.c | 171 +++

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

2019-07-16 Thread James Almer
On 7/16/2019 10:42 AM, Paul B Mahol wrote: > On 7/16/19, James Almer wrote: >> On 7/16/2019 9:19 AM, Paul B Mahol wrote: >>> +ret = avcodec_receive_frame(codec_avctx, frame); >>> +if (ret < 0) >>> +return ret; >> >> avcodec_re

[FFmpeg-devel] [PATCH] avformat/movenc: always write a colr atom

2019-07-16 Thread James Almer
It hasn't been experimental for a long time. Closes ticket #7961 Signed-off-by: James Almer --- libavformat/movenc.c | 9 +- libavformat/movenc.h | 1 - tests/fate/mov.mak| 2 +- tests/fate/vcode

Re: [FFmpeg-devel] [PATCH] avformat/movenc: always write a colr atom

2019-07-16 Thread James Almer
On 7/16/2019 12:41 PM, Dave Rice wrote: > Hi James, > >> On Jul 16, 2019, at 9:47 AM, James Almer wrote: >> >> -{ "write_colr", "Write colr atom (Experimental, may be renamed or >> changed, do not use from scripts)", 0, AV_OPT_TYPE_C

[FFmpeg-devel] [PATCH v2] avformat/movenc: always write a colr atom

2019-07-16 Thread James Almer
It hasn't been experimental for a long time. Closes ticket #7961 Signed-off-by: James Almer --- Decided to deprecate the flag and making it a no-op instead of changing its behavior to be enabled by default. Otherwise doing something like "-movflags faststart" instead of "

Re: [FFmpeg-devel] [PATCH] avcodec: list the allocation requirements for intra_matrix and inter_matrix fields

2019-07-17 Thread James Almer
On 7/15/2019 11:39 AM, James Almer wrote: > Signed-off-by: James Almer > --- > See > https://git.videolan.org/?p=vlc.git;a=commitdiff;h=d86c4c87aa78130a4fd00294e25df865d0e2b327 > > libavcodec/avcodec.h | 12 > 1 file changed, 8 insertions(+), 4 deletions

Re: [FFmpeg-devel] [PATCH] avcodec: list the allocation requirements for intra_matrix and inter_matrix fields

2019-07-17 Thread James Almer
On 7/17/2019 4:47 PM, Paul B Mahol wrote: > LGTM > > On 7/15/19, James Almer wrote: >> Signed-off-by: James Almer >> --- >> See >> https://git.videolan.org/?p=vlc.git;a=commitdiff;h=d86c4c87aa78130a4fd00294e25df865d0e2b327 >> >> libavcodec/avco

[FFmpeg-devel] [PATCH] avcodec/tak_parser: don't return error values

2019-07-17 Thread James Almer
The API does not allow it. Also set poutbuf and poutbuf_size to NULL/0 on error to avoid leaving them uninitialized. Signed-off-by: James Almer --- libavcodec/tak_parser.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/libavcodec/tak_parser.c b/libavcodec

[FFmpeg-devel] [PATCH v2] avcodec/tak_parser: don't return error values

2019-07-18 Thread James Almer
The API does not allow it. Also set poutbuf and poutbuf_size to NULL/0 on error to avoid leaving them uninitialized. Signed-off-by: James Almer --- libavcodec/tak_parser.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/libavcodec/tak_parser.c b

[FFmpeg-devel] [PATCH] avformat/aacdec: resync to the next aac sample on invalid data instead of aborting

2019-07-20 Thread James Almer
Should fix ticket #6634 Signed-off-by: James Almer --- libavformat/aacdec.c | 44 +--- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/libavformat/aacdec.c b/libavformat/aacdec.c index 8a5450880b..5b00b3f664 100644 --- a/libavformat

Re: [FFmpeg-devel] [PATCH v2] avcodec/cbs_h265: add support for Alpha Channel Info SEI messages

2019-07-20 Thread James Almer
On 7/20/2019 10:54 AM, Mark Thompson wrote: > On 09/07/2019 22:27, James Almer wrote: >> As defined in sections F.14.2.8 and F.14.3.8 >> >> Signed-off-by: James Almer >> --- >> libavcodec/cbs_h2645.c| 1 + >> libavcodec/cbs_h265.h

Re: [FFmpeg-devel] [PATCH] avformat/aacdec: resync to the next aac sample on invalid data instead of aborting

2019-07-20 Thread James Almer
On 7/20/2019 12:33 PM, Carl Eugen Hoyos wrote: > > > >> Am 20.07.2019 um 15:13 schrieb James Almer : >> >> Should fix ticket #6634 >> >> Signed-off-by: James Almer >> --- >> libavformat/aacdec.c | 44 +--

Re: [FFmpeg-devel] [PATCH v2] avcodec/tak_parser: don't return error values

2019-07-20 Thread James Almer
On 7/20/2019 1:29 PM, Michael Niedermayer wrote: > On Thu, Jul 18, 2019 at 07:37:57PM -0300, James Almer wrote: >> The API does not allow it. >> >> Also set poutbuf and poutbuf_size to NULL/0 on error to avoid leaving >> them uninitialized. >> >> Signed-off

Re: [FFmpeg-devel] [PATCH] avformat/aacdec: resync to the next aac sample on invalid data instead of aborting

2019-07-20 Thread James Almer
On 7/20/2019 12:41 PM, James Almer wrote: > On 7/20/2019 12:33 PM, Carl Eugen Hoyos wrote: >> >> >> >>> Am 20.07.2019 um 15:13 schrieb James Almer : >>> >>> Should fix ticket #6634 >>> >>>

Re: [FFmpeg-devel] [PATCH] avcodec/rl2: set dimensions

2019-07-24 Thread James Almer
On 7/23/2019 9:39 PM, Kieran Kunhya wrote: >> >> What was the cause of the slow decoding? Does this actually fix it, or >> does it just swipe it "under the carpet"? >> If someone ever found a sample with a different solution, how would they >> know that they shouldn't just remove this again? Withou

Re: [FFmpeg-devel] [PATCH] avcodec/adxenc: add EOF header

2019-07-26 Thread James Almer
On 7/24/2019 6:37 AM, Paul B Mahol wrote: > Hi, > > patch attached. > From dc6473383580af963a120a7de89bdc34c460d000 Mon Sep 17 00:00:00 2001 > From: Paul B Mahol > Date: Wed, 24 Jul 2019 11:11:35 +0200 > Subject: [PATCH] avcodec/adxenc: add EOF header > > Fixes #8031. > > --- > libavcodec/adx

[FFmpeg-devel] [PATCH] avformat/movenc: don't ignore errors when writing codec specific boxes in a VisualSampleEntry

2019-07-27 Thread James Almer
Prevents muxing ultimately broken and spec non-compliant files. Signed-off-by: James Almer --- libavformat/movenc.c | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index a96139077b

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/lcldec: Optimize YUV422 case

2019-07-28 Thread James Almer
On 7/28/2019 8:56 AM, Michael Niedermayer wrote: > On Sun, Jul 28, 2019 at 12:45:36AM +0200, Reimar Döffinger wrote: >> >> >> On 28.07.2019, at 00:31, Michael Niedermayer wrote: >> >>> This merges several byte operations and avoids some shifts inside the loop >>> >>> Improves: Timeout (330sec -> 1

Re: [FFmpeg-devel] [PATCH 3/4] fftools/ffmpeg: support variable dimension encode

2019-07-29 Thread James Almer
On 7/29/2019 11:44 AM, Linjie Fu wrote: > Flush encoders when dimension change happens, reset draining to resume > encode. > > If encoder doesn't support variable dimension, stop encoding and > report errors. > > Signed-off-by: Linjie Fu > --- > fftools/ffmpeg.c| 13 + > libavco

Re: [FFmpeg-devel] [PATCH] Extract QP from h264 encoded videos

2019-07-29 Thread James Almer
On 7/29/2019 11:19 PM, Juan De León wrote: > On Mon, Jul 29, 2019 at 12:48 PM Mark Thompson wrote: > >> This doesn't belong in the commit message. >> >> What does belong here would be some commentary on why you want this >> feature. >> > Here is the, somewhat outdated, design document, this shoul

Re: [FFmpeg-devel] [PATCH v15 1/2] lavc/svt_hevc: add libsvt hevc encoder wrapper

2019-07-30 Thread James Almer
On 7/30/2019 2:59 AM, Limin Wang wrote: >> +if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) { >> +EB_BUFFERHEADERTYPE *header_ptr = NULL; >> + >> +svt_ret = EbH265EncStreamHeader(svt_enc->svt_handle, &header_ptr); >> +if (svt_ret != EB_ErrorNone) { >> +av_log

Re: [FFmpeg-devel] [PATCH, v2 2/4] avc/avcodec: add AV_CODEC_CAP_VARIABLE_DIMENSIONS flag

2019-07-30 Thread James Almer
On 7/30/2019 6:33 AM, Carl Eugen Hoyos wrote: > Am Di., 30. Juli 2019 um 11:25 Uhr schrieb Fu, Linjie : >> >>> -Original Message- >>> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf >>> Of Carl Eugen Hoyos >>> Sent: Tuesday, July 30, 2019 16:06 >>> To: FFmpeg developme

<    3   4   5   6   7   8   9   10   11   12   >