[FFmpeg-devel] [PATCH] VC-1 MMX DSP functions

Christophe GISQUET christophe.gisquet
Sat Jul 7 15:55:16 CEST 2007


Hello,

Zuxy Meng a ?crit :
>>> /tmp/ccaopxZe.s:25763: Error: `0(%rdx,%ecx)' is not a valid base/index
>>> expression
>> int where long int should be used. This probably was in the first patch,
>> but I forgot to reinsert a cast when refactoring vc1dsp_mmx.c.
> 
> long only works for LP64; intptr_t is safer.

Then there are some modifications to be down throughout libavcodec. I
even wonder if any occurrence of something like "r"(stride) (or
line_width, or ...) should have that cast for safety.

At least for an automated search in i386 folder (my code included):
grep -rn '[SDrmRg]" *((long)' libavcodec/i386 | grep -v svn | wc -l
97

Could be fixed with:
sed -i 's|\([SDrmRg]" *((\)long)|\1intptr_t)|g' libavcodec/i386/*.[ch]

Best regards,
-- 
Christophe GISQUET




More information about the ffmpeg-devel mailing list