[FFmpeg-devel] [PATCH 6/6] avformat/utils: use av_packet_make_ref to ensure packets are ref counted

2018-03-24 Thread James Almer
Simplifies code, while also fixing a potential leak of side data in pkt. Signed-off-by: James Almer --- libavformat/utils.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index f13c8208b1..fbf681e490 100644 --- a/libavform

[FFmpeg-devel] [PATCH 4/6] avdevice/decklink_dec: use av_packet_make_ref to ensure packets are ref counted

2018-03-24 Thread James Almer
Partially reverts commit e91f0c4f8b, simplifying code. Signed-off-by: James Almer --- libavdevice/decklink_dec.cpp | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp index 28a748a28f..0ccf87f94f 100644 ---

[FFmpeg-devel] [PATCH 1/6] avcodec/avpacket: add av_packet_make_ref()

2018-03-24 Thread James Almer
It works as a drop in replacement for the deprecated av_dup_packet(), to ensure a packet is reference counted. Signed-off-by: James Almer --- Better name welcome. libavcodec/avcodec.h | 18 +- libavcodec/avpacket.c | 18 ++ 2 files changed, 35 insertions(+), 1 d

[FFmpeg-devel] [PATCH 2/6] avcodec/frame_thread_encoder: remove usage of av_dup_packet()

2018-03-24 Thread James Almer
Signed-off-by: James Almer --- libavcodec/frame_thread_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/frame_thread_encoder.c b/libavcodec/frame_thread_encoder.c index 215aee9fc0..2a56edce79 100644 --- a/libavcodec/frame_thread_encoder.c +++ b/libavcodec/

[FFmpeg-devel] [PATCH 3/6] avcodec/encode: use av_packet_make_ref to ensure packets are ref counted

2018-03-24 Thread James Almer
Simplifies code. Signed-off-by: James Almer --- libavcodec/encode.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/libavcodec/encode.c b/libavcodec/encode.c index 71b1b14afc..9dbdf4f5d9 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -223,12 +223,9 @

[FFmpeg-devel] [PATCH 5/6] avcodec/bsf: use av_packet_make_ref to ensure packets are ref counted

2018-03-24 Thread James Almer
Simplifies code. Signed-off-by: James Almer --- libavcodec/bsf.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c index 05a44e2e31..02550b01d7 100644 --- a/libavcodec/bsf.c +++ b/libavcodec/bsf.c @@ -174,6 +174,8 @@ int av_bs

Re: [FFmpeg-devel] [PATCH] avcodec/avpacket: ensure the packet is writable in av_shrink_packet()

2018-03-24 Thread James Almer
On 3/24/2018 6:46 PM, wm4 wrote: > On Sat, 24 Mar 2018 18:11:53 -0300 > James Almer wrote: > >> Signed-off-by: James Almer >> --- >> This is a good time to deprecate this function and introduce a >> replacement using the correct av_packet namespace and this time >> returning an int. >> What woul

[FFmpeg-devel] [PATCH] avcodec/wmalosslessdec: Fix null pointer dereference in decode_frame()

2018-03-24 Thread Michael Niedermayer
Fixes: 2018_03_23_poc.wav Found-by: GwanYeong Kim Signed-off-by: Michael Niedermayer --- libavcodec/wmalosslessdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index 59e8929586..eb1db615ae 100644 --- a/libavco

Re: [FFmpeg-devel] [PATCH 1/2] hlsenc: use stream's maximum bit rate as fall-back advertised rate

2018-03-24 Thread Jan Ekström
On Sat, Mar 24, 2018 at 7:26 AM, Steven Liu wrote: > > LGTM > > Thanks > Steven Cheers, Pushed with the prefix changed to avformat/hlsenc and made the av_stream_get_side_data call fit into 80 columns. Jan ___ ffmpeg-devel mailing list ffmpeg-devel@ffm

[FFmpeg-devel] [PATCH] avfilter/af_pan: parse properly expressions referencing the same channel multiple times

2018-03-24 Thread Marton Balint
Fixes parsing of expressions like c0=c0+c0. Previously no error was thrown and only the last gain factor was used. Signed-off-by: Marton Balint --- libavfilter/af_pan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c index d8a63a795

Re: [FFmpeg-devel] [PATCH] avcodec/avpacket: ensure the packet is writable in av_shrink_packet()

