LOAD_LINE(0); LOAD_LINE(1); LOAD_LINE(2); LOAD_LINE(3); LOAD_LINE(4); LOAD_LINE(5); LOAD_LINE(6); LOAD_LINE(7);
static inline int vertClassify_altivec(uint8_t src[], int stride, PPContext *c) {  /*    this code makes no assumption on src or stride.    One could remove the recomputation of the perm    vector by assuming (stride % 16) == 0, unfortunately    this is not always true.  */  register int y;  short __attribute__ ((aligned(16))) data[8];  int numEq;  uint8_t *src2 = src;  vector signed short v_dcOffset;  vector signed short v2QP;  vector unsigned short v4QP;  vector unsigned short v_dcThreshold;  int two_vectors = ((((unsigned long)src2 % 16) > 8) || (stride % 16)) ? 1 : 0;  const vector signed int zero = vec_splat_s32(0);  const vector signed short mask = vec_splat_s16(1);  vector signed int v_numEq = vec_splat_s32(0);	  data[0] = ((c->nonBQP*c->ppMode.baseDcDiff)>>8) + 1;  data[1] = data[0] * 2 + 1;  data[2] = c->QP * 2;  data[3] = c->QP * 4;  vector signed short v_data = vec_ld(0, data);  v_dcOffset = vec_splat(v_data, 0);  v_dcThreshold = (vector unsigned short)vec_splat(v_data, 1);  v2QP = vec_splat(v_data, 2);  v4QP = (vector unsigned short)vec_splat(v_data, 3);  src2 += stride * 4;#define LOAD_LINE(i)							\  register int j##i = i * stride;					\  vector unsigned char perm##i = vec_lvsl(j##i, src2);			\  const vector unsigned char v_srcA1##i = vec_ld(j##i, src2);		\  vector unsigned char v_srcA2##i;					\  if (two_vectors)							\    v_srcA2##i = vec_ld(j##i + 16, src2);				\  const vector unsigned char v_srcA##i =				\    vec_perm(v_srcA1##i, v_srcA2##i, perm##i);				\  vector signed short v_srcAss##i =					\    (vector signed short)vec_mergeh((vector signed char)zero,		\				    (vector signed char)v_srcA##i)  LOAD_LINE(0);  LOAD_LINE(1);  LOAD_LINE(2);  LOAD_LINE(3);  LOAD_LINE(4);  LOAD_LINE(5);  LOAD_LINE(6);  LOAD_LINE(7);#undef LOAD_LINE#define ITER(i, j)							\  const vector signed short v_diff##i =					\    vec_sub(v_srcAss##i, v_srcAss##j);					\  const vector signed short v_sum##i =					\    vec_add(v_diff##i, v_dcOffset);					\  const vector signed short v_comp##i =					\    (vector signed short)vec_cmplt((vector unsigned short)v_sum##i,	\				   v_dcThreshold);			\  const vector signed short v_part##i = vec_and(mask, v_comp##i);	\  v_numEq = vec_sum4s(v_part##i, v_numEq);  ITER(0, 1);  ITER(1, 2);  ITER(2, 3);  ITER(3, 4);  ITER(4, 5);  ITER(5, 6);  ITER(6, 7);#undef ITER  v_numEq = vec_sums(v_numEq, zero);	  v_numEq = vec_splat(v_numEq, 3);  vec_ste(v_numEq, 0, &numEq);  if (numEq > c->ppMode.flatnessThreshold)    {      const vector unsigned char mmoP1 = (const vector unsigned char)	AVV(0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f,	    0x00, 0x01, 0x12, 0x13, 0x08, 0x09, 0x1A, 0x1B);      const vector unsigned char mmoP2 = (const vector unsigned char)	AVV(0x04, 0x05, 0x16, 0x17, 0x0C, 0x0D, 0x1E, 0x1F,	    0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f);      const vector unsigned char mmoP = (const vector unsigned char)	vec_lvsl(8, (unsigned char*)0);            vector signed short mmoL1 = vec_perm(v_srcAss0, v_srcAss2, mmoP1);      vector signed short mmoL2 = vec_perm(v_srcAss4, v_srcAss6, mmoP2);      vector signed short mmoL = vec_perm(mmoL1, mmoL2, mmoP);      vector signed short mmoR1 = vec_perm(v_srcAss5, v_srcAss7, mmoP1);      vector signed short mmoR2 = vec_perm(v_srcAss1, v_srcAss3, mmoP2);      vector signed short mmoR = vec_perm(mmoR1, mmoR2, mmoP);      vector signed short mmoDiff = vec_sub(mmoL, mmoR);      vector unsigned short mmoSum = (vector unsigned short)vec_add(mmoDiff, v2QP);            if (vec_any_gt(mmoSum, v4QP))	return 0;      else	return 1;    }  else return 2; }