Re: [FFmpeg-devel] [PATCH 2/5] avcodec/vc1: Fix overflow in aspect?ratio calculation

2019-08-15 Thread Michael Niedermayer
On Tue, Aug 13, 2019 at 10:56:03AM +0200, Jean-Baptiste Kempf wrote: > Are those values even acceptable according to spec? Which spec ? SMPTE 421M ? no, i think not wmv3image (which is what the fuzzer tested) iam not sure if we have a spec about it. > Shouldn't 16k*16K be the maximum allowed?

Re: [FFmpeg-devel] [PATCH 5/8] avcodec/flicvideo: Optimize and Simplify FLI_COPY in flic_decode_frame_24BPP() by using bytestream2_get_buffer()

2019-08-15 Thread Tomas Härdin
ons 2019-08-14 klockan 19:42 +0200 skrev Michael Niedermayer: > On Wed, Aug 14, 2019 at 05:21:49PM +0200, Tomas Härdin wrote: > > mån 2019-08-12 klockan 21:17 +0200 skrev Michael Niedermayer: > > > Fixes: Timeout (31sec -> 22sec) > > > > Is this a large test case? 22sec still sounds excessive >

Re: [FFmpeg-devel] [REQUEST] ffmpeg-security subscription

2019-08-15 Thread Vittorio Giovara
On Wed, Aug 14, 2019 at 10:11 PM Reimar Döffinger wrote: > On 14.08.2019, at 11:45, Paul B Mahol wrote: > > I strongly disagree with you. Why some people have subscription to > security > > mailing list and I'm not allowed also? > > Long version, explaining to the best of my knowledge and

[FFmpeg-devel] [PATCH] cinepakenc: When rd_frame() doesn't use MC, mark pkt as keyframe and reset curframe

2019-08-15 Thread Tomas Härdin
Hi Attached patch detects when the cinepak encoder has generated a keyframe on its own, and pushes the generation of forced keyframes into the future. This is similar to what msvideo1enc.c does. Example: $ ./ffmpeg -i fate-suite/zmbv/zmbv_32bit.avi -keyint_min 20 -vcodec cinepak out-before.avi

Re: [FFmpeg-devel] [PATCH 1/8] avcodec/cinepak: Require 1 bit per 4x4 block as minimum input

2019-08-15 Thread Tomas Härdin
ons 2019-08-14 klockan 12:32 +0200 skrev Tomas Härdin: > mån 2019-08-12 klockan 21:17 +0200 skrev Michael Niedermayer: > > Fixes: Timeout (12sec -> 32ms) > > Fixes: 16078/clusterfuzz-testcase-minimized- > > ffmpeg_AV_CODEC_ID_CINEPAK_fuzzer-5695832885559296 > > > > Found-by: continuous fuzzing

Re: [FFmpeg-devel] [PATCH] libavformat/mxfenc: Allow more bitrates for NTSC IMX50

2019-08-15 Thread Thomas Mundt
Am Do., 15. Aug. 2019 um 11:01 Uhr schrieb Tomas Härdin : > ons 2019-08-14 klockan 22:18 +0200 skrev Thomas Mundt: > > Hi Tomas, > > > > Am Mi., 14. Aug. 2019 um 12:42 Uhr schrieb Tomas Härdin < > tjop...@acc.umu.se > > > : > > > tis 2019-08-13 klockan 22:03 +0200 skrev Thomas Mundt: > > > > Hi,

Re: [FFmpeg-devel] [PATCH 1/1] avformat/matroska: fully parse stsd atom in v_quicktime tracks

2019-08-15 Thread Stanislav Ionascu
Hi, On Wed, Aug 14, 2019 at 11:50 PM Michael Niedermayer wrote: > > On Wed, Aug 14, 2019 at 08:44:11PM +0200, Stanislav Ionascu wrote: > > On Tue, Aug 13, 2019 at 10:22 PM Andreas Rheinhardt > > wrote: > > > > > > Stanislav Ionascu: > > > > Per matroska spec, v_quicktime contains the complete

[FFmpeg-devel] [PATCH] lavfi/qsvvpp: disable pass through mode if format changed

