<div dir="ltr"><span style="font-size:12.8px">Hi</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I'm trying to understand the implementation of TESA or SEA motion search algorithm. I understand that the algorithm tries to calculate DC of pixels within the search range and eliminate few cases before it does ADS. But I have doubts in some part of the code which I have pasted below:<br><div><br></div><div><div> 1)<br>  Â  Â  Â  Â  Â if( delta == 4 )</div><div>  Â  Â  Â  Â  Â  Â  Â  sums_base += stride * (h->fenc->i_lines[0] + PADV*2);</div><div>  Â  Â  Â  Â  Â  if( i_pixel == PIXEL_16x16 || i_pixel == PIXEL_8x16 || i_pixel == PIXEL_4x8 )</div><div>  Â  Â  Â  Â  Â  Â  Â  delta *= stride;</div><div>  Â  Â  Â  Â  Â  if( i_pixel == PIXEL_8x16 || i_pixel == PIXEL_4x8 )</div><div>  Â  Â  Â  Â  Â  Â  Â  enc_dc[1] = enc_dc[2];</div></div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Can someone please explain the logic behind the above code? </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">2) Also what value gets stored in m->integral which is used in ADS calculation in SEA. </div><div style="font-size:12.8px">3) Â  Â Here delta is 8 if Â i_pixel == PIXEL_8x8. What happens in the below code for PIXEL_8x8?  Â  Â  Â  Â <br><br>  Â  Â  Â  Â  Â  Â  Â  h->pixf.sad_x4[sad_size]( zero, p_fenc, p_fenc+delta,</div><div style="font-size:12.8px">  Â  Â  Â  Â  Â  Â  Â  p_fenc+delta*FENC_STRIDE, p_fenc+delta+delta*FENC_STRIDE<wbr>,</div><div style="font-size:12.8px">  Â  Â  Â  Â  Â  Â  Â  FENC_STRIDE, enc_dc );</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks</div></div>