comparison ppc/mpegvideo_altivec.c @ 6365:80c7e9c015c6 libavcodec

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 %
author gpoirier
date Mon, 18 Feb 2008 21:35:31 +0000
parents 80103098c797
children 81d6ff9da713
comparison
equal deleted inserted replaced
6364:b2d487e54407 6365:80c7e9c015c6
606 extern void idct_put_altivec(uint8_t *dest, int line_size, int16_t *block); 606 extern void idct_put_altivec(uint8_t *dest, int line_size, int16_t *block);
607 extern void idct_add_altivec(uint8_t *dest, int line_size, int16_t *block); 607 extern void idct_add_altivec(uint8_t *dest, int line_size, int16_t *block);
608 608
609 void MPV_common_init_altivec(MpegEncContext *s) 609 void MPV_common_init_altivec(MpegEncContext *s)
610 { 610 {
611 if (mm_flags & MM_ALTIVEC == 0) return;
612
611 if (s->avctx->lowres==0) 613 if (s->avctx->lowres==0)
612 { 614 {
613 if ((s->avctx->idct_algo == FF_IDCT_AUTO) || 615 if ((s->avctx->idct_algo == FF_IDCT_AUTO) ||
614 (s->avctx->idct_algo == FF_IDCT_ALTIVEC)) 616 (s->avctx->idct_algo == FF_IDCT_ALTIVEC))
615 { 617 {