2019-08-15 Thread Zhong Li
Fix tiket#8065 Signed-off-by: Zhong Li --- libavfilter/vf_vpp_qsv.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index f18513359a..858587411d 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@

Re: [FFmpeg-devel] [PATCH] libavformat/mxfenc: Allow more bitrates for NTSC IMX50

2019-08-15 Thread Tomas Härdin
ons 2019-08-14 klockan 22:18 +0200 skrev Thomas Mundt: > Hi Tomas, > > Am Mi., 14. Aug. 2019 um 12:42 Uhr schrieb Tomas Härdin > : > > tis 2019-08-13 klockan 22:03 +0200 skrev Thomas Mundt: > > > Hi, > > > > > > attached patch fixes ticket #8077. > > > Please comment. > > > > Probably OK,

[FFmpeg-devel] [PATCH 1/2] opusdsp: adjust and optimize C function to match assembly

2019-08-15 Thread Lynne
The C and asm versions behaved differently _outside_ of the codec. The C version returned pre-multiplied 'state' for the next execution to use right away, while the assembly version outputted non-multiplied 'state' for the next execution to multiply to save instructions. Since the initial state

Re: [FFmpeg-devel] [PATCH 3/6] lavc/qsvdec: Replace current parser with MFXVideoDECODE_DecodeHeader()

2019-08-15 Thread Li, Zhong
> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf > Of Zhong Li > Sent: Tuesday, August 13, 2019 2:11 PM > To: ffmpeg-devel@ffmpeg.org > Cc: Li, Zhong ; Rogozhkin, Dmitry V > > Subject: [FFmpeg-devel] [PATCH 3/6] lavc/qsvdec: Replace current parser > with

[FFmpeg-devel] [PATCH 2/2] checkasm: add opusdsp tests

2019-08-15 Thread Lynne
Patch attached. >From 399dd39c2e99ee3aa3d284019eb8c01abbdedcc0 Mon Sep 17 00:00:00 2001 From: Lynne Date: Thu, 15 Aug 2019 11:42:19 +0100 Subject: [PATCH 2/2] checkasm: add opusdsp tests --- tests/checkasm/Makefile | 1 + tests/checkasm/checkasm.c | 3 ++ tests/checkasm/checkasm.h | 1

Re: [FFmpeg-devel] [PATCH v1] lavf/mov: Fix timestamp rescale on sidx atom

2019-08-15 Thread myp...@gmail.com
On Thu, Aug 15, 2019 at 12:49 PM Jun Li wrote: > > On Thu, Jun 20, 2019 at 2:02 AM Jun Li wrote: > > > > > > > On Tue, May 21, 2019 at 1:05 AM Jun Li wrote: > > > >> > >> > >> On Thu, May 16, 2019 at 1:00 AM Jun Li wrote: > >> > >>> > >>> > >>> On Sun, May 12, 2019 at 7:44 PM Jun Li wrote: >

Re: [FFmpeg-devel] [REQUEST] ffmpeg-security subscription

2019-08-15 Thread Paul B Mahol
On Thu, Aug 15, 2019 at 7:20 PM Reimar Döffinger wrote: > On 15.08.2019, at 13:15, Vittorio Giovara > wrote: > > I think being on the security list may have some professional > implications > > too: if you use ffmpeg in your $dayjob, being notified of security > problem > > in ffmpeg, and

Re: [FFmpeg-devel] [PATCH 2/2] convert_from_tensorflow.py: support conv2d with dilation

2019-08-15 Thread Pedro Arthur
Pushed. Em qua, 14 de ago de 2019 às 03:37, Guo, Yejun escreveu: > > > > > -Original Message- > > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of > > Pedro Arthur > > Sent: Wednesday, August 14, 2019 12:09 AM > > To: FFmpeg development discussions and patches >

Re: [FFmpeg-devel] [PATCH] cinepakenc: When rd_frame() doesn't use MC, mark pkt as keyframe and reset curframe

2019-08-15 Thread James Almer
On 8/15/2019 11:34 AM, Tomas Härdin wrote: > Hi > > Attached patch detects when the cinepak encoder has generated a > keyframe on its own, and pushes the generation of forced keyframes into > the future. This is similar to what msvideo1enc.c does. > > Example: > > $ ./ffmpeg -i

