[FFmpeg-devel] [PATCH] Fix 4XM decoding on big-endian and unaligned reads
Vitor Sessak
vitor1001
Fri Nov 12 20:57:28 CET 2010
On 11/12/2010 01:23 PM, Michael Niedermayer wrote:
> 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
Applied with Reimar's suggestion.
-Vitor
More information about the ffmpeg-devel
mailing list