Re: [FFmpeg-devel] [PATCH] swresample/options: change rematrix_maxval default to 1.0

2015-11-07 Thread Ganesh Ajjanagadde
On Fri, Nov 6, 2015 at 2:52 AM, Nicolas George  wrote:
> Le sextidi 16 brumaire, an CCXXIV, Michael Niedermayer a écrit :
>> iam with whatever default people prefer
>
> IIRC, the current default yields different results when rematrixing from
> float to float and then converting from float to int than when doing both in
> a single step. I beliee this is not good.

Patch dropped. Pushed just the typo fixes. Thanks.

>
> Regards,
>
> --
>   Nicolas George
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] swresample/options: change rematrix_maxval default to 1.0

2015-11-07 Thread wm4
On Sat, 7 Nov 2015 18:33:07 +0100
Michael Niedermayer  wrote:

> On Fri, Nov 06, 2015 at 01:48:59PM +0100, wm4 wrote:
> > On Fri, 6 Nov 2015 12:58:23 +0100
> > Michael Niedermayer  wrote:
> >   
> > > On Fri, Nov 06, 2015 at 11:16:49AM +0100, wm4 wrote:  
> > > > On Fri, 6 Nov 2015 10:54:28 +0100
> > > > Michael Niedermayer  wrote:
> > > > 
> > > > > On Fri, Nov 06, 2015 at 08:52:32AM +0100, Nicolas George wrote:
> > > > > > Le sextidi 16 brumaire, an CCXXIV, Michael Niedermayer a écrit :
> > > > > >   
> > > > > > > iam with whatever default people prefer  
> > > > > > 
> > > > > > IIRC, the current default yields different results when rematrixing 
> > > > > > from
> > > > > > float to float and then converting from float to int than when 
> > > > > > doing both in
> > > > > > a single step.  
> > > > > 
> > > > > yes, OTOH float -> float rematrix + "inverse" float->float should be
> > > > > closer to the original than with the changed default
> > > > > The difference between the defaults is in volume of the output
> > > > > 
> > > > > 
> > > > > > I beliee this is not good.  
> > > > > 
> > > > > no its not good, though the alternative isnt really good either.
> > > > > All choices have some kind of disadvantage. There also would be the
> > > > > possibility of implementing 2 pass mode to maintain the volume as much
> > > > > as possible without cliping (but that could not easily be default)
> > > > > For the default, the question is what people prefer ...
> > > > 
> > > > Do you mean some kind of DRC?
> > > 
> > > no but that would be another possibility as well  
> > 
> > Then I don't know what you meant by this 2 pass mode. Can you explain?
> > I'm interested in obtaining better downmix.  
> 
> i just meant a 2pass mode that would linearly scale the output so
> volume is maintained between input and output as good as possible
> without cliping (that is apply the same scaling factor to all channels
> and all points in time)

I still don't understand. Isn't this done already?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] swresample/options: change rematrix_maxval default to 1.0

2015-11-07 Thread Michael Niedermayer
On Fri, Nov 06, 2015 at 01:48:59PM +0100, wm4 wrote:
> On Fri, 6 Nov 2015 12:58:23 +0100
> Michael Niedermayer  wrote:
> 
> > On Fri, Nov 06, 2015 at 11:16:49AM +0100, wm4 wrote:
> > > On Fri, 6 Nov 2015 10:54:28 +0100
> > > Michael Niedermayer  wrote:
> > >   
> > > > On Fri, Nov 06, 2015 at 08:52:32AM +0100, Nicolas George wrote:  
> > > > > Le sextidi 16 brumaire, an CCXXIV, Michael Niedermayer a écrit :
> > > > > > iam with whatever default people prefer
> > > > > 
> > > > > IIRC, the current default yields different results when rematrixing 
> > > > > from
> > > > > float to float and then converting from float to int than when doing 
> > > > > both in
> > > > > a single step.
> > > > 
> > > > yes, OTOH float -> float rematrix + "inverse" float->float should be
> > > > closer to the original than with the changed default
> > > > The difference between the defaults is in volume of the output
> > > > 
> > > >   
> > > > > I beliee this is not good.
> > > > 
> > > > no its not good, though the alternative isnt really good either.
> > > > All choices have some kind of disadvantage. There also would be the
> > > > possibility of implementing 2 pass mode to maintain the volume as much
> > > > as possible without cliping (but that could not easily be default)
> > > > For the default, the question is what people prefer ...  
> > > 
> > > Do you mean some kind of DRC?  
> > 
> > no but that would be another possibility as well
> 
> Then I don't know what you meant by this 2 pass mode. Can you explain?
> I'm interested in obtaining better downmix.

