[MPlayer-dev-eng] [PATCH] New video filter: deblendlogo

Oded Shimon ods15 at ods15.dyndns.org
Wed Feb 23 22:37:02 CET 2005


On Wednesday 23 February 2005 23:26, Oswald Buddenhagen wrote:
> On Wed, Feb 23, 2005 at 11:15:14PM +0200, Oded Shimon wrote:
> > Does anyone know th _REAL_ YUV <-> RGB convertion equations?... They
> > are NOT what is written in DOCS/tech/colorspaces.txt
>
> recently i used these formulas:
>
> #define Kr 0.2126
> #define Kb 0.0722
>
> #define L(r,g,b) (Kr * r + Kb * b + (1 - Kr - Kb) * g)
> #define YU(r,g,b) \
>         (((int)(219*L(r,g,b)/255 + 16.5)) | \
>          (((int)(112*(b - L(r,g,b))/((1-Kb)*255) + 128.5)) << 8))
> #define YV(r,g,b) \
>         (((int)(219*L(r,g,b)/255 + 16.5)) | \
>          (((int)(112*(r - L(r,g,b))/((1-Kr)*255) + 128.5)) << 8))
> #define YUY2(r,g,b) (YU(r,g,b) | (YV(r,g,b) << 16))
>
> which will probably result in one of the number sets mentioned in the
> file. i've got this from some directshow docu on msdn ...
Actually, no, these numbers are much different.. I'm gonna try them out...


On Wednesday 23 February 2005 23:29, Ivo wrote:
> On Wednesday 23 February 2005 22:15, Oded Shimon wrote:
> > Does anyone know th _REAL_ YUV <-> RGB convertion equations?... They are
> > NOT what is written in DOCS/tech/colorspaces.txt
>
> http://en.wikipedia.org/wiki/YUV
>
> These are different, so maybe you could try those and see what happens?
Check again, those are the same numbers as the second method in 
DOCS/tech/colorspaces

- ods15




More information about the MPlayer-dev-eng mailing list