Re: [FFmpeg-devel] [PATCH] swr: do not reject channel layouts that use channel 63

2015-10-28 Thread wm4
On Mon, 26 Oct 2015 20:31:00 +0100
Michael Niedermayer  wrote:

> On Sun, Oct 25, 2015 at 06:31:02PM +0100, wm4 wrote:
> > Channel layouts are essentially uint64_t, and every value is valid.
> > ---
> >  libswresample/options.c | 8 
> >  1 file changed, 4 insertions(+), 4 deletions(-)  
> 
> this LGTM if no unsiged int64 support is added to avoptions

Pushed. Not very ideal, but I see no better way to do this right now
(plus libavresample also does it this way).
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] swr: do not reject channel layouts that use channel 63

2015-10-26 Thread wm4
On Mon, 26 Oct 2015 20:31:00 +0100
Michael Niedermayer  wrote:

> On Sun, Oct 25, 2015 at 06:31:02PM +0100, wm4 wrote:
> > Channel layouts are essentially uint64_t, and every value is valid.
> > ---
> >  libswresample/options.c | 8 
> >  1 file changed, 4 insertions(+), 4 deletions(-)  
> 
> this LGTM if no unsiged int64 support is added to avoptions

When I wanted to give a try, I noticed that the min/max fields are
double, and that double doesn't have enough mantissa bits to cover the
full range. So adding a uint64 type for this purpose would be just as
broken.

I'm wonder whether setting min/max to -inf/inf would make sense. In a
way it'd be better than INT64_MAX (which is a lie, because after
rounding it's INT64_MAX+1), but in the end it's the same thing.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] swr: do not reject channel layouts that use channel 63

2015-10-26 Thread Michael Niedermayer
On Sun, Oct 25, 2015 at 06:31:02PM +0100, wm4 wrote:
> Channel layouts are essentially uint64_t, and every value is valid.
> ---
>  libswresample/options.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)

this LGTM if no unsiged int64 support is added to avoptions

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

What does censorship reveal? It reveals fear. -- Julian Assange


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


Re: [FFmpeg-devel] [PATCH] swr: do not reject channel layouts that use channel 63

2015-10-26 Thread Derek Buitenhuis
On 10/25/2015 5:31 PM, wm4 wrote:
> Channel layouts are essentially uint64_t, and every value is valid.
> ---
>  libswresample/options.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)

Probably needs a micro version bump.

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


[FFmpeg-devel] [PATCH] swr: do not reject channel layouts that use channel 63

2015-10-25 Thread wm4
Channel layouts are essentially uint64_t, and every value is valid.
---
 libswresample/options.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libswresample/options.c b/libswresample/options.c
index 0bcb102..2bf8ab1 100644
--- a/libswresample/options.c
+++ b/libswresample/options.c
@@ -51,10 +51,10 @@ static const AVOption options[]={
 {"out_sample_fmt"   , "set output sample format", 
OFFSET(out_sample_fmt ), AV_OPT_TYPE_SAMPLE_FMT , {.i64=AV_SAMPLE_FMT_NONE}, -1 
  , INT_MAX, PARAM},
 {"tsf"  , "set internal sample format"  , 
OFFSET(user_int_sample_fmt), AV_OPT_TYPE_SAMPLE_FMT , 
{.i64=AV_SAMPLE_FMT_NONE}, -1   , INT_MAX, PARAM},
 {"internal_sample_fmt"  , "set internal sample format"  , 
OFFSET(user_int_sample_fmt), AV_OPT_TYPE_SAMPLE_FMT , 
{.i64=AV_SAMPLE_FMT_NONE}, -1   , INT_MAX, PARAM},
-{"icl"  , "set input channel layout", 
OFFSET(user_in_ch_layout ), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=0   }, 0  
  , INT64_MAX , PARAM, "channel_layout"},
-{"in_channel_layout", "set input channel layout", 
OFFSET(user_in_ch_layout ), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=0   }, 0  
  , INT64_MAX , PARAM, "channel_layout"},
-{"ocl"  , "set output channel layout"   , 
OFFSET(user_out_ch_layout), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=0   }, 0  
  , INT64_MAX , PARAM, "channel_layout"},
-{"out_channel_layout"   , "set output channel layout"   , 
OFFSET(user_out_ch_layout), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=0   }, 0  
  , INT64_MAX , PARAM, "channel_layout"},
+{"icl"  , "set input channel layout", 
OFFSET(user_in_ch_layout ), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=0   }, 
INT64_MIN, INT64_MAX , PARAM, "channel_layout"},
+{"in_channel_layout", "set input channel layout", 
OFFSET(user_in_ch_layout ), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=0   }, 
INT64_MIN, INT64_MAX , PARAM, "channel_layout"},
+{"ocl"  , "set output channel layout"   , 
OFFSET(user_out_ch_layout), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=0   }, 
INT64_MIN, INT64_MAX , PARAM, "channel_layout"},
+{"out_channel_layout"   , "set output channel layout"   , 
OFFSET(user_out_ch_layout), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=0   }, 
INT64_MIN, INT64_MAX , PARAM, "channel_layout"},
 {"clev" , "set center mix level", OFFSET(clev  
 ), AV_OPT_TYPE_FLOAT, {.dbl=C_30DB}, -32, 32, 
PARAM},
 {"center_mix_level" , "set center mix level", OFFSET(clev  
 ), AV_OPT_TYPE_FLOAT, {.dbl=C_30DB}, -32, 32, 
PARAM},
 {"slev" , "set surround mix level"  , OFFSET(slev  
 ), AV_OPT_TYPE_FLOAT, {.dbl=C_30DB}, -32, 32, 
PARAM},
-- 
2.6.1

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