Hallo!
the problem is (i believe), that YUV does not use the whole range from 0..255 but something like 16..245 (or whatever: i didn't write it down and now i cannot find it); i didn't add any clipping for this (which was very stupid) because of performance reasons.
It fixed this for me some months ago, but didn't send it to the list (because I also changed the colors r and b because they were swapped with my webcam ...)
e.g.: GemPixUtil.cpp, line 599:
case GL_RGBA: case GL_BGRA_EXT: // <- this is the confusing: // RGBA and BGRA is the same !!! {
... // 1st row - 1st pixel y=*py1++; yy=y<<8; //*pixels1++ = (yy + ub ) >> 8; // r *pixels1++ = CLAMP( (yy + vr) >> 8 ); // r *pixels1++ = CLAMP( (yy - ug - vg) >> 8 ); // g //*pixels1++ = (yy + vr) >> 8; // b *pixels1++ = CLAMP( (yy + ub ) >> 8 ); // b *pixels1++ = 255; // a ...
}
so i think you only have to CLAMP the values (at least for me it worked much better this way)
LG Georg
oh, bless the lazy, but i really have to find the docs somewhere.
mfg.asd.r IOhannes
GEM-dev mailing list GEM-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/gem-dev