2018-03-24 Thread wm4
On Sat, 24 Mar 2018 18:11:53 -0300 James Almer wrote: > Signed-off-by: James Almer > --- > This is a good time to deprecate this function and introduce a > replacement using the correct av_packet namespace and this time > returning an int. > What would be better > > int av_packet_shrink(AVPacke

[FFmpeg-devel] [PATCH v3] lavfi: add new iteration API

2018-03-24 Thread Josh de Kock
Signed-off-by: Josh de Kock --- configure| 29 +- doc/APIchanges | 4 + doc/writing_filters.txt | 6 +- libavfilter/allfilters.c | 823 +-- libavfilter/avfilter.c | 50 +-- libavfilter/avfilter.h | 29 +- libavfilte

[FFmpeg-devel] [PATCHv2 1/2] ffmpeg: fallback to codecpar parameters on input filter eof

2018-03-24 Thread Marton Balint
Fixes ticket #6854 and the following simpler case: ffmpeg -f lavfi -i testsrc=d=1 -f lavfi -i testsrc=d=0 -filter_complex overlay -f null none Signed-off-by: Marton Balint --- fftools/ffmpeg.c | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff --git

[FFmpeg-devel] [PATCH] avcodec/avpacket: ensure the packet is writable in av_shrink_packet()

2018-03-24 Thread James Almer
Signed-off-by: James Almer --- This is a good time to deprecate this function and introduce a replacement using the correct av_packet namespace and this time returning an int. What would be better int av_packet_shrink(AVPacket *pkt, int size); Or int av_packet_resize(AVPacket *pkt, int size);

Re: [FFmpeg-devel] [PATCH] avdevice/decklink: fix leak when listing devices and there is no memory

2018-03-24 Thread Marton Balint
On Sat, 17 Mar 2018, Marton Balint wrote: Fixes Coverity CID 1419523. Signed-off-by: Marton Balint --- libavdevice/decklink_common.cpp | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) Applied. Regards, Marton ___ ffmpeg-de

Re: [FFmpeg-devel] swscale/rgb2rgb : add X86_64 SIMD (SSSE3 and AVX2) for shuffly_bytes func

2018-03-24 Thread Martin Vignali
> > the code moving should be in a seperate patch idealy, no big issue here as > this > is not a very complex patch > > otherwise patches should be ok > > also tested on linux x86-32/64, mingw32/64, linux qemu mips > thanks > > > patch split (code move/asm) and pushed Thanks for review and testin

Re: [FFmpeg-devel] avcodec/prores_ks : do not call estimate_alpha at each quantification step

2018-03-24 Thread Paul B Mahol
On 3/20/18, Martin Vignali wrote: > Hello, > > patch in attach move estimate_alpha outside the quantification loop > no need to call it at each quantification step > > also remove "error" arg in estimate_alpha. > > > Martin > probably ok, check that this does not break alpha encoding. ___

Re: [FFmpeg-devel] [PATCH v2 2/5] lavfi: add new iteration API

2018-03-24 Thread Michael Niedermayer
On Sat, Mar 24, 2018 at 01:28:51AM +, Josh de Kock wrote: > Signed-off-by: Josh de Kock > --- > configure| 24 +- > doc/APIchanges | 4 + > doc/writing_filters.txt | 6 +- > libavfilter/allfilters.c | 820 > +-- > li

Re: [FFmpeg-devel] [PATCH] movtextdec: fix handling of UTF-8 subtitles

