unsigned int t1,t2,t3,t4;t1 = *mn ^ *pq;t2 = t1 & 0x01010101;t3 = __uhadd8(*mn,*pq)t4 = __uhadd8(t2,*co);*mn = __uadd8(t3,t4);
*mn = __uhadd8(*mn,__uadd8(*pq,*co));but my doubt is how to avoid the overflow [255 + 2];any such instruction will care the saturation.?
*mn = __uhadd8(*mn,__uadd8(*pq,*co));
void qadd(uint32_t *mnx4, uint32_t *pqx4, uint32_t *cox4){ uint32_t t1 = __uqadd8(*mnx4, *pqx4); uint32_t t2 = __uhadd8(t1, *cox4); *mnx4 = t2;}