[Ffmpeg-devel] pixel format names in swscale

Michael Niedermayer michaelni
Mon Aug 14 14:14:24 CEST 2006


On Mon, Aug 14, 2006 at 12:37:52PM +0200, Luca Abeni wrote:
> Hi all,
> I am working on modifying libswscale to internally use PIX_FMT_* names,
> so that the dependency on img_format.h can be removed.
> To do so, I need to convert each IMGFMT_ name in an equivalent PIX_FMT_
> name; it seems to me that a lot of new PIX_FMT_ names will have to be
> introduced.
> Here is a list of the equivalences between IMGFMT_ and PIX_FMT_ I built
> looking at mplayer's code: is this correct?
> every IMGFMT_RGB<x> format will be converted in PIX_FMT_RGB<x>
> idem for IMGFMT_BGR<x>
> (this will require to introduce some PIX_FMT_RGB* and PIX_FMT_BGR*
> formats that are not currently defined in libavutil)
> IMGFMT_YUY2     <--->   PIX_FMT_YUYV422		(new format)
> IMGFMT_UYVY     <--->   PIX_FMT_UYVY422
> IMGFMT_NV12     <--->   PIX_FMT_NV12		(new format)
> IMGFMT_NV21     <--->   PIX_FMT_NV21		(new format)
> IMGFMT_Y800     <--->   PIX_FMT_GRAY8
> IMGFMT_YVU9     <--->   PIX_FMT_YVU410P		(new format)
> IMGFMT_IF09     <--->   PIX_FMT_YUV410P
> IMGFMT_YV12     <--->   PIX_FMT_YVU420P		(new format)
> IMGFMT_I420     <--->   PIX_FMT_YUV420P
> IMGFMT_411P	<--->	PIX_FMT_YUV411P
> IMGFMT_422P	<--->	PIX_FMT_YUV422P
> IMGFMT_444P	<--->	PIX_FMT_YUV444P

iam against adding planar formats which are identical to existing ones
except that the planes are ordered differently, planes should always
be ordered identically, its a matter of exchanging pointers

> Also, how can I convert IMGFMT_Y8 and IMGFMT_IYUV?

Y8 is the same as Y800 and IYUV is the same as I420 unless i mixed some

> Moreover, I see that there are an IMGFMT_BGR1 and an IMGFMT_RGB1
> format... If I understand the naming well, they should be "BGR, 1 bit
> per pixel" and "RGB, 1 bit per pixel". But I do not understand what 1
> bit per pixel represents in the RGB or BGR space (is it B/W? If yes,
> what's the difference between these 2 formats?).

AFAIK nothing

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is

More information about the ffmpeg-devel mailing list