int yuv2rgb_altivec_init_tables (SwsContext *c, const int inv_table[4])
void yuv2rgb_altivec_init_tables (SwsContext *c, const int inv_table[4])
int yuv2rgb_altivec_init_tables (SwsContext *c, const int inv_table[4]){  vector signed short    CY  = (vector signed short)(0x7fff),    CRV = (vector signed short)(22972),    CBU = (vector signed short)(29029),    CGU = (vector signed short)(-11276),    CGV = (vector signed short)(-23400),    OY;  vector unsigned short CSHIFT = (vector unsigned short)(1);  vector signed short Y0;  int brightness = c->brightness,  contrast = c->contrast,  saturation = c->saturation;  int64_t crv  __attribute__ ((aligned(16)));  int64_t cbu  __attribute__ ((aligned(16)));  int64_t cgu  __attribute__ ((aligned(16)));  int64_t cgv  __attribute__ ((aligned(16)));  short tmp __attribute__ ((aligned(16)));  int64_t cy  = (1<<16)-1;  int64_t oy  = 0;  if ((c->flags & SWS_CPU_CAPS_ALTIVEC) == 0)    return;  crv = inv_table[0];  cbu = inv_table[1];  cgu = inv_table[2];  cgv = inv_table[3];#if 0  printf ("crv: %hvx\n", CRV);  printf ("cbu: %hvx\n", CBU);  printf ("cgv: %hvx\n", CGV);  printf ("cgu: %hvx\n", CGU);  printf ("contrast: %d,   brightness: %d, saturation: %d\n", contrast, brightness, saturation);  printf("%lld %lld %lld %lld %lld\n", cy, crv, cbu, cgu, cgv);#endif  cy = (cy *contrast             )>>17;  crv= (crv*contrast * saturation)>>32;  cbu= (cbu*contrast * saturation)>>32;  cgu= (cgu*contrast * saturation)>>32;  cgv= (cgv*contrast * saturation)>>32;  oy -= 256*brightness;  //printf("%llx %llx %llx %llx %llx\n", cy, crv, cbu, cgu, cgv);  //  vector signed short CBU,CRV,CGU,CGY,CY;  tmp = cy;  CY = vec_lde (0, &tmp);  CY  = vec_splat (CY, 0);  tmp = oy;  OY = vec_lde (0, &tmp);  OY  = vec_splat (OY, 0);  tmp = crv>>3;  CRV = vec_lde (0, &tmp);  CRV  = vec_splat (CRV, 0);  tmp = cbu>>3;  CBU = vec_lde (0, &tmp);  CBU  = vec_splat (CBU, 0);  tmp = -(cgu>>1);  CGU = vec_lde (0, &tmp);  CGU  = vec_splat (CGU, 0);  tmp = -(cgv>>1);  CGV = vec_lde (0, &tmp);  CGV  = vec_splat (CGV, 0);  CSHIFT = (vector unsigned short)(2);#if 1  c->CSHIFT = CSHIFT;  c->CY = CY;  c->OY = OY;  c->CRV = CRV;  c->CBU = CBU;  c->CGU = CGU;  c->CGV = CGV;#endif#if 1  printf ("cy:  %hvx\n", CY);  printf ("oy:  %hvx\n", OY);  printf ("crv: %hvx\n", CRV);  printf ("cbu: %hvx\n", CBU);  printf ("cgv: %hvx\n", CGV);  printf ("cgu: %hvx\n", CGU);#endif}