[FFmpeg-devel] [PATCH] Fix 4XM decoding on big-endian and unaligned reads

Michael Niedermayer michaelni
Fri Nov 12 13:23:05 CET 2010


On Thu, Nov 11, 2010 at 09:55:27PM +0100, Vitor Sessak wrote:
> On 11/11/2010 09:37 PM, Reimar D?ffinger wrote:
>> On Thu, Nov 11, 2010 at 09:31:51PM +0100, Vitor Sessak wrote:
>>> +#define LE_CENTRIC_MUL(dst, src, scale, dc) \
>>> +    { \
>>> +        *((uint32_t *) (dst)) = AV_RL32(src) * (scale) + (dc); \
>>> +    }
>>
>> Regardless of my other comment, using AV_WN32A would avoid any potential aliasing
>> issues.
>
> Thanks for the tip, I didn't know of AN_RN32A.
>
>> Also if you already add {} to the macro you could go for the proper
>> do { .. } while (0) (or remove the {}, I don't really care).
>
> Is there any advantage for one or other way? I find it more readable  
> without the do ... while(0).

iam not a fan of do/whiled macros due to the reduction in readability
about the patch&suggestions commit whatever is fastest and works


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

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101112/9df2364d/attachment.pgp>



More information about the ffmpeg-devel mailing list