[XviD-devel] [BUG] sad32v
Edouard Gomez
ed.gomez at free.fr
Thu Aug 21 21:55:37 CEST 2003
I think sad32v does do what is expected, but s don't have documented
expected behavior here is what i would expect from a function with that
name:
sad32v returns the SAD of the 2 32x32 pixel blocks passed in cur and
ref, sub 16x16 MB sads are stored in the sad array.
But the code is as follows and i would patch it like that:
uint32_t sad32v_c(const uint8_t * const cur,
const uint8_t * const ref,
const uint32_t stride,
int32_t *sad)
{
sad[0] = sad16(cur, ref, stride, 256*4096);
- sad[1] = sad16(cur + 8, ref + 8, stride, 256*4096);
- sad[2] = sad16(cur + 8*stride, ref + 8*stride, stride, 256*4096);
- sad[3] = sad16(cur + 8*stride + 8, ref + 8*stride + 8, stride, 256*4096);
+ sad[1] = sad16(cur + 16, ref + 16, stride, 256*4096);
+ sad[2] = sad16(cur + 16*stride, ref + 16*stride, stride, 256*4096);
+ sad[3] = sad16(cur + 16*stride + 16, ref + 16*stride + 16, stride, 256*4096);
return sad[0]+sad[1]+sad[2]+sad[3];
}
Does it make sense to other devs ?
--
Edouard Gomez
More information about the XviD-devel
mailing list