[FFmpeg-devel] [PATCH] wmapro decoder
Mon Jun 22 22:15:15 CEST 2009
Sascha Sommer wrote:
> On Sonntag, 21. Juni 2009, Vitor Sessak wrote:
>> Sascha Sommer wrote:
>>> Hi Vitor,
>>> thanks for your comments.
>>>>> The code still outputs shorts. Float produced clicks all around the
>>>>> place. I'm not sure yet if the problem is in my code or in ffmpeg.
>>>> It looks like it works for me, see attached.
>>> So your code does not produce clicks at second 16-18 for you with the
>>> sample file you mentioned below? It does for me when I'm using ffmpeg to
>>> produce a 16-bit wav file and play that back with MPlayer.
>> That's due to the lack of clipping. The attached patch is bit-exact for
>> wav output for me for the sample
>> oni%20(Scherzo)-2.wma .
>> Note that outputting floats can make the "Output buffer too small" error
>> twice as bad, since the decoder will need an output buffer twice the size.
> The patch is similar to the one you submitted the first time, isn't it?
> Shouldn't it add clipping for audioconvert.c ?
> The problem here is that float audio ranges from -1.0 to 1.0 and the converter
> multiplies with 1<<15 so the audio will be from -32768 to 32768. The later
> value written as int16 becomes -32768. This causes the annoying clicks.
> That means we need to clip the float values in the wmapro decoder and we need
> to clip the integer values in audioconvert.c
> The output buffer too small problem also needs to be fixed some day. Will it
> be ok to increase the audio buffer or is this also a candidate for
Maybe we should use get_buffer for audio as well.
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-devel