On 3/27/13, Brad O'Hearne <[email protected]> wrote: > On Mar 27, 2013, at 1:08 PM, Paul B Mahol <[email protected]> wrote: >> Than use AV_SAMPLE_FMT_FLTP, you do not need to manually interleave >> samples. >> Each channel samples are put into separate frame->data[X] where X is >> channel >> number starting from 0. > > Hey thanks for the idea, Paul, I'll give it a shot! The resampling will > still be converting floats to signed 16-bits, so I am very interested in > exactly the conversion that is taking place here. I would think it shouldn't > be just casting or truncating, it should be scaling the sample value based > on the available storage space. Given 32-bit to 16-bit conversion, and that: > > Signed 16-bit (I'm assuming integral) = From -32,768 to 32,767, or from > -(2^15) to 2^15 - 1 > > and > > 32-bit float = (I'm just going to post a Wikipedia link here for brevity, > but a float has one bit for sign, 8 bits for exponent, and 23 bits for float > data): http://en.wikipedia.org/wiki/Single-precision_floating-point_format > > So I'm curious -- how is libswresample converting from float to signed > 16-bit?
There is source, why dont you take look yourself. > > Thx, > > Brad > _______________________________________________ > Libav-user mailing list > [email protected] > http://ffmpeg.org/mailman/listinfo/libav-user > _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
