From: James Courtier-D. <Ja...@su...> - 2003-10-12 20:07:57
|
Robin KAY wrote: > I'm writing some chroma keying code for the video overlays. In all the > cases I've tested, the RLE runs never extend beyond a single horizontal > line (i.e. a solid colour box 8 lines high would need 8 RLE runs). Is > this guarenteed to always be the case? > I don't think it is guarenteed. The current blend_yuv code does not assume that is the case either. Why do you need chroma keying? The overlay or OSD contains RLE encoded data. The RLE encodes "number of pixels this colour", and then a colour index. The colour index is used to look up the colour in the colour table, and also used to look up the transparency in the trans table. trans values of 0 means totally transparent, so the backround video shows through. trans values of 15 mean opaque, so the OSD pixel is shown, and no backround video is shown for that pixel. Any value from 1 to 14 means a mixture of backround video and OSD for that pixel. Cheers James |