Let's take a look at one of the following functions. Please estimate or realize how many cycles are required in assembly. Welcome to discuss uint32_t Zsad8h(const uint8_t * const cur, const uint8_t * const ref, const uint32_t CurStride, const uint32_t RefStride, const uint32_t round) {uint8_t const *ptr_cur = cur; uint8_t const *ptr_ref = ref; uint8_t tmpcur, tmpleft, tmpright, tmpmid; int32_t qround = 1-round; uint32_t i,j; uint32_t sad = 0; for(j=0; j <8; j++){ tmpleft = ptr_ref[0]; for(i=0; i<8; i++){ tmpright = ptr_ref[i+1]; tmpcur = ptr_cur[i]; tmpmid = (tmpleft + tmpright + qround )/2; tmpleft = tmpright; sad += _abs(tmpcur-tmpmid);} ptr_cur += CurStride; ptr_ref += RefStride;} return sad;}

Reply