[FFmpeg-devel] [PATCH v2 1/7] avutil: move half-precision float helper to avutil

2022-08-14 Thread Timo Rothenpieler
--- libavcodec/exr.c | 2 +- libavcodec/exrenc.c| 2 +- libavcodec/pnmdec.c| 3 ++- libavcodec/pnmenc.c| 2 +- {libavcodec => libavutil}/float2half.h | 6 +++--- {libavcodec => libavutil}/half2float.h | 6 +++--- 6 f

[FFmpeg-devel] [PATCH v2 2/7] avutil/half2float: adjust conversion of NaN

2022-08-14 Thread Timo Rothenpieler
IEEE-754 differentiates two different kind of NaNs. Quiet and Signaling ones. They are differentiated by the MSB of the mantissa. For whatever reason, actual hardware conversion of half to single always sets the signaling bit to 1 if the mantissa is != 0, and to 0 if it's 0. So our code has to fol

[FFmpeg-devel] [PATCH v2 3/7] avutil/half2float: move tables to header-internal structs

2022-08-14 Thread Timo Rothenpieler
Having to put the knowledge of the size of those arrays into a multitude of places is rather smelly. --- libavcodec/exr.c | 27 -- libavcodec/exrenc.c| 11 + libavcodec/pnm.h | 5 ++--- libavcodec/pnmdec.c| 42 -- lib

[FFmpeg-devel] [PATCH v2 4/7] avutil/half2float: move non-inline init code out of header

2022-08-14 Thread Timo Rothenpieler
--- libavcodec/Makefile | 8 +++--- libavcodec/exr.c| 2 +- libavcodec/exrenc.c | 2 +- libavcodec/float2half.c | 19 + libavcodec/half2float.c | 19 + libavcodec/pnmdec.c | 2 +- libavcodec/pnmenc.c | 2 +- libavutil/float2half.c | 53

[FFmpeg-devel] [PATCH v2 5/7] avutil/half2float: use native _Float16 if available

2022-08-14 Thread Timo Rothenpieler
_Float16 support was available on arm/aarch64 for a while, and with gcc 12 was enabled on x86 as long as SSE2 is supported. If the target arch supports f16c, gcc emits fairly efficient assembly, taking advantage of it. This is the case on x86-64-v3 or higher. Same goes on arm, which has native flo

[FFmpeg-devel] [PATCH v2 7/7] swscale/input: add rgbaf16 input support

2022-08-14 Thread Timo Rothenpieler
This is by no means perfect, since at least ddagrab will return scRGB data with values outside of 0.0f to 1.0f for HDR values. Its primary purpose is to be able to work with the format at all. --- libavutil/Makefile| 1 + libswscale/half2float.c | 19 + libswscale/input.c

[FFmpeg-devel] [PATCH v2 6/7] swscale: add opaque parameter to input functions

2022-08-14 Thread Timo Rothenpieler
--- libswscale/hscale.c | 12 +-- libswscale/input.c| 149 ++ libswscale/swscale_internal.h | 17 ++-- libswscale/x86/swscale.c | 13 +-- 4 files changed, 106 insertions(+), 85 deletions(-) diff --git a/libswscale/hscale.c b/libswscale

Re: [FFmpeg-devel] [PATCH] ipfsgateway: Remove default gateway

2022-08-14 Thread Michael Niedermayer
On Sat, Aug 13, 2022 at 09:06:50PM +0200, Timo Rothenpieler wrote: > On 13.08.2022 18:29, Michael Niedermayer wrote: > > I fully support better IPFS support > > what iam a bit "upset" about is that running a IPFS node is presented as > > if that was more private than using a gateway. > > That's no

Re: [FFmpeg-devel] [PATCH 08/11] avutil/half2float: move non-inline init code out of header

2022-08-14 Thread Michael Niedermayer
On Thu, Aug 11, 2022 at 11:31:32PM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > On Thu, Aug 11, 2022 at 10:50:10PM +0200, Andreas Rheinhardt wrote: > >> Michael Niedermayer: > >>> On Wed, Aug 10, 2022 at 10:47:09PM +0200, Timo Rothenpieler wrote: > --- > libavcodec/Makefil

Re: [FFmpeg-devel] [PATCH 08/11] avutil/half2float: move non-inline init code out of header

