[FFmpeg-devel] [PATCH v2] lavfi: add a libplacebo filter

2020-12-02 Thread Niklas Haas
From: Niklas Haas This filter conceptually maps the libplacebo `pl_renderer` API into libavfilter, which is a high-level image rendering API designed to work with an RGB pipeline internally. As such, there's no way to avoid e.g. chroma interpolation with this filter, although new versions of libp

Re: [FFmpeg-devel] [PATCH] avcodec/pthread_slice: Don't use static variable, fix race

2020-12-02 Thread Anton Khirnov
Quoting Andreas Rheinhardt (2020-11-29 00:28:51) > ff_slice_thread_init() uses a static variable to hold a function > pointer, although the value of said pointer needn't be saved between > different runs of this function at all; > > The reason for this being so is probably that said pointer points

Re: [FFmpeg-devel] [PATCH 4/4] avcodec/mpeg12enc: Deprecate using MPEG-2 intra VLC table for mpeg1video

2020-12-02 Thread Anton Khirnov
Quoting Andreas Rheinhardt (2020-11-25 01:01:44) >One could write a decoder that decodes it That's almost a tautology ;) > I am not against just removing the option now. What do others think > about this? Kill it with fire. We should not allow creating invalid files, unless there are really good

Re: [FFmpeg-devel] [PATCH v3] avcodec/hevcdec: dynamic allocate sList and HEVClcList

2020-12-02 Thread Anton Khirnov
Quoting Nuo Mi (2020-11-29 16:30:10) > following comandline will crash the ffmpeg > ffmpeg -threads 17 -thread_type slice -i WPP_A_ericsson_MAIN_2.bit out.yuv -y > > the HEVCContext->sList size is MAX_NB_THREADS(16), any > 16 thread number > will crash the application > --- > libavcodec/hevcdec.

[FFmpeg-devel] [PATCH] libavcodec/qsvenc: Adding support for HDR metadata to hevc qsv encode

2020-12-02 Thread Fredrick Odhiambo
This patch allows passing of HDR10 metadata through qsv_params for encoding with hevc_qsv similar to how HDR10 parameters are passed to x265-params in libx265 encoding. The HDR10 metadata parameters passed are master-display, max-cll, color primary, color matrix, transfer characteristics and col

Re: [FFmpeg-devel] [PATCH 212/217] avcodec/snow: Fix race in ff_snow_common_init()

2020-12-02 Thread Michael Niedermayer
On Wed, Dec 02, 2020 at 05:22:39AM +0100, Andreas Rheinhardt wrote: > Commits d49210788b0836d56dd872d517fe73f83b080101 and > ee8ce211ead04c8684da0c9c143814e57e9b9eda set the > FF_CODEC_CAP_INIT_THREADSAFE flag for the Snow encoder resp. decoder; > yet these codecs init functions aren't threadsafe a

Re: [FFmpeg-devel] [PATCH] swscale/rgb2rgb_template: use shuffle macro on BE arches

2020-12-02 Thread Michael Niedermayer
On Mon, Nov 30, 2020 at 12:46:51AM -0500, Andriy Gelman wrote: > From: Andriy Gelman > > Fixes fate-qtrle-32bit on PPC64 qemu also fixes this on mips-qemu LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Take away the freedom of one citizen and you w

Re: [FFmpeg-devel] [PATCH 212/217] avcodec/snow: Fix race in ff_snow_common_init()

2020-12-02 Thread Andreas Rheinhardt
Michael Niedermayer: > On Wed, Dec 02, 2020 at 05:22:39AM +0100, Andreas Rheinhardt wrote: >> Commits d49210788b0836d56dd872d517fe73f83b080101 and >> ee8ce211ead04c8684da0c9c143814e57e9b9eda set the >> FF_CODEC_CAP_INIT_THREADSAFE flag for the Snow encoder resp. decoder; >> yet these codecs init fu

Re: [FFmpeg-devel] [PATCH 212/217] avcodec/snow: Fix race in ff_snow_common_init()

2020-12-02 Thread Michael Niedermayer
On Wed, Dec 02, 2020 at 11:45:10PM +0100, Andreas Rheinhardt wrote: > Michael Niedermayer: > > On Wed, Dec 02, 2020 at 05:22:39AM +0100, Andreas Rheinhardt wrote: > >> Commits d49210788b0836d56dd872d517fe73f83b080101 and > >> ee8ce211ead04c8684da0c9c143814e57e9b9eda set the > >> FF_CODEC_CAP_INIT_T

[FFmpeg-devel] [PATCH 218/223] avcodec/ffv1enc: Mark encoder as init-threadsafe

2020-12-02 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/ffv1enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index 611b250e96..75ca3dd992 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -1354,5 +1354,5 @@ AVCodec ff_ffv

[FFmpeg-devel] [PATCH 219/223] avcodec/ffv1dec: Mark decoder as init-threadsafe

2020-12-02 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/ffv1dec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index c704373cfe..cfb7733380 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -1063,5 +1063,6 @@ AVCodec ff_f

[FFmpeg-devel] [PATCH 220/223] avcodec/cfhdenc: Mark encoder as init-threadsafe

2020-12-02 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/cfhdenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cfhdenc.c b/libavcodec/cfhdenc.c index 5554baefa3..5b7decbcb3 100644 --- a/libavcodec/cfhdenc.c +++ b/libavcodec/cfhdenc.c @@ -919,5 +919,5 @@ AVCodec ff_cfhd_

[FFmpeg-devel] [PATCH 221/223] avutil/cpu: Fix race condition in av_cpu_count()

2020-12-02 Thread Andreas Rheinhardt
av_cpu_count() intends to emit a debug message containing the number of logical cores when called the first time. The check currently works with a static volatile int; yet this does not help at all in case of concurrent accesses by multiple threads. So replace this with an atomic_int. Signed-off-b

[FFmpeg-devel] [PATCH 222/223] avcodec/mlpenc: Add const where appropriate

2020-12-02 Thread Andreas Rheinhardt
The MLP/TrueHD encoder uses pointers to non-const to access several static objects that are only initialized at runtime and are therefore not declared as const. This does not result in compiler warnings, but it is fragile, as these objects are really not to be modified as they are not owned by any

[FFmpeg-devel] [PATCH 223/223] avcodec/mlpenc: Make encoders init-threadsafe

2020-12-02 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mlpenc.c | 32 +++- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c index dfd1cc8d60..b61f69d4a5 100644 --- a/libavcodec/mlpenc.c +++ b/libavcodec/mlpenc.c @@ -27

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/qsvdec_other: refact, use DEFINE_QSV_DECODER to remove duplicate code

2020-12-02 Thread Guangxin Xu
Hi Haihao, Thanks for the review. Hi Mark & Zong, Are we good to go? thanks On Wed, Dec 2, 2020 at 1:52 PM Xiang, Haihao wrote: > > > Hi Haihao, > > If you check the final code. The QSVOtherContext and QSVH2645Context will > > be unified to QSVDecContext. It's no need to pass the priv_data_siz