[FFmpeg-devel] [PATCH] tests/fate/hlsenc: rename fate macro define from FATE_AFILTER to FATE_HLSENC

2020-04-14 Thread Steven Liu
and add fate-hlsenc for test all of the testcase Signed-off-by: Steven Liu --- tests/fate/hlsenc.mak | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/fate/hlsenc.mak b/tests/fate/hlsenc.mak index ff58094252..43f93c8c5b 100644 --- a/tests/fate/hlsenc.ma

[FFmpeg-devel] Extending ffmpeg hwaccel list

2020-04-14 Thread Mark Clayton
Hello, I have an Nvidia Jetson Nano, which while having CUDA does not feature an nvenc capable encoder. Instead, a high level API using L4T ( https://docs.nvidia.com/jetson/l4t-multimedia/classNvVideoConverter.html) is supported. It’s been a while and it seems that this device is not popular eno

Re: [FFmpeg-devel] [PATCH] avformat/matroskaenc: remove MAX_TRACKS limit

2020-04-14 Thread Andreas Rheinhardt
Jan Chren (rindeal): > On Sat Apr 4 09:29:20 EEST 2020, Andreas Rheinhardt > wrote: >> Are you running into this limitation? > > Yes. > >> If so, do the files that you >> create with this patch that have more than 127 tracks work? They >> shouldn't. The reason for this (and the reason that I did

Re: [FFmpeg-devel] [PATCH v2] ffmpeg: allow full range of dts_delta_threshold

2020-04-14 Thread Gyan Doshi
On 15-04-2020 01:33 am, Michael Niedermayer wrote: On Tue, Apr 14, 2020 at 02:48:47PM +0530, Gyan Doshi wrote: For inputs from demuxers with AVFMT_TS_DISCONT flag, the existing condition, delta < -1LL*dts_delta_threshold*AV_TIME_BASE is rendered superflous due to the fixed threshold in p

Re: [FFmpeg-devel] [PATCH v3 5/9] lavc/libopenh264enc: set slice_mode option to deprecated

2020-04-14 Thread Fu, Linjie
> From: ffmpeg-devel On Behalf Of > Anton Khirnov > Sent: Tuesday, April 14, 2020 19:11 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v3 5/9] lavc/libopenh264enc: set > slice_mode option to deprecated > > Quoting Linjie Fu (2020-04-11 12:

[FFmpeg-devel] [PATCH v4 7/9] lavc/libopenh264enc: add profile high option support

2020-04-14 Thread Linjie Fu
Add support for PRO_HIGH/PRO_BASELINE in SVC Encoding extention mode, which determined by iEntropyCodingModeFlag in ParamTranscode(). Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 32 +++

[FFmpeg-devel] [PATCH v4 4/9] lavc/libopenh264enc: prompt slice number changing inside libopenh264

2020-04-14 Thread Linjie Fu
Libopenh264enc would set the slice according to the number of cpu cores if uiSliceNum equals to 0 (auto) in SM_FIXEDSLCNUM_SLICE mode. Prompt a warning for user to catch this. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcod

[FFmpeg-devel] [PATCH v4 3/9] lavc/libopenh264enc: add bit rate control select support

2020-04-14 Thread Linjie Fu
RC_BITRATE_MODE: set BITS_EXCEEDED to iCurrentBitsLevel and allows QP adjust in RcCalculatePictureQp(). RC_BUFFERBASED_MODE: use buffer status to adjust the video quality. RC_TIMESTAMP_MODE: bit rate control based on timestamp. Default to use RC_QUALITY_MODE. Signed-off-by: Linj

[FFmpeg-devel] [PATCH v4 6/9] lavc/libopenh264enc: separate svc_encode_init() into several functions

2020-04-14 Thread Linjie Fu
Separate the initialization procedure into different functions. Make it more readable and easier to be extended. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 283 +++- 1 file changed, 174 insertions(+), 109 deletions(-) diff --git a/libavco

[FFmpeg-devel] [PATCH v4 8/9] lavc/libopenh264enc: allow specifying the profile through AVCodecContext

2020-04-14 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 16 1 file changed, 16 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 0fe8cf4..4d337d2 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -113,6 +113

[FFmpeg-devel] [PATCH v4 5/9] lavc/libopenh264enc: set slice_mode option to deprecated

2020-04-14 Thread Linjie Fu
"slice mode" option seems to be unnecessary since it could be determined by -slices/max_nal_size. default:SM_FIXEDSLCNUM_SLICE mode with cpu-number slices. -slices N: SM_FIXEDSLCNUM_SLICE mode with N slices. -max_nal_size: SM_SIZELIMITED_SLICE mode with limited size slices. Add FF_A

[FFmpeg-devel] [PATCH v4 9/9] lavc/libopenh264enc: Add coder option to replace cabac

2020-04-14 Thread Linjie Fu
Set DEPRECATED flag to option cabac, replace with coder. Change the default option to -1 and allow the default cabac to be determined by profile. Add FF_API_OPENH264_CABAC macro for cabac to remove this option after LIBAVCODEC_VERSION_MAJOR = 59. Signed-off-by: Linjie Fu --- libavcodec/libopen

[FFmpeg-devel] [PATCH v4 1/9] lavc/libopenh264enc: Add default qmin/qmax support

2020-04-14 Thread Linjie Fu
Set default QP range to (1, 51) instead of (2, 32). QP = 0 is not well supported currently in libopenh264. If iMaxQp/iMinQp equals 0, the QP range would be changed unexpectedly inside libopenh264 with a warning: Warning:Change QP Range from(0,51) to (12,42) [1]

[FFmpeg-devel] [PATCH v4 2/9] lavc/libopenh264enc: add default gop size and bit rate

2020-04-14 Thread Linjie Fu
It would be 200kbps bitrate with gop size = 12 by default which generated too many IDR frames in rather low bit rate. The quality would be poor. Set these default values according to vaapi encoder, and use 2Mbps bitrate if user doesn't set it explicitly as nvenc sugguested. Signed-off-by: Linjie

[FFmpeg-devel] [PATCH v4 0/9] Enhancement for libopenh264 encoder

2020-04-14 Thread Linjie Fu
Docs would be provided later. Linjie Fu (9): lavc/libopenh264enc: Add default qmin/qmax support lavc/libopenh264enc: add default gop size and bit rate lavc/libopenh264enc: add bit rate control select support lavc/libopenh264enc: prompt slice number changing inside libopenh264 lavc/libope

Re: [FFmpeg-devel] [PATCH v3] avformat/hlsenc: add hls_fmp4_init_resend option

2020-04-14 Thread Steven Liu
> 2020年4月12日 下午9:38,Steven Liu 写道: > > > >> 2020年4月7日 下午5:31,Steven Liu 写道: >> >> add option for resend init file after m3u8 refresh everytime. >> >> Signed-off-by: Steven Liu >> --- >> doc/muxers.texi | 3 +++ >> libavformat/hlsenc.c | 41 - >>

Re: [FFmpeg-devel] [PATCH v2] avformat/dashdec: add attribute lang for audio and subtitle streams

2020-04-14 Thread Steven Liu
> 2020年4月11日 上午9:55,Steven Liu 写道: > > > >> 2020年4月8日 下午10:39,Steven Liu 写道: >> >> >> >>> 2020年3月31日 下午8:20,Steven Liu 写道: >>> >>> There should have language in the metadata of streams which show to user >>> >>> Signed-off-by: Steven Liu >>> --- >>> libavformat/dashdec.c | 49

Re: [FFmpeg-devel] [PATCH v4] avcodec/v4l2_m2m: handle the v4l2 eos event

2020-04-14 Thread Andriy Gelman
On Wed, 08. Apr 20:51, Andriy Gelman wrote: > On Wed, 01. Apr 10:38, Ming Qian wrote: > > when the last frame of capture is dequeueed, > > driver may send this V4L2_EVENT_EOS event, > > If this event is received, then the capture buffers have been flushed and > > avcodec_receive_packet()/avcodec_re

Re: [FFmpeg-devel] [PATCH, v2 1/2] lavc/qsvdec: add decode support for HEVC 4:2:2 8-bit and 10-bit

2020-04-14 Thread Fu, Linjie
> From: Zhong Li > Sent: Wednesday, April 15, 2020 09:58 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Cc: Fu, Linjie > Subject: Re: [FFmpeg-devel] [PATCH, v2 1/2] lavc/qsvdec: add decode > support for HEVC 4:2:2 8-bit and 10-bit > > Linjie Fu 于2020年2月26日周三 下午4:43写道: > >

[FFmpeg-devel] [PATCH v1 1/2] avcodec/nvenc_h264: add spatial_aq and temporal_aq option to consistent with nvenc_hevc

2020-04-14 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavcodec/nvenc_h264.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/nvenc_h264.c b/libavcodec/nvenc_h264.c index 479155fe15..a2e77e67d0 100644 --- a/libavcodec/nvenc_h264.c +++ b/libavcodec/nvenc_h264.c @@ -99,7 +99,9 @@ static

[FFmpeg-devel] [PATCH v1 2/2] avcodec/nvenc_hevc: add spatial-aq and temporal-aq option to consistent with nvenc_h264

2020-04-14 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavcodec/nvenc_hevc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c index 7c9b3848f1..d06cb0d6b0 100644 --- a/libavcodec/nvenc_hevc.c +++ b/libavcodec/nvenc_hevc.c @@ -96,7 +96,9 @@ static

Re: [FFmpeg-devel] [PATCH, v2 1/2] lavc/qsvdec: add decode support for HEVC 4:2:2 8-bit and 10-bit

2020-04-14 Thread Zhong Li
Linjie Fu 于2020年2月26日周三 下午4:43写道: > > Enables HEVC Range Extension decoding support (Linux) for 4:2:2 8/10 bit > on ICL+ (gen11 +) platform. > > Signed-off-by: Linjie Fu > --- > [v2]: restrict to support on Linux. > > libavcodec/qsv.c | 16 > libavutil/hwcontext_qsv.c |

Re: [FFmpeg-devel] [PATCH v4 2/2] libavcodec/libaomenc.c: Support lossless encoding

2020-04-14 Thread James Zern
On Tue, Apr 7, 2020 at 5:14 PM Ryo Hirafuji wrote: > > From: Ryo Hirafuji > > AV1 support lossless encoding. > In this patch, I added a command line flag to enable it. > > Fixes ticket #7600 > --- > libavcodec/libaomenc.c | 14 +++--- > 1 file changed, 11 insertions(+), 3 deletions(-) >

Re: [FFmpeg-devel] [PATCH v4 1/2] libavcodec/libaomenc.c: Support gray input

2020-04-14 Thread James Zern
On Tue, Apr 14, 2020 at 3:57 AM Ryo Hirafuji wrote: > > Thanks for the review! > > This should bump the micro version number in libavcodec/version.h. > > > OK, I will bump up the version when the problem below is solved. > If we want to go for compatibility with different versions of the library

Re: [FFmpeg-devel] [PATCH 7/7] get_bits: use immediate in skip_remaining

2020-04-14 Thread Michael Niedermayer
On Tue, Apr 14, 2020 at 10:25:03AM +, Christophe Gisquet wrote: > When the entry informs to continue reading, this means the current read > will be entirely skipped. Small object size reduction, depending on > inlining. > --- > libavcodec/get_bits.h | 4 ++-- > 1 file changed, 2 insertions(+),

Re: [FFmpeg-devel] [PATCH 2/7] get_bits: support 32bits cache

2020-04-14 Thread Carl Eugen Hoyos
Am Di., 14. Apr. 2020 um 12:25 Uhr schrieb Christophe Gisquet : > > Therefore, also activate it under ARCH_X86 (testing for more archs welcome) > for the only codecs supporting said cache reader. > For UTVideo, on 8 bits samples and ARCH_X86_32 (X86_64 being unaffected), > timings for one line do ~

Re: [FFmpeg-devel] [PATCH] avformat/movenc: remove call to av_copy_packet_side_data() when concatenatic eac3 syncframes

2020-04-14 Thread Andreas Rheinhardt
James Almer: > This generates a potential memory leak if info->pkt already contains side data > elements, and may mix side data from the last packet with other properties > from > the first. Now that you mention it: Yes, there is a potential memleak.* So remove this. > > Keep all the properties

[FFmpeg-devel] [PATCH] avformat/movenc: remove call to av_copy_packet_side_data() when concatenatic eac3 syncframes

2020-04-14 Thread James Almer
This generates a potential memory leak if info->pkt already contains side data elements, and may mix side data from the last packet with other properties from the first. Keep all the properties from the first packet only in the output packet instead. Signed-off-by: James Almer --- The alternativ

Re: [FFmpeg-devel] [PATCH 5/7] get_bits: improve and fix get_bits_long for 32b

2020-04-14 Thread Michael Niedermayer
On Tue, Apr 14, 2020 at 10:25:01AM +, Christophe Gisquet wrote: > The new code is guaranteed to read at least 32bits, which is likely ok with > the usual case that get_bits without cache can read up to 25. > --- > libavcodec/get_bits.h | 29 ++--- > 1 file changed, 26 i

Re: [FFmpeg-devel] [PATCH] configure: fix clang on macOS 10.15

2020-04-14 Thread Carl Eugen Hoyos
Am Di., 14. Apr. 2020 um 20:49 Uhr schrieb Jan Ekström : > > On Tue, Apr 14, 2020 at 8:45 PM Josh de Kock wrote: > > > > Works around a bug in the newer Xcode 11's clang with -fstack-check > > emitting bad code with misaligned call instructions. > > --- > > configure | 5 + > > 1 file changed

Re: [FFmpeg-devel] [PATCH v2] ffmpeg: allow full range of dts_delta_threshold

2020-04-14 Thread Michael Niedermayer
On Tue, Apr 14, 2020 at 02:48:47PM +0530, Gyan Doshi wrote: > For inputs from demuxers with AVFMT_TS_DISCONT flag, > the existing condition, > > delta < -1LL*dts_delta_threshold*AV_TIME_BASE > > is rendered superflous due to the fixed threshold in > > pkt_dts + AV_TIME_BASE/10 < FFMAX(ist->pts

[FFmpeg-devel] [PATCH] [GSOC] libavfilter/vf_colorconstancy.c : Adding weighted greyedge

2020-04-14 Thread YATENDRA SINGH
Signed-off-by: Yatendra Singh --- libavfilter/Makefile| 1 + libavfilter/allfilters.c| 1 + libavfilter/vf_colorconstancy.c | 265 +++- 3 files changed, 232 insertions(+), 35 deletions(-) diff --git a/libavfilter/Makefile b/libavfilter/Makefile

Re: [FFmpeg-devel] [PATCH] configure: fix clang on macOS 10.15

2020-04-14 Thread Jan Ekström
On Tue, Apr 14, 2020 at 8:45 PM Josh de Kock wrote: > > Works around a bug in the newer Xcode 11's clang with -fstack-check > emitting bad code with misaligned call instructions. > --- > configure | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/configure b/configure > index 4d4c429b

Re: [FFmpeg-devel] [PATCH 02/10] configure, libavformat/Makefile: Fix webm_chunk dependencies

2020-04-14 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Andreas Rheinhardt: >> The webm_chunk muxer requires the WebM muxer, yet it does not directly >> require anything from libavformat/matroska.c (it does not even include >> the corresponding header). So remove the dependency from the Makefile >> and add a _select to configure. >

[FFmpeg-devel] [PATCH] configure: fix clang on macOS 10.15

2020-04-14 Thread Josh de Kock
Works around a bug in the newer Xcode 11's clang with -fstack-check emitting bad code with misaligned call instructions. --- configure | 5 + 1 file changed, 5 insertions(+) diff --git a/configure b/configure index 4d4c429be9..c872a2932d 100755 --- a/configure +++ b/configure @@ -5358,6 +5358

Re: [FFmpeg-devel] [FFmpeg-cvslog] avfilter/af_amix: use av_strtod() for weights

2020-04-14 Thread Nicolas George
Martin Storsjö (12020-04-14): > This broke fate - on the last iteration, weight_sum is accumulated but we > break before incrementing i, thus one weight is counted twice. It should not have been pushed without review in the first place. But the fact it was pushed without running FATE makes it inex

Re: [FFmpeg-devel] [FFmpeg-cvslog] avfilter/af_amix: use av_strtod() for weights

2020-04-14 Thread Martin Storsjö
On Tue, 14 Apr 2020, Paul B Mahol wrote: ffmpeg | branch: master | Paul B Mahol | Tue Apr 14 12:38:47 2020 +0200| [10a68ccd58318c00c7872081a0518acec7ebe6c3] | committer: Paul B Mahol avfilter/af_amix: use av_strtod() for weights http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=10a6

Re: [FFmpeg-devel] [PATCH, v2 1/2] lavc/qsvdec: add decode support for HEVC 4:2:2 8-bit and 10-bit

2020-04-14 Thread Fu, Linjie
> From: Fu, Linjie > Sent: Wednesday, February 26, 2020 16:39 > To: ffmpeg-devel@ffmpeg.org > Cc: Fu, Linjie > Subject: [PATCH,v2 1/2] lavc/qsvdec: add decode support for HEVC 4:2:2 8-bit > and 10-bit > > Enables HEVC Range Extension decoding support (Linux) for 4:2:2 8/10 bit > on ICL+ (gen11 +

Re: [FFmpeg-devel] [FFmpeg-devel, v2] dvbsub.c, change segment order to be in line with spec

2020-04-14 Thread John Stebbins
On Tue, 2020-04-14 at 10:29 +0200, Paul B Mahol wrote: > On 4/14/20, Alen Vrečko wrote: > > Hello, everyone. > > > > Looks like this patch got forgotten. I'd very much like to see it > > applied. > > > > In our testing. This patch doesn't break any existing players. But > > it does > > allow for

Re: [FFmpeg-devel] [PATCH v2 2/3] avdevice/opengl: add support of wrapped avframe codec

2020-04-14 Thread Nicolas George
Marton Balint (12020-04-11): > Also change the default to that. > > Signed-off-by: Marton Balint > --- > libavdevice/opengl_enc.c | 17 - > 1 file changed, 12 insertions(+), 5 deletions(-) No objection. Thanks. Regards, -- Nicolas George signature.asc Description: PGP sig

Re: [FFmpeg-devel] [PATCH v2 1/3] avdevice/xv: add support of wrapped avframe codec

2020-04-14 Thread Nicolas George
Marton Balint (12020-04-11): > Also change the default to that. > > Signed-off-by: Marton Balint > --- > libavdevice/xv.c | 22 ++ > 1 file changed, 14 insertions(+), 8 deletions(-) No objection. Thanks. Regards, -- Nicolas George signature.asc Description: PGP signat

Re: [FFmpeg-devel] [PATCH v3] avformat/mux: Make uncoded frames av_packet_unref() compatible

2020-04-14 Thread Nicolas George
Andreas Rheinhardt (12020-04-12): > Currently uncoded frames (i.e. packets whose data actually points to an > AVFrame) are not refcounted. As a consequence, calling av_packet_unref() > on them will not free them, but may simply make sure that they leak by > losing the pointer to the frame. > > Thi

Re: [FFmpeg-devel] [PATCH 3/3] avformat: deprecate muxing uncoded frames

2020-04-14 Thread Nicolas George
Marton Balint (12020-04-11): > The extra allocations and deallocations are barely measurable. So far > uncoded_frame was used for realtime outputs. So you get, I don't know 100 > packets/frames per second? Allocating those is peanuts, and I have to stress > that you are not allocating the data, jus

Re: [FFmpeg-devel] [RFC] Moving ffprobe's writers to lavu

2020-04-14 Thread Nicolas George
Jan Ekström (12020-04-11): > I think this all depends on how much of a use there is for this sort of thing. > > Just looking at the case of wanting to output data from a filter, I > would default to the opinion that it would make sense to have these > writers (or at least some of them) common to t

[FFmpeg-devel] [PATCH 2/3] lavf/utils: stop using deprecated av_codec_next()

2020-04-14 Thread Josh de Kock
Signed-off-by: Josh de Kock --- libavformat/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index a58e47fabc..4f777ba849 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -222,7 +222,8 @@ static const AVCodec *fin

[FFmpeg-devel] [PATCH 3/3] tools: stop using deprecated av_codec_next()

2020-04-14 Thread Josh de Kock
Signed-off-by: Josh de Kock --- tools/enum_options.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/enum_options.c b/tools/enum_options.c index 28631d1a6b..548e427b7a 100644 --- a/tools/enum_options.c +++ b/tools/enum_options.c @@ -113,13 +113,14 @@ static void show_f

[FFmpeg-devel] [PATCH 1/3] lavc: stop using deprecated av_codec_next()

2020-04-14 Thread Josh de Kock
Signed-off-by: Josh de Kock --- libavcodec/options.c | 5 +++-- libavcodec/tests/utils.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libavcodec/options.c b/libavcodec/options.c index 35e8ac9313..babab599fc 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.

Re: [FFmpeg-devel] [PATCH] cmdutils: stop using deprecated av_codec_next()

2020-04-14 Thread Josh de Kock
On Tue, Apr 14, 2020, at 9:09 AM, Anton Khirnov wrote: > --- > fftools/cmdutils.c | 33 +++-- > 1 file changed, 19 insertions(+), 14 deletions(-) > > [...] LGTM, thanks. I will apply this a bit later after my set (or you can if you want it sooner). -- Josh

Re: [FFmpeg-devel] [PATCH v3 5/9] lavc/libopenh264enc: set slice_mode option to deprecated

2020-04-14 Thread Anton Khirnov
Quoting Linjie Fu (2020-04-11 12:03:35) > "slice mode" seems to be unnecessary since it could be determined by > -slices/max_nal_size. > > default:SM_FIXEDSLCNUM_SLICE mode with cpu-number slices. > -slices N: SM_FIXEDSLCNUM_SLICE mode with N slices. > -max_nal_size: SM_SIZELIMITED_S

Re: [FFmpeg-devel] [PATCH v3 4/9] lavc/libopenh264enc: prompt slice number changing inside libopenh264

2020-04-14 Thread Anton Khirnov
Quoting Linjie Fu (2020-04-11 12:03:34) > Libopenh264enc would set the slice according to the number of cpu cores > if uiSliceNum equals to 0 (auto) in SM_FIXEDSLCNUM_SLICE mode. > > Prompt a warning for user to catch this. > > Signed-off-by: Linjie Fu > --- > libavcodec/libopenh264enc.c | 2 ++

Re: [FFmpeg-devel] [PATCH v3 1/9] lavc/libopenh264enc: Add default qmin/qmax support

2020-04-14 Thread Anton Khirnov
Quoting Linjie Fu (2020-04-11 12:03:31) > Set default QP range to (1, 51) instead of (2, 32). > > QP = 0 is not well supported currently in libopenh264. If iMaxQp/iMinQp > equals 0, the QP range would be changed unexpectedly inside libopenh264 > with a warning: > > Warning:Change QP Range from(0,

Re: [FFmpeg-devel] [PATCH 01/10] lavc/libopenh264enc: Add default qmin/qmax support

2020-04-14 Thread Anton Khirnov
Quoting Fu, Linjie (2020-04-10 15:27:02) > > From: ffmpeg-devel On Behalf Of > > Anton Khirnov > > Sent: Friday, April 10, 2020 18:12 > > To: FFmpeg development discussions and patches > de...@ffmpeg.org> > > Subject: Re: [FFmpeg-devel] [PATCH 01/10] lavc/libopenh264enc: Add > > default qmin/qmax

Re: [FFmpeg-devel] [PATCH v4 1/2] libavcodec/libaomenc.c: Support gray input

2020-04-14 Thread Ryo Hirafuji
Thanks for the review! This should bump the micro version number in libavcodec/version.h. OK, I will bump up the version when the problem below is solved. > That's annoying. I filed a bug to track [1]. The monochrome flag > itself seems unnecessary for the library rather than just an image > f

[FFmpeg-devel] [PATCH 6/7] get_bits: change refill to RAD pattern

2020-04-14 Thread Christophe Gisquet
Described as variant 4 in the linked article. Results in faster and smaller code. Also, cases for the "refill_all" cases (usually when we want to empty/fill it) have been inlined. --- libavcodec/get_bits.h | 103 +- 1 file changed, 41 insertions(+), 62 delet

[FFmpeg-devel] [PATCH 4/7] get_bits: replace index by an incremented pointer

2020-04-14 Thread Christophe Gisquet
The main effect is actually code size reduction, due to the smaller refill code (or difference in inlining decision), e.g. on Win32 of {magicyuv,huffyuvdec,utvideodec}.o as follows: 19068/41460/16512 -> 18892/40760/16448 It should also be a small speedup (because it simplifies the address comput

[FFmpeg-devel] [PATCH 7/7] get_bits: use immediate in skip_remaining

2020-04-14 Thread Christophe Gisquet
When the entry informs to continue reading, this means the current read will be entirely skipped. Small object size reduction, depending on inlining. --- libavcodec/get_bits.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h inde

[FFmpeg-devel] [PATCH 5/7] get_bits: improve and fix get_bits_long for 32b

2020-04-14 Thread Christophe Gisquet
The new code is guaranteed to read at least 32bits, which is likely ok with the usual case that get_bits without cache can read up to 25. --- libavcodec/get_bits.h | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/libavcodec/get_bits.h b/libavcodec/

[FFmpeg-devel] [PATCH 0/7] Port cache bitstream reader to 32bits, and improve

2020-04-14 Thread Christophe Gisquet
This patch series gathers all changes affecting the cached reader and the file get_bits.h. The largest consists in modifying the cached reader so that the cache can be selected to be (native) 32 bits large. Then, due to some corner cases from various codecs, reducing some reads or fixing functions

[FFmpeg-devel] [PATCH 1/7] fate: add a MVHA test

2020-04-14 Thread Christophe Gisquet
--- tests/fate/video.mak | 3 +++ tests/ref/fate/mvha | 6 ++ 2 files changed, 9 insertions(+) create mode 100644 tests/ref/fate/mvha diff --git a/tests/fate/video.mak b/tests/fate/video.mak index d2d43e518d..8e54718c16 100644 --- a/tests/fate/video.mak +++ b/tests/fate/video.mak @@ -364,6

[FFmpeg-devel] [PATCH 2/7] get_bits: support 32bits cache

2020-04-14 Thread Christophe Gisquet
Therefore, also activate it under ARCH_X86 (testing for more archs welcome) for the only codecs supporting said cache reader. For UTVideo, on 8 bits samples and ARCH_X86_32 (X86_64 being unaffected), timings for one line do ~19.4k -> 15.1k and 16.5k (roughly 17% speedup). --- libavcodec/get_bits.h

[FFmpeg-devel] [PATCH 3/7] get_xbits: request fewer bits

2020-04-14 Thread Christophe Gisquet
Also allows it to not break 32bits readers. --- libavcodec/get_bits.h | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index cb4df98e54..59bfbdd88b 100644 --- a/libavcodec/get_bits.h +++ b/libavcodec/get_bits.h

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

2020-04-14 Thread Lynne
Apr 14, 2020, 09:52 by j...@itanimul.li: > Hi, > > On Mon, Apr 13, 2020, at 10:32 PM, Josh Allmann wrote: > >> Hi, >> >> On Sat, 24 Mar 2018 at 14:40, Josh de Kock wrote: >> > >> > Signed-off-by: Josh de Kock >> > --- >> > configure| 29 +- >> > doc/APIchanges | 4 +

[FFmpeg-devel] [PATCH v2] ffmpeg: allow full range of dts_delta_threshold

2020-04-14 Thread Gyan Doshi
For inputs from demuxers with AVFMT_TS_DISCONT flag, the existing condition, delta < -1LL*dts_delta_threshold*AV_TIME_BASE is rendered superflous due to the fixed threshold in pkt_dts + AV_TIME_BASE/10 < FFMAX(ist->pts, ist->dts) This prevents users from setting a high threshold to avoid disc

Re: [FFmpeg-devel] [PATCH] lavc/vaapi_encode_h265: add low_delay_b option for HEVC

2020-04-14 Thread Fu, Linjie
> From: ffmpeg-devel On Behalf Of > Mark Thompson > Sent: Monday, April 13, 2020 20:20 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH] lavc/vaapi_encode_h265: add > low_delay_b option for HEVC > > On 13/04/2020 05:32, Linjie Fu wrote: > > Low delay B-frame is supported on ICL+

Re: [FFmpeg-devel] [PATCH]lavu/mem: Make alloc array functions more similar to av_malloc

2020-04-14 Thread Nicolas George
Anton Khirnov (12020-04-14): > IIUC some platforms had problems with malloc(0) > Plus I don't think any valid code should ever malloc zero bytes, so my > suggestion would be for all malloc wrappers to: > - av_assert2(size > 0) > - return NULL otherwise I think this is a very good idea. Regards,

Re: [FFmpeg-devel] [PATCH] kmsgrab: Drop DRM master if running as root

2020-04-14 Thread Anton Khirnov
Quoting Mark Thompson (2020-04-12 16:46:25) > If we have both root and DRM master then drop the latter because we > don't need both and holding onto it can interfere with running other > programs. > > From a discussion with deltasquared on IRC. > --- > It would be marginally better to check whethe

Re: [FFmpeg-devel] [PATCH]lavu/mem: Make alloc array functions more similar to av_malloc

2020-04-14 Thread Anton Khirnov
Quoting James Almer (2020-04-12 22:47:55) > On 4/11/2020 8:53 PM, Carl Eugen Hoyos wrote: > > Am So., 12. Apr. 2020 um 00:44 Uhr schrieb Carl Eugen Hoyos > > : > >> > >> Am So., 5. Apr. 2020 um 14:03 Uhr schrieb Michael Niedermayer > >> : > >>> > >>> On Sat, Apr 04, 2020 at 12:46:36AM +0200, Carl E

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

2020-04-14 Thread Josh de Kock
Hi, On Mon, Apr 13, 2020, at 10:32 PM, Josh Allmann wrote: > Hi, > > On Sat, 24 Mar 2018 at 14:40, Josh de Kock wrote: > > > > Signed-off-by: Josh de Kock > > --- > > configure| 29 +- > > doc/APIchanges | 4 + > > doc/writing_filters.txt | 6 +- > > libavfilter

[FFmpeg-devel] [PATCH, v2] lavc/vaapi_encode_h265: add private b_strategy option for hevc_vaapi

2020-04-14 Thread Linjie Fu
Allow user to choose between I/P/B frames: - normal Ordinary IB..BPB..B GOP structure. - low delay B-frames: Allows forward-predict only for all B frames, L0 == L1, supported on ICL+ platforms, required by VDENC(low_power). - reference B-frames: Convert P-frames to low delay B-fram

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

2020-04-14 Thread Paul B Mahol
On 4/13/20, Josh Allmann wrote: > Hi, > > On Sat, 24 Mar 2018 at 14:40, Josh de Kock wrote: >> >> Signed-off-by: Josh de Kock >> --- >> configure| 29 +- >> doc/APIchanges | 4 + >> doc/writing_filters.txt | 6 +- >> libavfilter/allfilters.c | 823 >>

Re: [FFmpeg-devel] [FFmpeg-devel, v2] dvbsub.c, change segment order to be in line with spec

2020-04-14 Thread Paul B Mahol
On 4/14/20, Alen Vrečko wrote: > Hello, everyone. > > Looks like this patch got forgotten. I'd very much like to see it applied. > > In our testing. This patch doesn't break any existing players. But it does > allow for older STBs to play subtitles. > > If you don't like the patch, feel free to ch

[FFmpeg-devel] [FFmpeg-devel, v2] dvbsub.c, change segment order to be in line with spec

2020-04-14 Thread Alen Vrečko
Hello, everyone. Looks like this patch got forgotten. I'd very much like to see it applied. In our testing. This patch doesn't break any existing players. But it does allow for older STBs to play subtitles. If you don't like the patch, feel free to change the order yourself. The current dvb

[FFmpeg-devel] [PATCH] cmdutils: stop using deprecated av_codec_next()

2020-04-14 Thread Anton Khirnov
--- fftools/cmdutils.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index f0f2b4fde4..7f5a5ca664 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -1500,13 +1500,14 @@ static char get_media

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec_wrapper: fix {input, output}_buffers global reference leak

2020-04-14 Thread Matthieu Bouron
On Thu, Apr 09, 2020 at 05:06:05PM +0200, Matthieu Bouron wrote: > Fixes ticket #8607. > --- > libavcodec/mediacodec_wrapper.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c > index 5213cf640a7..79abc8b6aa9 100644 >