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

Michael Niedermayer michaelni
Tue Mar 30 23:29:33 CEST 2010


On Tue, Mar 30, 2010 at 04:53:08PM -0400, Ronald S. Bultje wrote:
> Hi,
> 
> On Mon, Mar 29, 2010 at 7:07 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Sat, Mar 27, 2010 at 12:19:56PM -0400, Ronald S. Bultje wrote:
> >> @@ -226,14 +226,20 @@
> >> ? ? ? ? ?else CONV(SAMPLE_FMT_S32, int32_t, SAMPLE_FMT_S32, ?*(const int32_t*)pi)
> >> ? ? ? ? ?else CONV(SAMPLE_FMT_FLT, float ?, SAMPLE_FMT_S32, ?*(const int32_t*)pi*(1.0 / (1<<31)))
> >> ? ? ? ? ?else CONV(SAMPLE_FMT_DBL, double , SAMPLE_FMT_S32, ?*(const int32_t*)pi*(1.0 / (1<<31)))
> >> - ? ? ? ?else CONV(SAMPLE_FMT_U8 , uint8_t, SAMPLE_FMT_FLT, lrintf(*(const float*)pi * (1<<7)) + 0x80)
> >> - ? ? ? ?else CONV(SAMPLE_FMT_S16, int16_t, SAMPLE_FMT_FLT, lrintf(*(const float*)pi * (1<<15)))
> >> - ? ? ? ?else CONV(SAMPLE_FMT_S32, int32_t, SAMPLE_FMT_FLT, lrintf(*(const float*)pi * (1<<31)))
> >> + ? ? ? ?else CONV(SAMPLE_FMT_U8 , uint8_t, SAMPLE_FMT_FLT, av_clip_uint8(lrintf(*(const float*)pi * (1<<7)) + 0x80))       
> >> + ? ? ? ?else CONV(SAMPLE_FMT_S16, int16_t, SAMPLE_FMT_FLT,
> >> + ? ? ? ? ? ? ? ? ?av_clip_int16(lrintf(*(const float*)pi * (1<<15))))
> >> + ? ? ? ?else CONV(SAMPLE_FMT_S32, int32_t, SAMPLE_FMT_FLT,
> >> + ? ? ? ? ? ? ? ? ?av_clipl_int32(llrintf(*(const float*)pi * (1<<31))))
> >
> > i prefer keeping the linebreaking consistemt, aka none.
> 
> (Since some of the lines are really long,) would you like me to break
> all lines (including those I don't touch in this patch) in a cosmetic
> patch first?

error "really long" is not an integer


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

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- 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/20100330/f146bb1b/attachment.pgp>



More information about the ffmpeg-devel mailing list