[FFmpeg-devel] libavcodec decoder output PIX_FMT

Tomas Härdin tomas.hardin
Mon Oct 18 09:14:33 CEST 2010

On Sat, 2010-10-16 at 12:40 -0700, Srinivasa Deevi wrote:
> Hi
> I would like to know if there are any restrictions on libavcodec decoder
> output to be anything other than YUV type. Can that be RGB24/32 format as
> well ?

Yes. Almost all entries in the PixelFormat enum are ok (not sure about
the hwaccel ones). You can check out AVCodec::pix_fmts if you like, but
that's not always set. Also, the output pixel format will vary depending
on the input, even if using the same codec. For instance, DV can be
either 4:2:0, 4:1:1 or 4:2:2.

> Also, if the decoder scales it down as well, how we inform the next level
> like libvo . Is this possible with ffmpeg ?

The decoder shouldn't do any scaling. At least I haven't come across it
so far. It might request that the output should be cropped though, and
the resolution may change, thus requiring scaling.

The answer to both of these questions is probably to always inspect
pix_fmt, width/height, coded_width/coded_height etc. and act

For specific codecs it might be possible to guarantee that for instance
resolution doesn't change, but not in the general case.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101018/349265fa/attachment.pgp>

More information about the ffmpeg-devel mailing list