Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-24 Thread Justin Ruggles
On 04/24/2011 04:55 PM, Ronald S. Bultje wrote: > Hi, > > On Apr 24, 2011, at 2:58 PM, Justin Ruggles wrote: >> I was able to get this working. So after the change, here is what the >> ffmpeg behavior would be when using the request_sample_fmt version of >> the patch. >> >> $ ffmpeg -i in.ac3 -

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-24 Thread Ronald S. Bultje
Hi, On Apr 24, 2011, at 2:58 PM, Justin Ruggles wrote: > I was able to get this working. So after the change, here is what the > ffmpeg behavior would be when using the request_sample_fmt version of > the patch. > > $ ffmpeg -i in.ac3 -acodec pcm_f32le -y out.wav > decoder initialized to s16 du

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-24 Thread Justin Ruggles
On 04/24/2011 12:13 PM, Justin Ruggles wrote: > On 04/24/2011 04:54 AM, Måns Rullgård wrote: > >> Justin Ruggles writes: >> >>> On 04/23/2011 11:30 AM, Måns Rullgård wrote: >>> Diego Biurrun writes: > On Fri, Apr 22, 2011 at 10:19:44PM -0400, Justin Ruggles wrote: >> >> Ba

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-24 Thread Justin Ruggles
On 04/24/2011 04:54 AM, Måns Rullgård wrote: > Justin Ruggles writes: > >> On 04/23/2011 11:30 AM, Måns Rullgård wrote: >> >>> Diego Biurrun writes: >>> On Fri, Apr 22, 2011 at 10:19:44PM -0400, Justin Ruggles wrote: > > Based on patches by clsid2 in ffdshow-tryout. > > ---

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-24 Thread madshi
2011/4/24 Måns Rullgård > Anyway, why this patch at all if it's temporary? @Måns, let me ask you a question: Are you aware of that the proper way to reduce bitdepth in digital data processing (both video and audio) includes dithering? If you're not aware of that, then please do some research. P

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-24 Thread Måns Rullgård
Justin Ruggles writes: > On 04/23/2011 11:30 AM, Måns Rullgård wrote: > >> Diego Biurrun writes: >> >>> On Fri, Apr 22, 2011 at 10:19:44PM -0400, Justin Ruggles wrote: Based on patches by clsid2 in ffdshow-tryout. --- a/configure +++ b/configure @@ -95,6 +95,7 @@ C

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-23 Thread Alex Converse
On Sat, Apr 23, 2011 at 11:37 AM, Ronald S. Bultje wrote: > Hi, > > On Apr 23, 2011, at 1:59 PM, Alex Converse wrote: > >> On Sat, Apr 23, 2011 at 10:37 AM, Justin Ruggles >> wrote: >> >> [] >> >>> >>> It works if I just leave the code as-is and scale at the end before >>> returning, but tha

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-23 Thread Ronald S. Bultje
Hi, On Apr 23, 2011, at 1:59 PM, Alex Converse wrote: > On Sat, Apr 23, 2011 at 10:37 AM, Justin Ruggles > wrote: > > [] > >> >> It works if I just leave the code as-is and scale at the end before >> returning, but that's not ideal since we can save some time by applying >> the appropria

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-23 Thread Justin Ruggles
On 04/23/2011 01:59 PM, Alex Converse wrote: > On Sat, Apr 23, 2011 at 10:37 AM, Justin Ruggles > wrote: > > [] > >> >> It works if I just leave the code as-is and scale at the end before >> returning, but that's not ideal since we can save some time by applying >> the appropriate scale dur

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-23 Thread Alex Converse
On Sat, Apr 23, 2011 at 10:37 AM, Justin Ruggles wrote: [] > > It works if I just leave the code as-is and scale at the end before > returning, but that's not ideal since we can save some time by applying > the appropriate scale during decoding. > > Also, where can I find or create samples w

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-23 Thread Justin Ruggles
On 04/23/2011 01:37 PM, Justin Ruggles wrote: > On 04/22/2011 10:19 PM, Justin Ruggles wrote: > >> @@ -574,7 +578,11 @@ static av_cold int aac_decode_init(AVCodecContext >> *avctx) >> // 60- Required to scale values to the correct range [-32768,32767] >> // for float to int

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-23 Thread Justin Ruggles
On 04/22/2011 10:19 PM, Justin Ruggles wrote: > @@ -574,7 +578,11 @@ static av_cold int aac_decode_init(AVCodecContext *avctx) > // 60- Required to scale values to the correct range [-32768,32767] > // for float to int16 conversion. (1 << (60 / 4)) == 32768 > ac->sf_scal

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-23 Thread Justin Ruggles
On 04/23/2011 11:30 AM, Måns Rullgård wrote: > Diego Biurrun writes: > >> On Fri, Apr 22, 2011 at 10:19:44PM -0400, Justin Ruggles wrote: >>> >>> Based on patches by clsid2 in ffdshow-tryout. >>> >>> --- a/configure >>> +++ b/configure >>> @@ -95,6 +95,7 @@ Configuration options: >>>--disabl

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-23 Thread Måns Rullgård
Diego Biurrun writes: > On Fri, Apr 22, 2011 at 10:19:44PM -0400, Justin Ruggles wrote: >> >> Based on patches by clsid2 in ffdshow-tryout. >> >> --- a/configure >> +++ b/configure >> @@ -95,6 +95,7 @@ Configuration options: >>--disable-mpegaudio-hp faster (but less accurate) MPEG audio d

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-23 Thread Ronald S. Bultje
Hi, On Sat, Apr 23, 2011 at 8:10 AM, Diego Biurrun wrote: > On Sat, Apr 23, 2011 at 08:03:17AM -0400, Ronald S. Bultje wrote: >> >> On Sat, Apr 23, 2011 at 7:24 AM, Diego Biurrun wrote: >> > Something like this at the top of the file (note that the names could >> > likely be improved): >> > >> >

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-23 Thread Diego Biurrun
On Sat, Apr 23, 2011 at 08:03:17AM -0400, Ronald S. Bultje wrote: > > On Sat, Apr 23, 2011 at 7:24 AM, Diego Biurrun wrote: > > Something like this at the top of the file (note that the names could > > likely be improved): > > > > #if CONFIG_AUDIO_FLOAT > > #define AV_SAMPLE_FMT_NATIVE AV_SAMPLE_

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-23 Thread Ronald S. Bultje
Hi, On Sat, Apr 23, 2011 at 7:24 AM, Diego Biurrun wrote: > Something like this at the top of the file (note that the names could > likely be improved): > > #if CONFIG_AUDIO_FLOAT > #define AV_SAMPLE_FMT_NATIVE AV_SAMPLE_FMT_FLT > #else > #define AV_SAMPLE_FMT_NATIVE AV_SAMPLE_FMT_S16 > #endif >

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-23 Thread Benjamin Larsson
On 04/23/2011 01:24 PM, Diego Biurrun wrote: > On Sat, Apr 23, 2011 at 01:16:45PM +0200, Benjamin Larsson wrote: >> On 04/23/2011 12:18 PM, Diego Biurrun wrote: >>> On Fri, Apr 22, 2011 at 10:19:44PM -0400, Justin Ruggles wrote: Based on patches by clsid2 in ffdshow-tryout. ---

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-23 Thread Diego Biurrun
On Sat, Apr 23, 2011 at 01:16:45PM +0200, Benjamin Larsson wrote: > On 04/23/2011 12:18 PM, Diego Biurrun wrote: > > On Fri, Apr 22, 2011 at 10:19:44PM -0400, Justin Ruggles wrote: > >> > >> Based on patches by clsid2 in ffdshow-tryout. > >> > >> --- a/libavcodec/aacdec.c > >> +++ b/libavcodec/aacd

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-23 Thread Benjamin Larsson
On 04/23/2011 04:19 AM, Justin Ruggles wrote: > > Based on patches by clsid2 in ffdshow-tryout. > --- > configure |2 ++ > libavcodec/aacdec.c | 31 +++ > libavcodec/ac3dec.c | 35 ++- > libavcodec/dca.c

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-23 Thread Benjamin Larsson
On 04/23/2011 12:18 PM, Diego Biurrun wrote: > On Fri, Apr 22, 2011 at 10:19:44PM -0400, Justin Ruggles wrote: >> >> Based on patches by clsid2 in ffdshow-tryout. >> >> --- a/configure >> +++ b/configure >> @@ -95,6 +95,7 @@ Configuration options: >>--disable-mpegaudio-hp faster (but less acc

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-23 Thread Diego Biurrun
On Fri, Apr 22, 2011 at 10:19:44PM -0400, Justin Ruggles wrote: > > Based on patches by clsid2 in ffdshow-tryout. > > --- a/configure > +++ b/configure > @@ -95,6 +95,7 @@ Configuration options: >--disable-mpegaudio-hp faster (but less accurate) MPEG audio decoding > [no] > + --enable-aud

Re: [libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-22 Thread Justin Ruggles
On 04/22/2011 10:19 PM, Justin Ruggles wrote: > diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c > index 015ebae..1ae25ef 100644 > --- a/libavcodec/ac3dec.c > +++ b/libavcodec/ac3dec.c > @@ -24,6 +24,8 @@ > * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 > USA >

[libav-devel] [PATCH 2/2] Add floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.

2011-04-22 Thread Justin Ruggles
Based on patches by clsid2 in ffdshow-tryout. --- configure |2 ++ libavcodec/aacdec.c | 31 +++ libavcodec/ac3dec.c | 35 ++- libavcodec/dca.c| 28 +--- libavcodec/vorbis_d