diff mbox series

[FFmpeg-devel] avfilter: fix af_pan regression

Message ID CAPYw7P6bbLiSj_bUGiv_GWk9sZbJkBo1yGKFAhdHDKaUWuRg3g@mail.gmail.com
State New
Headers show
Series [FFmpeg-devel] avfilter: fix af_pan regression | expand

Checks

Context Check Description
yinshiyou/configure_loongarch64 warning Failed to apply patch
andriy/make_x86 success Make finished
andriy/make_fate_x86 fail Make fate failed

Commit Message

Paul B Mahol Feb. 4, 2023, 8:48 p.m. UTC
Patch attached.

Comments

Michael Niedermayer Feb. 5, 2023, 7:58 p.m. UTC | #1
On Sat, Feb 04, 2023 at 09:48:38PM +0100, Paul B Mahol wrote:
> Patch attached.

>  af_pan.c |    3 +++
>  1 file changed, 3 insertions(+)
> bf878b3bd193e6462d1babf5e6e45a056a3a0f65  0001-avfilter-af_pan-fix-regression-introduced-with-switc.patch
> From b53fa290876af0f540a99f733193f270103bf8ad Mon Sep 17 00:00:00 2001
> From: Paul B Mahol <onemda@gmail.com>
> Date: Sat, 4 Feb 2023 21:46:15 +0100
> Subject: [PATCH] avfilter/af_pan: fix regression introduced with switch to new
>  channel layout API
> 
> Fixes #10168
> 
> Signed-off-by: Paul B Mahol <onemda@gmail.com>
> ---
>  libavfilter/af_pan.c | 3 +++
>  1 file changed, 3 insertions(+)

This seems to change fate output

@@ -3,23 +3,23 @@
 #codec_id 0: pcm_s16le
 #sample_rate 0: 44100
 #channel_layout_name 0: mono
-0,          0,          0,     1024,     2048, 0x750f0a66
-0,       1024,       1024,     1024,     2048, 0x155cf063
-0,       2048,       2048,     1024,     2048, 0x1e43fc32
-0,       3072,       3072,     1024,     2048, 0x282ffc28
-0,       4096,       4096,     1024,     2048, 0x6d7bf000
-0,       5120,       5120,     1024,     2048, 0xc0b2f411
-0,       6144,       6144,     1024,     2048, 0xd711fb03
-0,       7168,       7168,     1024,     2048, 0x3164189c
-0,       8192,       8192,     1024,     2048, 0x8c69e827
-0,       9216,       9216,     1024,     2048, 0x562d0518
-0,      10240,      10240,     1024,     2048, 0x380aee27
-0,      11264,      11264,     1024,     2048, 0x990a03e4
-0,      12288,      12288,     1024,     2048, 0x68d7ef60
-0,      13312,      13312,     1024,     2048, 0xd13fef9e
-0,      14336,      14336,     1024,     2048, 0x009306e4
-0,      15360,      15360,     1024,     2048, 0x51850390
-0,      16384,      16384,     1024,     2048, 0xcd3ceeae
-0,      17408,      17408,     1024,     2048, 0x189ff277
-0,      18432,      18432,     1024,     2048, 0x4b98f68c
-0,      19456,      19456,     1024,     2048, 0x34eaf544
+0,          0,          0,     1024,     2048, 0xd883fc1d
+0,       1024,       1024,     1024,     2048, 0xbfd0f2a0
+0,       2048,       2048,     1024,     2048, 0x88b90294
+0,       3072,       3072,     1024,     2048, 0x60dcf6f4
+0,       4096,       4096,     1024,     2048, 0x2cde0191
+0,       5120,       5120,     1024,     2048, 0x4543e9ea
+0,       6144,       6144,     1024,     2048, 0x4f73f86b
+0,       7168,       7168,     1024,     2048, 0x1a600893
+0,       8192,       8192,     1024,     2048, 0x02f3fe62
+0,       9216,       9216,     1024,     2048, 0xdbf200ac
+0,      10240,      10240,     1024,     2048, 0xd806ebf7
+0,      11264,      11264,     1024,     2048, 0xb2d9f805
+0,      12288,      12288,     1024,     2048, 0x47bb087b
+0,      13312,      13312,     1024,     2048, 0x96520fb5
+0,      14336,      14336,     1024,     2048, 0xfb8efbd5
+0,      15360,      15360,     1024,     2048, 0xbf2f03ed
+0,      16384,      16384,     1024,     2048, 0xde80fd74
+0,      17408,      17408,     1024,     2048, 0xf204e97d
+0,      18432,      18432,     1024,     2048, 0x260cf5d2
+0,      19456,      19456,     1024,     2048, 0x0d02ff6c
Test filter-pan-mono1 failed. Look at tests/data/fate/filter-pan-mono1.err for details.
tests/Makefile:306: recipe for target 'fate-filter-pan-mono1' failed