Re: [FFmpeg-devel] [PATCH] cinepakenc: When rd_frame() doesn't use MC, mark pkt as keyframe and reset curframe

2019-08-15 Thread James Almer
On 8/15/2019 2:13 PM, Tomas Härdin wrote: > tor 2019-08-15 klockan 12:54 -0300 skrev James Almer: >> On 8/15/2019 11:34 AM, Tomas Härdin wrote: >>> Hi >>> >>> Attached patch detects when the cinepak encoder has generated a >>> keyframe on its own, and pushes the generation of forced keyframes into

Re: [FFmpeg-devel] [REQUEST] ffmpeg-security subscription

2019-08-15 Thread Reimar Döffinger
On 15.08.2019, at 13:15, Vittorio Giovara wrote: > I think being on the security list may have some professional implications > too: if you use ffmpeg in your $dayjob, being notified of security problem > in ffmpeg, and acting upon it before the fix lands in the tree, may be > crucial. I think

Re: [FFmpeg-devel] [PATCH] libavutil: AVEncodeInfo data structures

2019-08-15 Thread Paul B Mahol
On Thu, Aug 15, 2019 at 7:43 PM Juan De León < juandl-at-google@ffmpeg.org> wrote: > On Wed, Aug 14, 2019 at 12:11 PM Juan De León wrote: > > > AVEncodeInfoFrame data structure to store as AVFrameSideData of type > > AV_FRAME_DATA_ENCODE_INFO. > > The structure stores quantization index for

Re: [FFmpeg-devel] [PATCH] Change libaom default to crf=28.

2019-08-15 Thread Elliott Karpilovsky
On Wed, Aug 14, 2019 at 5:35 PM James Zern wrote: > > Hi, > > On Tue, Aug 13, 2019 at 8:23 PM elliottk > wrote: > > > > Current default is 256kbps, which produces inconsistent > > results (too high for low-res, too low for hi-res). > > Use CRF instead, which will adapt. > > --- > >

Re: [FFmpeg-devel] [PATCH] libavutil: AVEncodeInfo data structures

2019-08-15 Thread Nicolas George
Juan De León (12019-08-14): > In that case, I believe documenting the size of the array and behaviour of > undefined indexes should be enough. Have the pointers return NULL, > and let the user handle the result, instead of stopping the execution. I disagree. Either drop the check altogether or

Re: [FFmpeg-devel] [PATCH 8/8] avcodec/nuv: Avoid duplicating frames

2019-08-15 Thread James Almer
On 8/12/2019 4:17 PM, Michael Niedermayer wrote: > Fixes: Timeout (14sec -> 133ms) > Fixes: > 14843/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NUV_fuzzer-5661969614372864 > Fixes: > 16257/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NUV_fuzzer-5769175464673280 > (35sec ->0.5sec) >

Re: [FFmpeg-devel] [PATCH] cinepakenc: When rd_frame() doesn't use MC, mark pkt as keyframe and reset curframe

2019-08-15 Thread Tomas Härdin
tor 2019-08-15 klockan 12:54 -0300 skrev James Almer: > On 8/15/2019 11:34 AM, Tomas Härdin wrote: > > Hi > > > > Attached patch detects when the cinepak encoder has generated a > > keyframe on its own, and pushes the generation of forced keyframes into > > the future. This is similar to what

Re: [FFmpeg-devel] [PATCH 1/2] avutil: Add Simple loop detector

2019-08-15 Thread Nicolas George
Lynne (12019-08-14): > I can't find a single hint of aggression in my email. I'm being direct and > factual. > If you see this as aggression you shouldn't read any specifications or > reports, you'll find yourself very offended. Was this supposed to be not aggressive either? > I couldn't help

[FFmpeg-devel] [PATCH] Add assembly support for -fsanitize=hwaddress tagged globals.

2019-08-15 Thread Peter Collingbourne
As of LLVM r368102, Clang will set a pointer tag in bits 56-63 of the address of a global when compiling with -fsanitize=hwaddress. This requires an adjustment to assembly code that takes the address of such globals: the code cannot use the regular R_AARCH64_ADR_PREL_PG_HI21 relocation to refer to

