website logo
Auteur
avatar
thellier

Forum » » Création-Développement » » Développeurs, pourquoi ne pas utiliser l'Altivec ?


Posté : 24-06-2013 14:30 icone du post

Ton document
http://www.amiga-ng.org/resources/OptimizeForAltivec.pdf
est particuliérement impressionnant : je le sauvegarde dans un coin

Voici un exemple simple de prog Altivec pour faire du YUV vers RGB (=conversion d'une image video)
à recompiler/tester sur Amiga PPC
https://github.com/fungos/seed/blob/master/contrib/oggplay/ppc/ogg play_yuv2rgb_altivec.c

Les structures en parametres sont définies ainsi

struct _OggPlayYUVChannels
structure holds pointers to y, u, v channels

unsigned char * ptru U channel.
unsigned char * ptrv V channel.
unsigned char * ptry Y channel.
int uv_height the height of the U/V plane
int uv_width the width of the U/V plane
int y_height the height of the Y plane
int y_width the width of the Y plane

struct _OggPlayRGBChannels
structure holds pointers to RGB packets

unsigned char * ptro the RGB stream in the requested packaging format
int rgb_height height of the RGB frame
int rgb_width width of the RGB frame

Cet article provient de Le site des utilisateurs francophones actuels et futurs d'AmigaOS 4.x
https://amiga-ng.org/viewtopic.php?topic=1578&forum=14