[...]
Paul B Mahol Feb. 5, 2023, 8:37 p.m. UTC | #2
On 2/5/23, Michael Niedermayer <michael@niedermayer.cc> wrote:
> On Sat, Feb 04, 2023 at 09:48:38PM +0100, Paul B Mahol wrote:
>> Patch attached.
>
>>  af_pan.c |    3 +++
>>  1 file changed, 3 insertions(+)
>> bf878b3bd193e6462d1babf5e6e45a056a3a0f65
>> 0001-avfilter-af_pan-fix-regression-introduced-with-switc.patch
>> From b53fa290876af0f540a99f733193f270103bf8ad Mon Sep 17 00:00:00 2001
>> From: Paul B Mahol <onemda@gmail.com>
>> Date: Sat, 4 Feb 2023 21:46:15 +0100
>> Subject: [PATCH] avfilter/af_pan: fix regression introduced with switch to
>> new
>>  channel layout API
>>
>> Fixes #10168
>>
>> Signed-off-by: Paul B Mahol <onemda@gmail.com>
>> ---
>>  libavfilter/af_pan.c | 3 +++
>>  1 file changed, 3 insertions(+)
>
> This seems to change fate output

Oh, fixed, new patch attached.

>
> @@ -3,23 +3,23 @@
>  #codec_id 0: pcm_s16le
>  #sample_rate 0: 44100
>  #channel_layout_name 0: mono
> -0,          0,          0,     1024,     2048, 0x750f0a66
> -0,       1024,       1024,     1024,     2048, 0x155cf063
> -0,       2048,       2048,     1024,     2048, 0x1e43fc32
> -0,       3072,       3072,     1024,     2048, 0x282ffc28
> -0,       4096,       4096,     1024,     2048, 0x6d7bf000
> -0,       5120,       5120,     1024,     2048, 0xc0b2f411
> -0,       6144,       6144,     1024,     2048, 0xd711fb03
> -0,       7168,       7168,     1024,     2048, 0x3164189c
> -0,       8192,       8192,     1024,     2048, 0x8c69e827
> -0,       9216,       9216,     1024,     2048, 0x562d0518
> -0,      10240,      10240,     1024,     2048, 0x380aee27
> -0,      11264,      11264,     1024,     2048, 0x990a03e4
> -0,      12288,      12288,     1024,     2048, 0x68d7ef60
> -0,      13312,      13312,     1024,     2048, 0xd13fef9e
> -0,      14336,      14336,     1024,     2048, 0x009306e4
> -0,      15360,      15360,     1024,     2048, 0x51850390
> -0,      16384,      16384,     1024,     2048, 0xcd3ceeae
> -0,      17408,      17408,     1024,     2048, 0x189ff277
> -0,      18432,      18432,     1024,     2048, 0x4b98f68c
> -0,      19456,      19456,     1024,     2048, 0x34eaf544
> +0,          0,          0,     1024,     2048, 0xd883fc1d
> +0,       1024,       1024,     1024,     2048, 0xbfd0f2a0
> +0,       2048,       2048,     1024,     2048, 0x88b90294
> +0,       3072,       3072,     1024,     2048, 0x60dcf6f4
> +0,       4096,       4096,     1024,     2048, 0x2cde0191
> +0,       5120,       5120,     1024,     2048, 0x4543e9ea
> +0,       6144,       6144,     1024,     2048, 0x4f73f86b
> +0,       7168,       7168,     1024,     2048, 0x1a600893
> +0,       8192,       8192,     1024,     2048, 0x02f3fe62
> +0,       9216,       9216,     1024,     2048, 0xdbf200ac
> +0,      10240,      10240,     1024,     2048, 0xd806ebf7
> +0,      11264,      11264,     1024,     2048, 0xb2d9f805
> +0,      12288,      12288,     1024,     2048, 0x47bb087b
> +0,      13312,      13312,     1024,     2048, 0x96520fb5
> +0,      14336,      14336,     1024,     2048, 0xfb8efbd5
> +0,      15360,      15360,     1024,     2048, 0xbf2f03ed
> +0,      16384,      16384,     1024,     2048, 0xde80fd74
> +0,      17408,      17408,     1024,     2048, 0xf204e97d
> +0,      18432,      18432,     1024,     2048, 0x260cf5d2
> +0,      19456,      19456,     1024,     2048, 0x0d02ff6c
> Test filter-pan-mono1 failed. Look at tests/data/fate/filter-pan-mono1.err
> for details.
> tests/Makefile:306: recipe for target 'fate-filter-pan-mono1' failed
>
> [...]
>
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Old school: Use the lowest level language in which you can solve the
> problem
>             conveniently.
> New school: Use the highest level language in which the latest
> supercomputer
>             can solve the problem without the user falling asleep waiting.
>
Paul B Mahol Feb. 7, 2023, 5:04 p.m. UTC | #3
On 2/5/23, Paul B Mahol <onemda@gmail.com> wrote:
> On 2/5/23, Michael Niedermayer <michael@niedermayer.cc> wrote:
>> On Sat, Feb 04, 2023 at 09:48:38PM +0100, Paul B Mahol wrote:
>>> Patch attached.
>>
>>>  af_pan.c |    3 +++
>>>  1 file changed, 3 insertions(+)
>>> bf878b3bd193e6462d1babf5e6e45a056a3a0f65
>>> 0001-avfilter-af_pan-fix-regression-introduced-with-switc.patch
>>> From b53fa290876af0f540a99f733193f270103bf8ad Mon Sep 17 00:00:00 2001
>>> From: Paul B Mahol <onemda@gmail.com>
>>> Date: Sat, 4 Feb 2023 21:46:15 +0100
>>> Subject: [PATCH] avfilter/af_pan: fix regression introduced with switch
>>> to
>>> new
>>>  channel layout API
>>>
>>> Fixes #10168
>>>
>>> Signed-off-by: Paul B Mahol <onemda@gmail.com>
>>> ---
>>>  libavfilter/af_pan.c | 3 +++
>>>  1 file changed, 3 insertions(+)
>>
>> This seems to change fate output
>
> Oh, fixed, new patch attached.
>
>>
>> @@ -3,23 +3,23 @@
>>  #codec_id 0: pcm_s16le
>>  #sample_rate 0: 44100
>>  #channel_layout_name 0: mono
>> -0,          0,          0,     1024,     2048, 0x750f0a66
>> -0,       1024,       1024,     1024,     2048, 0x155cf063
>> -0,       2048,       2048,     1024,     2048, 0x1e43fc32
>> -0,       3072,       3072,     1024,     2048, 0x282ffc28
>> -0,       4096,       4096,     1024,     2048, 0x6d7bf000
>> -0,       5120,       5120,     1024,     2048, 0xc0b2f411
>> -0,       6144,       6144,     1024,     2048, 0xd711fb03
>> -0,       7168,       7168,     1024,     2048, 0x3164189c
>> -0,       8192,       8192,     1024,     2048, 0x8c69e827
>> -0,       9216,       9216,     1024,     2048, 0x562d0518
>> -0,      10240,      10240,     1024,     2048, 0x380aee27
>> -0,      11264,      11264,     1024,     2048, 0x990a03e4
>> -0,      12288,      12288,     1024,     2048, 0x68d7ef60
>> -0,      13312,      13312,     1024,     2048, 0xd13fef9e
>> -0,      14336,      14336,     1024,     2048, 0x009306e4
>> -0,      15360,      15360,     1024,     2048, 0x51850390
>> -0,      16384,      16384,     1024,     2048, 0xcd3ceeae
>> -0,      17408,      17408,     1024,     2048, 0x189ff277
>> -0,      18432,      18432,     1024,     2048, 0x4b98f68c
>> -0,      19456,      19456,     1024,     2048, 0x34eaf544
>> +0,          0,          0,     1024,     2048, 0xd883fc1d
>> +0,       1024,       1024,     1024,     2048, 0xbfd0f2a0
>> +0,       2048,       2048,     1024,     2048, 0x88b90294
>> +0,       3072,       3072,     1024,     2048, 0x60dcf6f4
>> +0,       4096,       4096,     1024,     2048, 0x2cde0191
>> +0,       5120,       5120,     1024,     2048, 0x4543e9ea
>> +0,       6144,       6144,     1024,     2048, 0x4f73f86b
>> +0,       7168,       7168,     1024,     2048, 0x1a600893
>> +0,       8192,       8192,     1024,     2048, 0x02f3fe62
>> +0,       9216,       9216,     1024,     2048, 0xdbf200ac
>> +0,      10240,      10240,     1024,     2048, 0xd806ebf7
>> +0,      11264,      11264,     1024,     2048, 0xb2d9f805
>> +0,      12288,      12288,     1024,     2048, 0x47bb087b
>> +0,      13312,      13312,     1024,     2048, 0x96520fb5
>> +0,      14336,      14336,     1024,     2048, 0xfb8efbd5
>> +0,      15360,      15360,     1024,     2048, 0xbf2f03ed
>> +0,      16384,      16384,     1024,     2048, 0xde80fd74
>> +0,      17408,      17408,     1024,     2048, 0xf204e97d
>> +0,      18432,      18432,     1024,     2048, 0x260cf5d2
>> +0,      19456,      19456,     1024,     2048, 0x0d02ff6c
>> Test filter-pan-mono1 failed. Look at
>> tests/data/fate/filter-pan-mono1.err
>> for details.
>> tests/Makefile:306: recipe for target 'fate-filter-pan-mono1' failed
>>
>> [...]
>>
>> --
>> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>>
>> Old school: Use the lowest level language in which you can solve the
>> problem
>>             conveniently.
>> New school: Use the highest level language in which the latest
>> supercomputer
>>             can solve the problem without the user falling asleep
>> waiting.
>>
>