2022-08-14 Thread Timo Rothenpieler
On 11.08.2022 23:31, Andreas Rheinhardt wrote: Michael Niedermayer: On Thu, Aug 11, 2022 at 10:50:10PM +0200, Andreas Rheinhardt wrote: Michael Niedermayer: On Wed, Aug 10, 2022 at 10:47:09PM +0200, Timo Rothenpieler wrote: --- libavcodec/Makefile | 8 +++--- libavcodec/exr.c|

Re: [FFmpeg-devel] [PATCH v2 7/7] swscale/input: add rgbaf16 input support

2022-08-14 Thread Leo Izen
On 8/14/22 12:48, Timo Rothenpieler wrote: This is by no means perfect, since at least ddagrab will return scRGB data with values outside of 0.0f to 1.0f for HDR values. Its primary purpose is to be able to work with the format at all. --- libavutil/Makefile| 1 + libswscale/half

[FFmpeg-devel] [PATCH] avfilter/af_alimiter: fix misbehavior when nb_channels != 2

2022-08-14 Thread David Flater
Some code in alimiter assumes that there are 2 channels, resulting in clipping if the loudest channel is 3 or above and an out-of-bounds read if the input is monophonic. Fix that in 2 places. Signed-off-by: David Flater --- libavfilter/af_alimiter.c | 23 +-- 1 file changed,

Re: [FFmpeg-devel] [PATCH v2 7/7] swscale/input: add rgbaf16 input support

2022-08-14 Thread Andreas Rheinhardt
Leo Izen: > On 8/14/22 12:48, Timo Rothenpieler wrote: >> This is by no means perfect, since at least ddagrab will return scRGB >> data with values outside of 0.0f to 1.0f for HDR values. >> Its primary purpose is to be able to work with the format at all. >> --- >>   libavutil/Makefile   

Re: [FFmpeg-devel] [PATCH 08/11] avutil/half2float: move non-inline init code out of header

2022-08-14 Thread Andreas Rheinhardt
Michael Niedermayer: > On Thu, Aug 11, 2022 at 11:31:32PM +0200, Andreas Rheinhardt wrote: >> Michael Niedermayer: >>> On Thu, Aug 11, 2022 at 10:50:10PM +0200, Andreas Rheinhardt wrote: Michael Niedermayer: > On Wed, Aug 10, 2022 at 10:47:09PM +0200, Timo Rothenpieler wrote: >> --- >>

Re: [FFmpeg-devel] [PATCH 1/6] avcodec/avcodec: Move initializing frame-thrd encoder to encode_preinit

2022-08-14 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/avcodec.c | 6 -- > libavcodec/encode.c | 6 ++ > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c > index f82d9e9f74..0451f57f82 100644 > --- a/libavc

[FFmpeg-devel] [PATCH v2] libavfilter/x86/vf_convolution: add sobel filter optimization and unit test with intel AVX512 VNNI

2022-08-14 Thread bin . wang-at-intel . com
From: bwang30 This commit enabled assembly code with intel AVX512 VNNI and added unit test for sobel filter sobel_c: 4537 sobel_avx512icl 2470 Signed-off-by: bwang30 --- libavfilter/convolution.h | 2 + libavfilter/vf_convolution.c | 23 libavfilter/x86/vf_convol

Re: [FFmpeg-devel] [PATCH 1/3] lavu/pixfmt: Add Y216, Y410, and Y416 formats

2022-08-14 Thread Xiang, Haihao
On Sun, 2022-08-14 at 14:33 -0700, Philip Langdale wrote: > These are the formats returned by the Intel VAAPI decoder for 12bit > 4:2:2, 10bit 4:4:4, and 12bit 4:4:4 respectively. As with the already > supported Y210 and YUVA (AVUY) formats, they are the formats Microsoft > picked as their preferre

Re: [FFmpeg-devel] [PATCH] libavfilter/x86/vf_convolution: add sobel filter optimization and unit test with intel AVX512 VNNI

2022-08-14 Thread Wang, Bin
-Original Message- From: ffmpeg-devel On Behalf Of Andreas Rheinhardt Sent: Friday, August 12, 2022 5:11 PM To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH] libavfilter/x86/vf_convolution: add sobel filter optimization and unit test with intel AVX512 VNNI bin.wang-at-inte