[FFmpeg-devel] [PATCH] Fix ffmpeg crash on G3 based computers introduced with revision 10637

Patrice Bensoussan patrice.bensoussan
Sat Feb 16 00:27:29 CET 2008


On 15 Feb 2008, at 21:33, Guillaume Poirier wrote:

> Hello folks,
>
> Le 14 f?vr. 08 ? 00:38, Patrice Bensoussan a ?crit :
>
>>
>> On 9 Feb 2008, at 18:13, Michael Niedermayer wrote:
>>
>>> On Sat, Feb 09, 2008 at 06:08:34PM +0000, Patrice Bensoussan wrote:
>>>> what about my patch? :)
>>>
>>> iam not altivec maintainer :)
>>
>> Just a quick reminder if there is any altivec maintainer
>> around... ;-)  who would that be? Guillaume?
>
> I'd prefer the attached patch.
>
> Please have a look at it, and test it.

I can't test it as I only have an intel based Mac now, but patch looks  
wrong... (missing not in front of has_altivec()). Otherwise, I am ok  
with it...

Patrice

Index: libavcodec/ppc/mpegvideo_altivec.c
===================================================================
--- libavcodec/ppc/mpegvideo_altivec.c	(r??vision 11959)
+++ libavcodec/ppc/mpegvideo_altivec.c	(copie de travail)
@@ -606,8 +606,12 @@
  extern void idct_put_altivec(uint8_t *dest, int line_size, int16_t  
*block);
  extern void idct_add_altivec(uint8_t *dest, int line_size, int16_t  
*block);

+extern int has_altivec(void);
+
  void MPV_common_init_altivec(MpegEncContext *s)
  {
+    if (!has_altivec()) return;
+
      if (s->avctx->lowres==0)
      {
          if ((s->avctx->idct_algo == FF_IDCT_AUTO) ||







More information about the ffmpeg-devel mailing list