Re: [FFmpeg-devel] [PATCH] libavutil: AVEncodeInfo data structures

2019-08-15 Thread Nicolas George
Juan De León (12019-08-15): > Ping. Does anyone have any more feedback? > If not, can anyone review this for pushing. Less than 24 hours feel a bit short to get impatient. Regards, -- Nicolas George ___ ffmpeg-devel mailing list

Re: [FFmpeg-devel] [PATCH] libavutil: AVEncodeInfo data structures

2019-08-15 Thread Juan De León
On Wed, Aug 14, 2019 at 12:11 PM Juan De León wrote: > AVEncodeInfoFrame data structure to store as AVFrameSideData of type > AV_FRAME_DATA_ENCODE_INFO. > The structure stores quantization index for each plane, DC/AC deltas > for luma and chroma planes, and an array of AVEncodeInfoBlock type >

[FFmpeg-devel] [PATCH 4/7] avcodec/vc1_block: Check the return code from vc1_decode_p_block()

2019-08-15 Thread Michael Niedermayer
Fixes: left shift of negative value -1 Fixes: 16424/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3_fuzzer-5656579055026176 Fixes: 16358/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5714436358144000 Found-by: continuous fuzzing process

[FFmpeg-devel] [PATCH 1/7] avcodec/vc1: Check for excessive resolution

2019-08-15 Thread Michael Niedermayer
Fixes: overflow in aspect ratio calculation Fixes: signed integer overflow: 393215 * 14594 cannot be represented in type 'int' Fixes: 15728/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3IMAGE_fuzzer-5661588893204480 Found-by: continuous fuzzing process

[FFmpeg-devel] [PATCH 7/7] avcodec/truemotion2: Fix multiple integer overflows in

2019-08-15 Thread Michael Niedermayer
Fixes: signed integer overflow: 1795032576 + 598344192 cannot be represented in type 'int' Fixes: 16196/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5636723419119616 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg

[FFmpeg-devel] [PATCH 5/7] avcodec/anm: Check input size for a frame with just a stop code

2019-08-15 Thread Michael Niedermayer
Fixes: Timeout (11sec -> 6sec) Fixes: 16344/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ANM_fuzzer-5673032000995328 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/anm.c | 3 +++ 1 file

[FFmpeg-devel] [PATCH 2/7] avcodec/vc1_block: Check for double escapes

2019-08-15 Thread Michael Niedermayer
Fixes: out of array read Fixes: 16331/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3IMAGE_fuzzer-5672735195267072 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/vc1_block.c | 2 +- 1

[FFmpeg-devel] [PATCH 6/7] tools/target_dec_fuzzer: adjust pixel threshold for TRUEMOTION2, as it allows coding gigantic images on tiny input

2019-08-15 Thread Michael Niedermayer
Fixes: Timeout (137sec -> 6sec) Fixes: 16090/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5674245178261504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer ---

[FFmpeg-devel] [PATCH 3/7] avcodec/vc1dec: Require res_sprite for wmv3images

2019-08-15 Thread Michael Niedermayer
non res_sprite leads to decoder delay which leads to assertion failure Fixes: Assertion failure Fixes: 16402/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3IMAGE_fuzzer-5704510034411520 Fixes: left shift of 1073741824 by 1 places cannot be represented in type 'int' Fixes:

Re: [FFmpeg-devel] [PATCH 1/8] avcodec/cinepak: Require 1 bit per 4x4 block as minimum input

2019-08-15 Thread Michael Niedermayer
On Thu, Aug 15, 2019 at 04:43:19PM +0200, Tomas Härdin wrote: > ons 2019-08-14 klockan 12:32 +0200 skrev Tomas Härdin: > > mån 2019-08-12 klockan 21:17 +0200 skrev Michael Niedermayer: > > > Fixes: Timeout (12sec -> 32ms) > > > Fixes: 16078/clusterfuzz-testcase-minimized- > > >

[FFmpeg-devel] [PATCH v2] avformat/http: Fixes #7975. Before reusing the connection the headers are checked to see if the server is closing the connection.