2018-03-24 Thread wm4
On Sat, 24 Mar 2018 17:50:53 +0100 Carl Eugen Hoyos wrote: > 2018-03-24 17:42 GMT+01:00, wm4 : > > On Sat, 24 Mar 2018 17:05:41 +0100 > > Carl Eugen Hoyos wrote: > > > >> 2018-03-24 15:48 GMT+01:00, wm4 : > >> > Subtitles which contained styled UTF-8 subtitles (i.e. not just 7 bit > >> > ASC

Re: [FFmpeg-devel] [PATCH] movtextdec: fix handling of UTF-8 subtitles

2018-03-24 Thread Carl Eugen Hoyos
2018-03-24 17:42 GMT+01:00, wm4 : > On Sat, 24 Mar 2018 17:05:41 +0100 > Carl Eugen Hoyos wrote: > >> 2018-03-24 15:48 GMT+01:00, wm4 : >> > Subtitles which contained styled UTF-8 subtitles (i.e. not just 7 bit >> > ASCII characters) were not handled correctly. The spec mandates that >> > styling

Re: [FFmpeg-devel] [PATCH] movtextdec: fix handling of UTF-8 subtitles

2018-03-24 Thread wm4
On Sat, 24 Mar 2018 17:05:41 +0100 Carl Eugen Hoyos wrote: > 2018-03-24 15:48 GMT+01:00, wm4 : > > Subtitles which contained styled UTF-8 subtitles (i.e. not just 7 bit > > ASCII characters) were not handled correctly. The spec mandates that > > styling start/end ranges are in "characters". It's

Re: [FFmpeg-devel] [PATCH] movtextdec: fix handling of UTF-8 subtitles

2018-03-24 Thread Jan Ekström
On Sat, Mar 24, 2018 at 6:05 PM, Carl Eugen Hoyos wrote: > Could you confirm that this is also what QT does? > > Or is it impossible that the patch breaks something? > Everything can in theory break something. Anyways, it was widely understood that 3GPP timed text was a better defined MOV timed t

Re: [FFmpeg-devel] [PATCH] movtextdec: fix handling of UTF-8 subtitles

2018-03-24 Thread Hendrik Leppkes
On Sat, Mar 24, 2018 at 3:48 PM, wm4 wrote: > Subtitles which contained styled UTF-8 subtitles (i.e. not just 7 bit > ASCII characters) were not handled correctly. The spec mandates that > styling start/end ranges are in "characters". It's not quite clear what > a "character" is supposed to be, bu

Re: [FFmpeg-devel] [PATCH] movtextdec: fix handling of UTF-8 subtitles

2018-03-24 Thread Carl Eugen Hoyos
2018-03-24 15:48 GMT+01:00, wm4 : > Subtitles which contained styled UTF-8 subtitles (i.e. not just 7 bit > ASCII characters) were not handled correctly. The spec mandates that > styling start/end ranges are in "characters". It's not quite clear what > a "character" is supposed to be, but maybe the

[FFmpeg-devel] [PATCH 0/1] libavfilter: Add OpenCL convolution filter v0.2

2018-03-24 Thread Danil Iashchenko
Behaves like existing convolution filter. Patch uses global kernel. --- configure | 1 + libavfilter/Makefile| 1 + libavfilter/allfilters.c| 1 + libavfilter/opencl/convolution.cl | 42 libavfilter/opencl_source.h | 1

Re: [FFmpeg-devel] Reimbursement request

2018-03-24 Thread Stefano Sabatini
On date Saturday 2018-03-24 13:51:38 +0100, Michael Niedermayer encoded: > On Sun, Mar 18, 2018 at 08:57:42PM +0100, Thilo Borgmann wrote: > > Hi, > > > > > As already discussed, FFmpeg was present on Chemnitzer Linux Tage, in > > > addition, Thilo and I went to Brussels for FOSDEM where we attend

Re: [FFmpeg-devel] [PATCH] movtextdec: fix handling of UTF-8 subtitles

2018-03-24 Thread Philip Langdale
On Sat, 24 Mar 2018 15:48:36 +0100 wm4 wrote: > Subtitles which contained styled UTF-8 subtitles (i.e. not just 7 bit > ASCII characters) were not handled correctly. The spec mandates that > styling start/end ranges are in "characters". It's not quite clear > what a "character" is supposed to be,

Re: [FFmpeg-devel] [PATCH] movtextdec: fix handling of UTF-8 subtitles

2018-03-24 Thread Jan Ekström
On Sat, Mar 24, 2018 at 4:48 PM, wm4 wrote: > Subtitles which contained styled UTF-8 subtitles (i.e. not just 7 bit > ASCII characters) were not handled correctly. The spec mandates that > styling start/end ranges are in "characters". It's not quite clear what > a "character" is supposed to be, bu

[FFmpeg-devel] [PATCH] movtextdec: fix handling of UTF-8 subtitles

2018-03-24 Thread wm4
Subtitles which contained styled UTF-8 subtitles (i.e. not just 7 bit ASCII characters) were not handled correctly. The spec mandates that styling start/end ranges are in "characters". It's not quite clear what a "character" is supposed to be, but maybe they mean unicode codepoints. FFmpeg's decod

Re: [FFmpeg-devel] [PATCH] lavc/amfenc: Reference to input AVFrame (hwaccel) is retained during the encoding process

2018-03-24 Thread Mark Thompson
On 23/03/18 11:19, Kravchenko, Alexander wrote: > Re: [FFmpeg-devel] [PATCH] lavc/amfenc: Reference to input AVFrame (hwaccel) > is retained during the encoding process Say what the change is in the title. Something like "amfenc: Retain a reference to D3D11 frames used as input during the encod

Re: [FFmpeg-devel] [PATCH] Revert "avcodec/vp9_superframe_bsf: cache packets by creating new references rather than moving them"

2018-03-24 Thread James Almer
On 3/24/2018 9:19 AM, wm4 wrote: > On Fri, 23 Mar 2018 22:26:08 -0300 > James Almer wrote: > >> This reverts commit 7a02b364b68c0bf7f065f5c217fae458f0efdb8d. >> >> The packet fetched by ff_bsf_get_packet() and ff_bsf_get_packet_ref() >> is now guaranteed to be reference counted. >> --- >> libavc

[FFmpeg-devel] [PATCH] vf_avgblur_opencl: Don't run kernel on pixels outside the image

2018-03-24 Thread Mark Thompson
The output frame size is larger than the image containing a subsampled plane - use the actual size of the image being written rather than the dimensions of the intended output frame. --- libavfilter/vf_avgblur_opencl.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git

[FFmpeg-devel] Fwd: New Defects reported by Coverity Scan for FFmpeg/FFmpeg

2018-03-24 Thread Mark Thompson
Hi Dylan, See below for a report from the Coverity static analysis tool - the variable err isn't initialised in all paths leading to the fail-and-return. Would you like to fix this? Also, following is a patch to your filter for you to review (try it, decide whether it's correct, make any app

[FFmpeg-devel] [PATCH] avfilter: add declick audio filter

2018-03-24 Thread Paul B Mahol
Signed-off-by: Paul B Mahol --- doc/filters.texi | 35 +++ libavfilter/Makefile | 1 + libavfilter/af_declick.c | 586 +++ libavfilter/allfilters.c | 1 + 4 files changed, 623 insertions(+) create mode 100644 libavfilter/af_declick.c

Re: [FFmpeg-devel] [PATCH 2/2] hlsenc: set target duration always exact or longer than max segment duration

2018-03-24 Thread Jan Ekström
On Sat, Mar 24, 2018 at 7:35 AM, Steven Liu wrote: > This is not correct, at the specification author said, the duration > should set to 5, not 6, reference link > :https://trac.ffmpeg.org/ticket/6915 > > Thanks > > Steven Right, somehow I missed that "when rounded to the nearest integer" part wh

Re: [FFmpeg-devel] Reimbursement request

2018-03-24 Thread Michael Niedermayer
On Sun, Mar 18, 2018 at 08:57:42PM +0100, Thilo Borgmann wrote: > Hi, > > > As already discussed, FFmpeg was present on Chemnitzer Linux Tage, in > > addition, Thilo and I went to Brussels for FOSDEM where we attended > > the talks in the multimedia room kindly (co-) organized by Kieran and > > an

[FFmpeg-devel] [PATCH] avcodec: add a subcharenc mode that disables UTF-8 check

2018-03-24 Thread wm4
This is for applications which want to explicitly check for invalid UTF-8 manually, and take actions that are better than dropping invalid subtitles silently. (It's pretty much silent because sporadic avcodec error messages are so common that you can't reasonably display them in a prominent and mea

Re: [FFmpeg-devel] [PATCH] Revert "avcodec/vp9_superframe_bsf: cache packets by creating new references rather than moving them"

2018-03-24 Thread wm4
On Fri, 23 Mar 2018 22:26:08 -0300 James Almer wrote: > This reverts commit 7a02b364b68c0bf7f065f5c217fae458f0efdb8d. > > The packet fetched by ff_bsf_get_packet() and ff_bsf_get_packet_ref() > is now guaranteed to be reference counted. > --- > libavcodec/vp9_superframe_bsf.c | 4 +--- > 1 file

Re: [FFmpeg-devel] Type mismatch in ADPCM

2018-03-24 Thread Michael Niedermayer
On Sat, Mar 24, 2018 at 11:10:41AM +0100, Carlo Bramini wrote: > Hello, > > > > > > However, what about the patch attached for fixing the declaration > > > > > of ff_adpcm_afc_coeffs[2][16]? > > > > > > > > This would revert 10542491, a relatively recent change: Maybe Paul, > > > > the author, wa

Re: [FFmpeg-devel] Moving enum AVFieldOrder to libavutil?

2018-03-24 Thread Michael Niedermayer
On Sat, Mar 24, 2018 at 01:07:48AM +0100, Marton Balint wrote: > > > On Fri, 23 Mar 2018, Devin Heitmueller wrote: > > >Hello, > > > >I am in the process of reworking libavfilter to pass along the field order > >across links. For the moment I followed the model found in AVFrame where > >there a

Re: [FFmpeg-devel] Type mismatch in ADPCM

2018-03-24 Thread Carlo Bramini
Hello, > > > > However, what about the patch attached for fixing the declaration > > > > of ff_adpcm_afc_coeffs[2][16]? > > > > > > This would revert 10542491, a relatively recent change: Maybe Paul, > > > the author, wants to comment. > > > > > > Do you think the code gets more readable? > > >