i just meant a 2pass mode that would linearly scale the output so
volume is maintained between input and output as good as possible
without cliping (that is apply the same scaling factor to all channels
and all points in time)

dynamic range compression would apply some non linear scaling and
thus strictly speaking add distortion / vary the volume compensation
over time, amplitude or frequency.
drc is better if maintaining absolute volume is more important than
relative volume

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

DNS cache poisoning attacks, popular search engine, Google internet authority
dont be evil, please


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] swresample/options: change rematrix_maxval default to 1.0

2015-11-06 Thread Michael Niedermayer
On Fri, Nov 06, 2015 at 08:52:32AM +0100, Nicolas George wrote:
> Le sextidi 16 brumaire, an CCXXIV, Michael Niedermayer a écrit :
> > iam with whatever default people prefer
> 
> IIRC, the current default yields different results when rematrixing from
> float to float and then converting from float to int than when doing both in
> a single step.

yes, OTOH float -> float rematrix + "inverse" float->float should be
closer to the original than with the changed default
The difference between the defaults is in volume of the output


> I beliee this is not good.

no its not good, though the alternative isnt really good either.
All choices have some kind of disadvantage. There also would be the
possibility of implementing 2 pass mode to maintain the volume as much
as possible without cliping (but that could not easily be default)
For the default, the question is what people prefer ...

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] swresample/options: change rematrix_maxval default to 1.0

2015-11-06 Thread wm4
On Fri, 6 Nov 2015 10:54:28 +0100
Michael Niedermayer  wrote:

> On Fri, Nov 06, 2015 at 08:52:32AM +0100, Nicolas George wrote:
> > Le sextidi 16 brumaire, an CCXXIV, Michael Niedermayer a écrit :  
> > > iam with whatever default people prefer  
> > 
> > IIRC, the current default yields different results when rematrixing from
> > float to float and then converting from float to int than when doing both in
> > a single step.  
> 
> yes, OTOH float -> float rematrix + "inverse" float->float should be
> closer to the original than with the changed default
> The difference between the defaults is in volume of the output
> 
> 
> > I beliee this is not good.  
> 
> no its not good, though the alternative isnt really good either.
> All choices have some kind of disadvantage. There also would be the
> possibility of implementing 2 pass mode to maintain the volume as much
> as possible without cliping (but that could not easily be default)
> For the default, the question is what people prefer ...

Do you mean some kind of DRC?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] swresample/options: change rematrix_maxval default to 1.0

2015-11-06 Thread wm4
On Fri, 6 Nov 2015 12:58:23 +0100
Michael Niedermayer  wrote:

> On Fri, Nov 06, 2015 at 11:16:49AM +0100, wm4 wrote:
> > On Fri, 6 Nov 2015 10:54:28 +0100
> > Michael Niedermayer  wrote:
> >   
> > > On Fri, Nov 06, 2015 at 08:52:32AM +0100, Nicolas George wrote:  
> > > > Le sextidi 16 brumaire, an CCXXIV, Michael Niedermayer a écrit :
> > > > > iam with whatever default people prefer
> > > > 
> > > > IIRC, the current default yields different results when rematrixing from
> > > > float to float and then converting from float to int than when doing 
> > > > both in
> > > > a single step.
> > > 
> > > yes, OTOH float -> float rematrix + "inverse" float->float should be
> > > closer to the original than with the changed default
> > > The difference between the defaults is in volume of the output
> > > 
> > >   
> > > > I beliee this is not good.
> > > 
> > > no its not good, though the alternative isnt really good either.
> > > All choices have some kind of disadvantage. There also would be the
> > > possibility of implementing 2 pass mode to maintain the volume as much
> > > as possible without cliping (but that could not easily be default)
> > > For the default, the question is what people prefer ...  
> > 
> > Do you mean some kind of DRC?  
> 
> no but that would be another possibility as well

Then I don't know what you meant by this 2 pass mode. Can you explain?
I'm interested in obtaining better downmix.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] swresample/options: change rematrix_maxval default to 1.0

2015-11-06 Thread Michael Niedermayer
On Fri, Nov 06, 2015 at 11:16:49AM +0100, wm4 wrote:
> On Fri, 6 Nov 2015 10:54:28 +0100
> Michael Niedermayer  wrote:
> 
> > On Fri, Nov 06, 2015 at 08:52:32AM +0100, Nicolas George wrote:
> > > Le sextidi 16 brumaire, an CCXXIV, Michael Niedermayer a écrit :  
> > > > iam with whatever default people prefer  
> > > 
> > > IIRC, the current default yields different results when rematrixing from
> > > float to float and then converting from float to int than when doing both 
> > > in
> > > a single step.  
> > 
> > yes, OTOH float -> float rematrix + "inverse" float->float should be
> > closer to the original than with the changed default
> > The difference between the defaults is in volume of the output
> > 
> > 
> > > I beliee this is not good.  
> > 
> > no its not good, though the alternative isnt really good either.
> > All choices have some kind of disadvantage. There also would be the
> > possibility of implementing 2 pass mode to maintain the volume as much
> > as possible without cliping (but that could not easily be default)
> > For the default, the question is what people prefer ...
> 
> Do you mean some kind of DRC?