2019-08-15 Thread Ian Klassen
Hi, Sorry Moritz, I somehow missed your feedback. Here's an updated patch with the fixed formatting. I also set up a server that you can test with. Try: ffmpeg -i test.mp4 -hls_flags +append_list -hls_time 6 -method PUT -http_persistent 1 http://45.33.124.115/stream.m3u8 The server has

Re: [FFmpeg-devel] [PATCH] libavutil: AVEncodeInfo data structures

2019-08-15 Thread Nicolas George
Juan De León (12019-08-15): > AVEncodeInfoFrame data structure to store as AVFrameSideData of type > AV_FRAME_DATA_ENCODE_INFO. > The structure stores quantization index for each plane, DC/AC deltas > for luma and chroma planes, and an array of AVEncodeInfoBlock type > denoting position, size, and

[FFmpeg-devel] [PATCH] libavutil: AVEncodeInfo data structures

2019-08-15 Thread Juan De León
AVEncodeInfoFrame data structure to store as AVFrameSideData of type AV_FRAME_DATA_ENCODE_INFO. The structure stores quantization index for each plane, DC/AC deltas for luma and chroma planes, and an array of AVEncodeInfoBlock type denoting position, size, and delta quantizer for each block in the

Re: [FFmpeg-devel] [PATCH] cinepakenc: When rd_frame() doesn't use MC, mark pkt as keyframe and reset curframe

2019-08-15 Thread Tomas Härdin
tor 2019-08-15 klockan 14:20 -0300 skrev James Almer: > On 8/15/2019 2:13 PM, Tomas Härdin wrote: > > tor 2019-08-15 klockan 12:54 -0300 skrev James Almer: > > > On 8/15/2019 11:34 AM, Tomas Härdin wrote: > > > > > > > > Aside: what is -keyint_min for exactly? It seems to be used as a max in > >

Re: [FFmpeg-devel] [PATCH] libavutil: AVEncodeInfo data structures

2019-08-15 Thread James Almer
On 8/15/2019 3:47 PM, Nicolas George wrote: > Alex Sukhanov (12019-08-15): >> Time is important here. Juan's internship is ending soon. Juan has been >> working with Lynne on this design. Since there is back and forth emails in >> this thread, it would be very helpful for Juan if Nicolas and Lynne

Re: [FFmpeg-devel] [PATCH] libavutil: AVEncodeInfo data structures

2019-08-15 Thread Nicolas George
Alex Sukhanov (12019-08-15): > Time is important here. Juan's internship is ending soon. Juan has been > working with Lynne on this design. Since there is back and forth emails in > this thread, it would be very helpful for Juan if Nicolas and Lynne get to > some agreement, rather than have intern

Re: [FFmpeg-devel] [PATCH] libavutil: AVEncodeInfo data structures

2019-08-15 Thread Lynne
Aug 15, 2019, 19:47 by geo...@nsup.org: > Alex Sukhanov (12019-08-15): > >> Time is important here. Juan's internship is ending soon. Juan has been >> working with Lynne on this design. Since there is back and forth emails in >> this thread, it would be very helpful for Juan if Nicolas and Lynne

[FFmpeg-devel] [PATCH] Change libaom default to crf=28.

2019-08-15 Thread elliottk
Current default is 256kbps, which produces inconsistent results (too high for low-res, too low for hi-res). Use CRF instead, which will adapt. --- libavcodec/libaomenc.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c

Re: [FFmpeg-devel] [PATCH] libavutil: AVEncodeInfo data structures

2019-08-15 Thread Alex Sukhanov
On Thu, Aug 15, 2019 at 11:07 AM Nicolas George wrote: > Juan De León (12019-08-15): > > Ping. Does anyone have any more feedback? > > If not, can anyone review this for pushing. > > Less than 24 hours feel a bit short to get impatient. > > Regards, > > -- > Nicolas George >

Re: [FFmpeg-devel] [PATCH 1/2] avutil: Add Simple loop detector

2019-08-15 Thread Lynne
Aug 15, 2019, 19:15 by geo...@nsup.org: > Lynne (12019-08-14): > >> I can't find a single hint of aggression in my email. I'm being direct and >> factual. >> If you see this as aggression you shouldn't read any specifications or >> reports, you'll find yourself very offended. >> > > Was this

Re: [FFmpeg-devel] [REQUEST] ffmpeg-security subscription

2019-08-15 Thread Reimar Döffinger
On 15.08.2019, at 19:38, Paul B Mahol wrote: > On Thu, Aug 15, 2019 at 7:20 PM Reimar Döffinger > wrote: > >> On 15.08.2019, at 13:15, Vittorio Giovara >> wrote: >>> I think being on the security list may have some professional >> implications >>> too: if you use ffmpeg in your $dayjob,

Re: [FFmpeg-devel] [REQUEST] ffmpeg-security subscription

2019-08-15 Thread Reimar Döffinger
On 15.08.2019, at 13:15, Vittorio Giovara wrote: > if you use ffmpeg in your $dayjob, being notified of security problem > in ffmpeg, and acting upon it before the fix lands in the tree, may be > crucial. I realize I only responded to this specific part only in the context of this discussion.

Re: [FFmpeg-devel] [PATCH 2/2] libavfilter/dnn/dnn_backend_tf: add tf.pad support for tensorflow backend with native model.

2019-08-15 Thread Guo, Yejun
> -Original Message- > From: Guo, Yejun > Sent: Wednesday, August 14, 2019 3:06 PM > To: ffmpeg-devel@ffmpeg.org > Cc: Guo, Yejun > Subject: [PATCH 2/2] libavfilter/dnn/dnn_backend_tf: add tf.pad support for > tensorflow backend with native model. > > Signed-off-by: Guo, Yejun > --- >

[FFmpeg-devel] [PATCH V2 1/2] libavfilter/dnn/dnn_backend_tf: fix typo that variable uninitialized.

2019-08-15 Thread Guo, Yejun
if it is initialized randomly, the tensorflow lib will report error message such as: Attempt to add output -7920 of depth_to_space4 not in range [0, 1) to node with type Identity Signed-off-by: Guo, Yejun --- libavfilter/dnn/dnn_backend_tf.c | 1 + 1 file changed, 1 insertion(+) diff --git

[FFmpeg-devel] [PATCH V2 2/2] libavfilter/dnn/dnn_backend_tf: add tf.pad support for tensorflow backend with native model.

2019-08-15 Thread Guo, Yejun
Signed-off-by: Guo, Yejun --- libavfilter/dnn/dnn_backend_tf.c | 48 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index ca7434a..626fba9 100644 ---

[FFmpeg-devel] [PATCH 09/11] avcodec/h264_parser: Remove wrong comment

2019-08-15 Thread Andreas Rheinhardt
From section 7.4.3.3 ("Decoded reference picture marking semantics") of the H.264 specifications: "The content of the decoded reference picture marking syntax structure shall be the same in all slice headers of the primary coded picture. When one or more redundant coded pictures are present, the

[FFmpeg-devel] [PATCH 05/11] avcodec/h264_parser: Reuse the RBSP buffer

2019-08-15 Thread Andreas Rheinhardt
Up until now, the H.264 parser has allocated a new buffer for every frame in order to store the unescaped RBSP in case the part of the RBSP that will be unescaped contains 0x03 escape bytes. This is expensive and this commit changes this: The buffer is now kept and reused. For an AVC file with an

[FFmpeg-devel] [PATCH 11/11] avformat/internal: Remove packet for extract_extradata

2019-08-15 Thread Andreas Rheinhardt
The effective lifetime of the packet does not extend beyond the extract_extradata in libavformat/utils.c, so the packet can simply be put on the stack there. This allows to remove the allocation and the corresponding frees. Signed-off-by: Andreas Rheinhardt --- libavformat/internal.h | 1 -

[FFmpeg-devel] [PATCH 03/11] avformat/matroskadec: Improve frame size parsing error messages

2019-08-15 Thread Andreas Rheinhardt
When parsing the sizes of the frames in a lace fails, sometimes no error message was raised (e.g. when using xiph or fixed-size lacing). Only EBML lacing generated error messages (which were wrongly declared as AV_LOG_INFO), but even here not all errors resulted in an error message. So add a

