[FFmpeg-devel] [PATCH] audio conversion clipping/overflows

Michael Niedermayer michaelni
Tue Mar 2 12:36:23 CET 2010


On Mon, Mar 01, 2010 at 09:18:58AM -0500, Ronald S. Bultje wrote:
> Hi,
> 
> float 1.0 rounds to int INT_MIN (whatever int size). This leads to
> considerable audio clipping artifacts.
> 
> Attached patch is a lame attempt of mine to fix this. It probably
> makes the code slower, so sue me. :-).
> 
> Ronald

>  libavcodec/audioconvert.c |   18 ++++++++++++------
>  libavutil/common.h        |   11 +++++++++++
>  2 files changed, 23 insertions(+), 6 deletions(-)
> 3cbfbc44e4362ec7017ebdc358b3021319023bf1  aconv.patch

ok but you know this needs optimizations
also if you apply this, make sure you remove the cliping from every decoder
that matches SAMPLE_FMT_FLT

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

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100302/3df48e31/attachment.pgp>



More information about the ffmpeg-devel mailing list