[MPlayer-users] What if different colorspace for codec and display output?

RC cooleyr at gmail.com
Fri Dec 28 09:11:31 CET 2007


On Fri, 28 Dec 2007 15:02:34 +0800
boku <boku0712 at gmail.com> wrote:

> 1) Can a decoder decode input bit streams in different kinds of color
> space format such as YUV420P, IYUV or UYVY422?

Certainly.  Most codecs in MPlayer support outputting to multiple
colorspaces.

> Also, where it can be defined?

For a start, look through codecs.conf(.h).  

> 3) For FFMPEG wrapper into mplayer, vd_ffmpeg.c, I checked out the
> match mechanism in ::init() as folows:
> 	    lavc_codec = (AVCodec
> 	    *)avcodec_find_decoder_by_name(sh->codec->dll);
> it means mplayer uses "dll" field specified in codecs.conf to match
> the decoder.
> However, I checked the document and it seems "dll" field is not for
> this definition or purpose. Am I misunderstanding?

Since libavcodec includes many decoders, that code is checking
codecs.conf to make sure it has a decoder for the current video. 
It doesn't have anything to do with colorspace.

The colorspace selection seems to be handled by the function
control() around line 135.  It looks like it returns CONTROL_TRUE if it
supports the colorspace (and other flags) or CONTROL_FALSE if not.

You probably should read DOCS/tech/libmpcodecs.txt for lots of good info
on writing a video decoder, and perhaps "codecs.conf.txt" in the same
place.



More information about the MPlayer-users mailing list