[XviD-devel] Problem with BS_VERSION_BUGGY_CHROMA_ROUNDING?

carlo.bramix carlo.bramix at libero.it
Sun Dec 18 14:32:57 CET 2005


Hello,
I'm having some bugs when playing some movies with XVID.
The colors of the image are diffused like a strange fluid effect.
The problem disappears if I used the DECODER.C from the 1.1.0 BETA 2 sources.
By the way, there is a thing that made the debugging much more difficult.
Into the newest DECODER.C all tab chars have been changed with two spaces and this makes impossible a decent file comparison!
I spent one day for making the two sources comparable.
I also downloaded the history of that file.
The bug on DECODER.C happens when I switch from version 1.71 to 1.72.
Perhaps into a piece of code like this one:

if (dec->quarterpel) {
    if (dec->bs_version <= BS_VERSION_BUGGY_CHROMA_ROUNDING) {
        uv_dx = (uv_dx>>1) | (uv_dx&1);
        uv_dy = (uv_dy>>1) | (uv_dy&1);
    }
    else {
        uv_dx /= 2;
        uv_dy /= 2;
    }
}

the "<=" symbol into the second IF statement should be converted to ">", otherwise older versions will fall wrongly into the first code and viceversa
Into those (old) movie clips, the bs_version member is ZERO.
By applying the described change, the graphic output is correct.
What do you think about it?

Sincerely,

Carlo Bramini




More information about the XviD-devel mailing list