Re: [FFmpeg-devel] [PATCH] Use channel count if channel layout is undefined

2018-07-13 Thread Marcin Gorzel
On Fri, Jul 13, 2018 at 12:15 AM Michael Niedermayer wrote: > On Tue, Jul 10, 2018 at 10:34:51AM +0100, Marcin Gorzel wrote: > > Hi Michael, > > > > I think I know where the misunderstanding could be. > > > > The main changes in my patch are: > > > > rematrix.c:389 and rematrix_int.c:36: > > > >

Re: [FFmpeg-devel] [PATCH] Use channel count if channel layout is undefined

2018-07-12 Thread Michael Niedermayer
On Mon, Jul 09, 2018 at 04:48:02PM +0100, Marcin Gorzel wrote: > Rematrixing supports up to 64 channels but there is only a limited number of > channel layouts defined. Currently, in/out channel count is obtained from the > channel layout so if the channel layout is undefined (e.g. for 9, 10, 11

Re: [FFmpeg-devel] [PATCH] Use channel count if channel layout is undefined

2018-07-12 Thread Michael Niedermayer
On Tue, Jul 10, 2018 at 10:34:51AM +0100, Marcin Gorzel wrote: > Hi Michael, > > I think I know where the misunderstanding could be. > > The main changes in my patch are: > > rematrix.c:389 and rematrix_int.c:36: > > Before: > int nb_in = av_get_channel_layout_nb_channels(s->in_ch_layout) > >

Re: [FFmpeg-devel] [PATCH] Use channel count if channel layout is undefined

2018-07-11 Thread Marcin Gorzel
Michael, Nicolas, Do you think this patch is now ready to be applied? Or would you like me to make any further changes? Thanks, Marcin On Tue, Jul 10, 2018 at 10:34 AM Marcin Gorzel wrote: > Hi Michael, > > I think I know where the misunderstanding could be. > > The main changes in my patch a

Re: [FFmpeg-devel] [PATCH] Use channel count if channel layout is undefined

2018-07-10 Thread Marcin Gorzel
Hi Michael, I think I know where the misunderstanding could be. The main changes in my patch are: rematrix.c:389 and rematrix_int.c:36: Before: int nb_in = av_get_channel_layout_nb_channels(s->in_ch_layout) After: int nb_in = s->in_ch_layout != 0 ? av_get_channel_layout_nb_channels(s

Re: [FFmpeg-devel] [PATCH] Use channel count if channel layout is undefined

2018-07-10 Thread Marcin Gorzel
Thanks for the explanation Nicolas. When the matrix is not explicitly provided, lswr computes it. For that, > it needs the channel layout, because you do not mix a rear channel the > same way as a subwoofer. This patch absolutely needs to be tested under > these circumstances too. > This patch do

Re: [FFmpeg-devel] [PATCH] Use channel count if channel layout is undefined

2018-07-09 Thread Michael Niedermayer
On Mon, Jul 09, 2018 at 01:55:37PM +0100, Marcin Gorzel wrote: > Thank you for your comments Michael and apologies if my commit message was > inadequate (I am new to this forum and this is my first patch). > > The bug can be reproduced when downmixing audio with more than 8 channels, > for example

Re: [FFmpeg-devel] [PATCH] Use channel count if channel layout is undefined

2018-07-09 Thread Nicolas George
Marcin Gorzel (2018-07-09): > ./ffmpeg -i input_9ch.wav -filter:a:0 > pan="6c|c0=0.166*c0+0.166*c6|c1=c1|c2=c2|c3=c3|c4=c4|c5=c5" -y > output_6ch.wav > > Without the patch, the output in the first channel (c0) is noise. After > applying the patch, I can verify that two sine tones are mixed togethe

Re: [FFmpeg-devel] [PATCH] Use channel count if channel layout is undefined

2018-07-09 Thread Marcin Gorzel
Hi Nicolas, > Please remember to mention "lswr" or "libswresample" in the first line > of the commit message. > Apologies, I will update the commit message. > > Rematrixing supports up to 64 channels but there is only a limited > > number of channel layouts defined. Currently, in/out channel c

Re: [FFmpeg-devel] [PATCH] Use channel count if channel layout is undefined

2018-07-09 Thread Nicolas George
Marcin Gorzel (2018-07-09): > Subject: Re: [FFmpeg-devel] [PATCH] Use channel count if channel layout is > undefined Please remember to mention "lswr" or "libswresample" in the first line of the commit message. > Rematrixing supports up to 64 channels but there

Re: [FFmpeg-devel] [PATCH] Use channel count if channel layout is undefined

2018-07-09 Thread Marcin Gorzel
Thank you for your comments Michael and apologies if my commit message was inadequate (I am new to this forum and this is my first patch). The bug can be reproduced when downmixing audio with more than 8 channels, for example: ./ffmpeg -i input_9ch.wav -filter:a:0 pan="6c|c0=0.166*c0+0.166*c6|c1=

Re: [FFmpeg-devel] [PATCH] Use channel count if channel layout is undefined

2018-07-06 Thread Michael Niedermayer
On Fri, Jul 06, 2018 at 03:15:58PM +0100, Marcin Gorzel wrote: > Rematrixing supports up to 64 channels but there is only a limited number of > channel layouts defined. Currently, in/out channel count is obtained from the > channel layout so if the channel layout is undefined (e.g. for 9, 10, 11