[MPlayer-dev-eng] best colorspace to look for black frames
freku045 at student.liu.se
Wed Apr 24 12:54:10 CEST 2002
On Wed, Apr 24, 2002 at 03:57:28AM -0400, Brian J. Murrell wrote:
> OK, in case you didn't realize it I am pretty new to this video stuff.
> I don't really understand all the many differences regarding
> colorspaces. I understand the basics (i.e. YUV vs. RGB) but there
> seem to be so many choices with MPlayer.
> So I am wondering two things.
> 1) Which colorspace would be easiest for determining if a pixel is a
> certain amount of black (i.e. between a specific shade of grey and
> pitch black) and
YV12 will probably be quite simple to use. The Y component is the
"brightness". Extracting brightness information from the RGB formats
isn't very hard either.
> 2) How can I figure out how to extract the color information for a
> given pixel from the "plane(s)" in the mp_image_t * returned by
> vf_get_image()? I think I have determined that RGB colorspaces use
> 3 planes for each pixel (one plane each for R, G and B) and YV12
> uses only the one plane with the YUV values packed into it, but in
> what format, I dunno.
The RGB formats are all packed which means that everything is in one plane.
YV12 is a planar format with three planes, Y, U and V.
Y is the "brightness" U and V contains color information.
> Is there anywhere I can read about this stuff, especially as MPlayer
> has implemented it?
DOCS/tech/colorspaces.txt, http://www.webartz.com/fourcc/ and
More information about the MPlayer-dev-eng