[Ffmpeg-cvslog] r7754 - trunk/libavcodec/cook.c

Benjamin Larsson banan
Mon Jan 29 10:27:48 CET 2007


M?ns Rullg?rd wrote:

>banan <subversion at mplayerhq.hu> writes:
>
>  
>
>>Author: banan
>>Date: Mon Jan 29 09:58:03 2007
>>New Revision: 7754
>>
>>Modified:
>>   trunk/libavcodec/cook.c
>>
>>Log:
>>Kill a warning and don't use modulus.
>>
>>Modified: trunk/libavcodec/cook.c
>>==============================================================================
>>--- trunk/libavcodec/cook.c	(original)
>>+++ trunk/libavcodec/cook.c	Mon Jan 29 09:58:03 2007
>>@@ -303,7 +303,7 @@
>>      *     (int64_t)out[i] = 0x37c511f237c511f2^be2me_64(int64_t)in[i]);
>>      * Buffer alignment needs to be checked. */
>>
>>-    off = (uint32_t)inbuffer % 4;
>>+    off = (int)((long)inbuffer & 3);
>>    
>>
>
>That (int) cast isn't needed.
>
>  
>

Well I'm unsure how 32 bit platforms will treat it, this way should be
safe for both 32bits and 64bits. Feel free to change it if I'm wrong.

MvH
Benjamin Larsson

-- 
new tiny signature





More information about the ffmpeg-cvslog mailing list