Re: [FFmpeg-devel] [PATCH 05/11] avcodec/h264_parser: Reuse the RBSP buffer

2019-08-15 Thread Kieran Kunhya
On Fri, 16 Aug 2019 at 04:20, Andreas Rheinhardt < andreas.rheinha...@gmail.com> wrote: > Up until now, the H.264 parser has allocated a new buffer for every > frame in order to store the unescaped RBSP in case the part of the RBSP > that will be unescaped contains 0x03 escape bytes. This is

[FFmpeg-devel] [PATCH 08/11] avcodec/h264_parser: Reindent after previous commits

2019-08-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/h264_parser.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 188ba41c0b..669a9a5ff7 100644 --- a/libavcodec/h264_parser.c +++

[FFmpeg-devel] [PATCH 01/11] avformat/matroskadec: Simplify control flow of parsing laces

2019-08-15 Thread Andreas Rheinhardt
Up until now, when an error happened in one of the inner loops in matroska_parse_laces, a variable designated for the return value has been set to an error value and break has been used to exit the current loop/case. This was done so that the end of matroska_parse_laces is reached, because said

[FFmpeg-devel] [PATCH 10/11] avcodec/h264_parser: Don't keep full DSP Context

2019-08-15 Thread Andreas Rheinhardt
We only need the function to search for start codes from it. Signed-off-by: Andreas Rheinhardt --- libavcodec/h264_parser.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 604cddada5..68eb5939db 100644 ---

[FFmpeg-devel] [PATCH 02/11] avformat/matroskadec: Remove unnecessary check

2019-08-15 Thread Andreas Rheinhardt
870e7552 introduced validating the lace sizes when they are parsed and removed the old check; yet when merging this libav commit in 6902c3ac, the old check for whether the frame extends beyond the frame has been kept. It is unnecessary and has been removed. Signed-off-by: Andreas Rheinhardt ---

Re: [FFmpeg-devel] [PATCH] cinepakenc: When rd_frame() doesn't use MC, mark pkt as keyframe and reset curframe

2019-08-15 Thread James Almer
On 8/15/2019 3:55 PM, Tomas Härdin wrote: > tor 2019-08-15 klockan 14:20 -0300 skrev James Almer: >> On 8/15/2019 2:13 PM, Tomas Härdin wrote: >>> tor 2019-08-15 klockan 12:54 -0300 skrev James Almer: On 8/15/2019 11:34 AM, Tomas Härdin wrote: > Aside: what is -keyint_min for exactly? It

[FFmpeg-devel] [PATCH 07/11] avcodec/h264_parser: Try to avoid (un)referencing

2019-08-15 Thread Andreas Rheinhardt
When a slice is encountered, the H.264 parser up until now always unreferenced and reset the currently active SPS and PPS; immediately afterwards, the currently active parameter sets are set which includes referencing them. Given that it is not uncommon for the active parameter sets to change only

[FFmpeg-devel] [PATCH 06/11] avcodec/h264_parser: Use smaller buffer

2019-08-15 Thread Andreas Rheinhardt
The H.264 parser currently allocates a buffer of the size of the input frame for every input frame to store the unescaped RBSP of a NAL unit (it is actually only used if a 0x03 escape is encountered at all). For performance reasons only a small part of slices is actually unescaped; and given that

[FFmpeg-devel] [PATCH 04/11] avformat/utils: Try to reuse AvBufferRef

2019-08-15 Thread Andreas Rheinhardt
In case the parser flag PARSER_FLAG_COMPLETE_FRAMES is set, it is common that every input packet generates exactly one output packet whose underlying data coincides with the data of the input packet. If in this situation the input packet buffer is reference counted (as it usually is), the current

Re: [FFmpeg-devel] [PATCH 05/11] avcodec/h264_parser: Reuse the RBSP buffer

2019-08-15 Thread Andreas Rheinhardt
Kieran Kunhya: > On Fri, 16 Aug 2019 at 04:20, Andreas Rheinhardt < > andreas.rheinha...@gmail.com> wrote: > >> Up until now, the H.264 parser has allocated a new buffer for every >> frame in order to store the unescaped RBSP in case the part of the RBSP >> that will be unescaped contains 0x03