Talk:Origin Xan Codec

From MultimediaWiki
Jump to navigation Jump to search

Woah, this is the most cryptic pseudocode I ever saw this year. Actually it's all turns to simple

out[0] = *inp++ << 1;
i = 1;
while(..)
{
    out[i + 1] = (out[i - 1] + (*inp++ << 1)) & 0x3E;
    out[i + 0] = (out[i - 1] + out[i + 1]) >> 1;
    i += 2;
}

i.e. the every odd pixel is an average of it's neighborhoods, and every even pixel is delta-coded.

VAG 18:41, 8 October 2007 (EDT)