no but that would be another possibility as well

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] swresample/options: change rematrix_maxval default to 1.0

2015-11-05 Thread Michael Niedermayer
On Wed, Nov 04, 2015 at 10:40:45PM -0500, Ganesh Ajjanagadde wrote:
> This changes the default to not clip, and thus matches libavresample as
> well.
> 
> Documentation has been accordingly updated (with some typo fixes).
> 
> API users have complained about this, see e.g
> https://github.com/mpv-player/mpv/commit/bf69edb1c2bac2ac11343d8e086f0540a0e4b5df.
> 
> Signed-off-by: Ganesh Ajjanagadde 
> ---
>  doc/resampler.texi  | 5 +++--
>  libswresample/options.c | 2 +-
>  2 files changed, 4 insertions(+), 3 deletions(-)

iam with whatever default people prefer

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] swresample/options: change rematrix_maxval default to 1.0

2015-11-05 Thread Nicolas George
Le sextidi 16 brumaire, an CCXXIV, Michael Niedermayer a écrit :
> iam with whatever default people prefer

IIRC, the current default yields different results when rematrixing from
float to float and then converting from float to int than when doing both in
a single step. I beliee this is not good.

Regards,

-- 
  Nicolas George
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] swresample/options: change rematrix_maxval default to 1.0

2015-11-04 Thread Ganesh Ajjanagadde
This changes the default to not clip, and thus matches libavresample as
well.

Documentation has been accordingly updated (with some typo fixes).

API users have complained about this, see e.g
https://github.com/mpv-player/mpv/commit/bf69edb1c2bac2ac11343d8e086f0540a0e4b5df.

Signed-off-by: Ganesh Ajjanagadde 
---
 doc/resampler.texi  | 5 +++--
 libswresample/options.c | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/resampler.texi b/doc/resampler.texi
index 2c448ae..698b433 100644
--- a/doc/resampler.texi
+++ b/doc/resampler.texi
@@ -66,8 +66,9 @@ Set rematrix volume. Default value is 1.0.
 
 @item rematrix_maxval
 Set maximum output value for rematrixing.
-This can be used to prevent clipping vs. preventing volumn reduction
-A value of 1.0 prevents cliping.
+This can be used to prevent clipping vs. preventing volume reduction
+A value of 1.0 prevents clipping.
+Default is 1.0.
 
 @item flags, swr_flags
 Set flags used by the converter. Default value is 0.
diff --git a/libswresample/options.c b/libswresample/options.c
index 2bf8ab1..6b6fd96 100644
--- a/libswresample/options.c
+++ b/libswresample/options.c
@@ -62,7 +62,7 @@ static const AVOption options[]={
 {"lfe_mix_level", "set LFE mix level"   , OFFSET(lfe_mix_level 
 ), AV_OPT_TYPE_FLOAT, {.dbl=0 }, -32, 32, 
PARAM},
 {"rmvol", "set rematrix volume" , 
OFFSET(rematrix_volume), AV_OPT_TYPE_FLOAT, {.dbl=1.0   }, 
-1000  , 1000  , PARAM},
 {"rematrix_volume"  , "set rematrix volume" , 
OFFSET(rematrix_volume), AV_OPT_TYPE_FLOAT, {.dbl=1.0   }, 
-1000  , 1000  , PARAM},
-{"rematrix_maxval"  , "set rematrix maxval" , 
OFFSET(rematrix_maxval), AV_OPT_TYPE_FLOAT, {.dbl=0.0   }, 0
  , 1000  , PARAM},
+{"rematrix_maxval"  , "set rematrix maxval" , 
OFFSET(rematrix_maxval), AV_OPT_TYPE_FLOAT, {.dbl=1.0   }, 0
  , 1000  , PARAM},
 
 {"flags", "set flags"   , OFFSET(flags 
 ), AV_OPT_TYPE_FLAGS, {.i64=0 }, 0  , UINT_MAX  , 
PARAM, "flags"},
 {"swr_flags", "set flags"   , OFFSET(flags 
 ), AV_OPT_TYPE_FLAGS, {.i64=0 }, 0  , UINT_MAX  , 
PARAM, "flags"},
-- 
2.6.2

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel