[FFmpeg-devel] [PATCH 1/3] fate/microsoft: add mss2 region test case

2022-11-05 Thread Peter Ross
--- posting here to test against patchwork tests/fate/microsoft.mak | 3 ++- tests/ref/fate/mss2-region | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 tests/ref/fate/mss2-region diff --git a/tests/fate/microsoft.mak b/tests/fate/microsoft.mak index ee1a062425

[FFmpeg-devel] [PATCH 3/3] fate/video: vqc testcase

2022-11-05 Thread Peter Ross
--- tests/fate/video.mak | 3 +++ tests/ref/fate/vqc | 6 ++ 2 files changed, 9 insertions(+) create mode 100644 tests/ref/fate/vqc diff --git a/tests/fate/video.mak b/tests/fate/video.mak index 40cdd9e3b6..af7e77e814 100644 --- a/tests/fate/video.mak +++ b/tests/fate/video.mak @@ -374,6 +

[FFmpeg-devel] [PATCH 2/3] fate/audio: msnsiren test case

2022-11-05 Thread Peter Ross
--- tests/fate/audio.mak | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/fate/audio.mak b/tests/fate/audio.mak index 9d39eeace3..c733d8b7f4 100644 --- a/tests/fate/audio.mak +++ b/tests/fate/audio.mak @@ -45,6 +45,11 @@ fate-imc: CMD = pcm -i $(TARGET_SAMPLES)/imc/imc.avi fate-imc:

Re: [FFmpeg-devel] Rework color quantization in palette{gen,use}

2022-11-05 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Clément Bœsch > Sent: Saturday, November 5, 2022 4:26 PM > To: ffmpeg-devel@ffmpeg.org > Subject: [FFmpeg-devel] Rework color quantization in palette{gen,use} > > Hi, > > This patchset essentially fixes a few core problems in the

[FFmpeg-devel] [PATCH] avformat/movenc: Remove experimental status of TrueHD-in-MP4 muxing (mlpa)

2022-11-05 Thread Nomis101
Support for mlpa muxing was added back in 2019: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=808a6717e0c584738c60a109afd6d47f4973d619 But it was hidden back then behind FF_COMPLIANCE_EXPERIMENTAL, because it was new and there was no support from other applications. In the meantime there

Re: [FFmpeg-devel] [PATCH 12/15] avfilter/palettegen: base split decision on a perceptual model

2022-11-05 Thread Andreas Rheinhardt
Clément Bœsch: > Similar to the change in paletteuse, we rely on a perceptual model to > decide how and where to split the box. > --- > libavfilter/Makefile | 2 +- > libavfilter/vf_palettegen.c| 79 -- > tests/ref/fate/filter-palettegen-1 | 2 +-

Re: [FFmpeg-devel] Rework color quantization in palette{gen,use}

