[MPlayer-dev-eng] [PATCH] LCL native decoder

Roberto Togni rtogni at bresciaonline.it
Mon Sep 2 22:45:52 CEST 2002


On 2002.09.01 17:29 Roberto Togni wrote:
> On 2002.09.01 16:50 Alex Beregszaszi wrote:
>> Hi,
>> 
>> > This patch adds native decoder for LCL codecs (avizlib and mszh)
> [...]
> When i first checked it, the colorspace didn't look like a standard 
> YUV, and that's why i added my own conversion. I'll check it again 
> now that the decoder is working.
I had a look at the conversion code:

b = ((y << 20) + u * 1858076 + 0x80000) >> 20;
g = ((y << 20) - u * 360857 - v * 748830 + 0x80000) >> 20;
r = ((y << 20) + v * 1470103 + 0x80000) >> 20;
Values are then clamped to 0-255 range.

That is the same (in integer math) of the second conversion formula 
form colorspaces.txt (the one with Cb and Cr instead of U and V,and no 
offset).

Does Mplayer uses the first one (with 128 offset) or the second one?

Ciao,
  Roberto



More information about the MPlayer-dev-eng mailing list