[XviD-devel] image interpolation question

Radek 'sysKin' Czyz xvid-devel@xvid.org
Sat, 23 Nov 2002 01:39:10 +1030


Hi,

I was browsing the code a bit. I discovered a rather strange thing in
image.c, in function image_interpolate(). The function prepares refh,
refv and refhv.
In it's qpel-part, we have two almost identical loops - one makes refh
and refv, second makes refhv using existing refh. Cool. Now, there is
one difference in the loops - when moving to next row of blocks, first
loop does something like
     refn += stride_add + EDGE_SIZE; //which I understand (half edge to the
end of the line, then another 7 lines down, then half of the edge
again).
But second loop does
    refn += stride_add + EDGE_SIZE2; // where EDGE_SIZE2 is half of
edge size. This seems wrong, and as a result not entire image
gets interpolated. Am I wrong here, or this is a typo?

I changed it to what I think it's supposed to be, and got a slightly
smaller filesize at fixed quant.
Please tell me if I'm right, I can't be sure.


Best regards,
Radek