[FFmpeg-cvslog] r12137 - trunk/libavcodec/ppc/mpegvideo_altivec.c

Måns Rullgård mans
Tue Feb 19 00:17:59 CET 2008


Diego Biurrun <diego at biurrun.de> writes:

> On Mon, Feb 18, 2008 at 09:53:20PM +0000, M?ns Rullg?rd wrote:
>> gpoirier <subversion at mplayerhq.hu> writes:
>> 
>> > Log:
>> > fix crash on non-AltiVec powered machines: MPV_common_init_altivec doesn't check mm_flags
>> > Patch by Alexander Strange %astrange A ithinksw PP com %
>> >
>> > --- trunk/libavcodec/ppc/mpegvideo_altivec.c	(original)
>> > +++ trunk/libavcodec/ppc/mpegvideo_altivec.c	Mon Feb 18 22:35:31 2008
>> > @@ -608,6 +608,8 @@ extern void idct_add_altivec(uint8_t *de
>> >
>> >  void MPV_common_init_altivec(MpegEncContext *s)
>> >  {
>> > +     if (mm_flags & MM_ALTIVEC == 0) return;
>> 
>> This is wrong.  Binary & has lower precedence than ==, so this is
>> effectively saying if(0) return, or in other words, it's a no-op.
>
> gcc already said so:
>
> ppc/mpegvideo_altivec.c: In function #MPV_common_init_altivec#:
> ppc/mpegvideo_altivec.c:606: warning: suggest parentheses around comparison in operand of &
>
> Warnings should not be ignored I guess...

And the suggestions they make should not always be followed.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-cvslog mailing list