This is very big regression, so will apply ASAP!
diff mbox series

Patch

From b53fa290876af0f540a99f733193f270103bf8ad Mon Sep 17 00:00:00 2001
From: Paul B Mahol <onemda@gmail.com>
Date: Sat, 4 Feb 2023 21:46:15 +0100
Subject: [PATCH] avfilter/af_pan: fix regression introduced with switch to new
 channel layout API

Fixes #10168

Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavfilter/af_pan.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c
index 067f646805..504e0fb5d3 100644
--- a/libavfilter/af_pan.c
+++ b/libavfilter/af_pan.c
@@ -313,6 +313,7 @@  static int config_props(AVFilterLink *link)
             pan->channel_map[i] = ch_id;
         }
 
+        av_opt_set_chlayout(pan->swr, "ichl", &pan->out_channel_layout, 0);
         av_opt_set_int(pan->swr, "uch", pan->nb_output_channels, 0);
         swr_set_channel_mapping(pan->swr, pan->channel_map);
     } else {
@@ -333,6 +334,8 @@  static int config_props(AVFilterLink *link)
             for (j = 0; j < link->ch_layout.nb_channels; j++)
                 pan->gain[i][j] /= t;
         }
+        av_opt_set_chlayout(pan->swr, "ichl", &link->ch_layout, 0);
+        av_opt_set_chlayout(pan->swr, "ochl", &pan->out_channel_layout, 0);
         swr_set_matrix(pan->swr, pan->gain[0], pan->gain[1] - pan->gain[0]);
     }
 
-- 
2.39.1