2022-11-05 Thread Clément Bœsch
On Sat, Nov 05, 2022 at 04:44:39PM +0100, Paul B Mahol wrote: [...] > > Finally, I do believe a lot of other color filters could at least benefit > > from > > fixing their gamma handling (I know I'm guilty of this in various other > > filters). > > gamma handling depends not on pixel format but on

Re: [FFmpeg-devel] [PATCH 09/15] avfilter/palettegen: average color in linear space

2022-11-05 Thread Clément Bœsch
On Sat, Nov 05, 2022 at 04:39:26PM +0100, Paul B Mahol wrote: > On 11/5/22, Clément Bœsch wrote: > > sRGB colors are gamma encoded, averaging them naively is incorrect. > > --- > > libavfilter/vf_palettegen.c| 18 ++ > > tests/ref/fate/filter-palettegen-1 | 2 +- > > test

Re: [FFmpeg-devel] [PATCH 01/19] avcodec/vc1: Don't check for AVCodecContext.codec

2022-11-05 Thread Andreas Rheinhardt
Andreas Rheinhardt: > This check has been added in c617bed34f39a122ab1f89581ddce9cc63885383, > merging ee769c6a7c1d4ec6560f5e5a6f457b770b10fb33 to fix > a possible segfault if AVCodecContext.codec is not set > as it may be during parsing. While this fixes the segfault, > it has the unfortunate side

Re: [FFmpeg-devel] [PATCH v3] avcodec/nvenc: add AV1 encoding support

2022-11-05 Thread Philip Langdale
On Fri, 4 Nov 2022 12:40:16 +0100 Timo Rothenpieler wrote: > The encoder seems to be trading blows with hevc_nvenc. > In terms of quality at low bitrate cbr settings, it seems to > outperform it even. It produces fewer artifacts and the ones it > does produce are less jarring to my perception. >

Re: [FFmpeg-devel] Rework color quantization in palette{gen,use}

2022-11-05 Thread Paul B Mahol
On 11/5/22, Clément Bœsch wrote: > Hi, > > This patchset essentially fixes a few core problems in these filters and > switches to a perceptual model. > > I've generated a report for each key commit on this (temporary) page: > http://big.pkh.me/pal/ (warning: heavy page, ~500M; I did try to add som

Re: [FFmpeg-devel] [PATCH 09/15] avfilter/palettegen: average color in linear space

2022-11-05 Thread Paul B Mahol
On 11/5/22, Clément Bœsch wrote: > sRGB colors are gamma encoded, averaging them naively is incorrect. > --- > libavfilter/vf_palettegen.c| 18 ++ > tests/ref/fate/filter-palettegen-1 | 2 +- > tests/ref/fate/filter-palettegen-2 | 2 +- > 3 files changed, 12 insertions(+

[FFmpeg-devel] [PATCH 09/15] avfilter/palettegen: average color in linear space

2022-11-05 Thread Clément Bœsch
sRGB colors are gamma encoded, averaging them naively is incorrect. --- libavfilter/vf_palettegen.c| 18 ++ tests/ref/fate/filter-palettegen-1 | 2 +- tests/ref/fate/filter-palettegen-2 | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/libavfilter/v

[FFmpeg-devel] [PATCH 15/15] avfilter/palette{use, gen}: update Copyright after recent changes

2022-11-05 Thread Clément Bœsch
--- libavfilter/vf_palettegen.c | 1 + libavfilter/vf_paletteuse.c | 1 + 2 files changed, 2 insertions(+) diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c index 9d537f8f37..cba44d1fbf 100644 --- a/libavfilter/vf_palettegen.c +++ b/libavfilter/vf_palettegen.c @@ -1,5 +1,6 @@

[FFmpeg-devel] [PATCH 14/15] avfilter/palettegen: rename longest to split_axis

2022-11-05 Thread Clément Bœsch
The split heuristic is not based on the length property of the axis anymore. --- libavfilter/vf_palettegen.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c index 2976012512..9d537f8f37 100644 ---

[FFmpeg-devel] [PATCH 13/15] avfilter/palettegen: use variance per-axis instead of the range

2022-11-05 Thread Clément Bœsch
The split decision is now based on the per-axis variance instead of how wide they are. --- libavfilter/vf_palettegen.c| 61 -- tests/ref/fate/filter-palettegen-1 | 2 +- tests/ref/fate/filter-palettegen-2 | 2 +- 3 files changed, 35 insertions(+), 30 deletions

[FFmpeg-devel] [PATCH 08/15] avfilter/paletteuse: switch to a perceptual model

2022-11-05 Thread Clément Bœsch
Now the selection of the color is based on a distance built around human perception of color instead of the unreliable sRGB triplet one. --- libavfilter/Makefile| 2 +- libavfilter/vf_paletteuse.c | 196 ++-- tests/ref/fate/filter-paletteus

[FFmpeg-devel] [PATCH 11/15] avfilter/palettegen: comment on the unnormalized variance

2022-11-05 Thread Clément Bœsch
--- libavfilter/vf_palettegen.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c index 2b412cdb55..b8e4463539 100644 --- a/libavfilter/vf_palettegen.c +++ b/libavfilter/vf_palettegen.c @@ -152,6 +152,24 @@ static void

[FFmpeg-devel] [PATCH 12/15] avfilter/palettegen: base split decision on a perceptual model

2022-11-05 Thread Clément Bœsch
Similar to the change in paletteuse, we rely on a perceptual model to decide how and where to split the box. --- libavfilter/Makefile | 2 +- libavfilter/vf_palettegen.c| 79 -- tests/ref/fate/filter-palettegen-1 | 2 +- tests/ref/fate/filter-pal

[FFmpeg-devel] [PATCH 07/15] avfilter/paletteuse: remove redundant alpha condition

2022-11-05 Thread Clément Bœsch
This is redundant with a != 0xff below. --- libavfilter/vf_paletteuse.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libavfilter/vf_paletteuse.c b/libavfilter/vf_paletteuse.c index 8954a02524..0861a70a0b 100644 --- a/libavfilter/vf_paletteuse.c +++ b/libavfilter/vf_pal

[FFmpeg-devel] [PATCH 10/15] avfilter/palettegen: move box variance computation in a dedicated function

2022-11-05 Thread Clément Bœsch
--- libavfilter/vf_palettegen.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c index 00bc323d17..2b412cdb55 100644 --- a/libavfilter/vf_palettegen.c +++ b/libavfilter/vf_palettegen.c @@ -144,

[FFmpeg-devel] [PATCH 06/15] avfilter/paletteuse: remove unused alpha split dimension

2022-11-05 Thread Clément Bœsch
The equalities in the w{r,g,b} range checks make sure longest is never 0. Even if the alpha ended up being selected in get_next_color() it would cause underread memory accesses in its caller (colormap_insert). --- libavfilter/vf_paletteuse.c | 33 - 1 file changed,

[FFmpeg-devel] [PATCH 05/15] avfilter/paletteuse: name target color arg consistently in colormap functions

2022-11-05 Thread Clément Bœsch
--- libavfilter/vf_paletteuse.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_paletteuse.c b/libavfilter/vf_paletteuse.c index fb4016b11c..f43f077454 100644 --- a/libavfilter/vf_paletteuse.c +++ b/libavfilter/vf_paletteuse.c @@ -180,7 +180,7 @@ static a

[FFmpeg-devel] [PATCH 04/15] avfilter/paletteuse: switch from u8[4] to u32 for color code

2022-11-05 Thread Clément Bœsch
This change simplifies the code quite a bit and make it consistent with how it's done in palettegen. --- libavfilter/vf_paletteuse.c | 98 - 1 file changed, 41 insertions(+), 57 deletions(-) diff --git a/libavfilter/vf_paletteuse.c b/libavfilter/vf_paletteuse.c

[FFmpeg-devel] [PATCH 03/15] avfilter/palette{use, gen}: simplify a few alpha masks

2022-11-05 Thread Clément Bœsch
--- libavfilter/vf_paletteuse.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavfilter/vf_paletteuse.c b/libavfilter/vf_paletteuse.c index cb18329bb7..f9d8a1cdfc 100644 --- a/libavfilter/vf_paletteuse.c +++ b/libavfilter/vf_paletteuse.c @@ -156,7 +156,7 @@ s

[FFmpeg-devel] [PATCH 02/15] avfilter: add palette utils

2022-11-05 Thread Clément Bœsch
These color management helpers will be shared by palettegen and paletteuse in the following commits. Note that it probably makes sense to share at least the sRGB/linear functions with other filters at some point. --- libavfilter/palette.c | 101 ++ libavfil

[FFmpeg-devel] [PATCH 01/15] Revert "avfilter/vf_palette(gen|use): support palettes with alpha"

2022-11-05 Thread Clément Bœsch
This reverts commit dea673d0d548c864ec85f9260d8900d944ef7a2a. This change cannot work for several reasons, the most obvious ones are: - the alpha is being part of the scoring of the color difference, even though we can not interpret the alpha as part of the perception of the color (we don't e

[FFmpeg-devel] Rework color quantization in palette{gen,use}

2022-11-05 Thread Clément Bœsch
Hi, This patchset essentially fixes a few core problems in these filters and switches to a perceptual model. I've generated a report for each key commit on this (temporary) page: http://big.pkh.me/pal/ (warning: heavy page, ~500M; I did try to add some lazy loading of the images but I'm not sure