[FFmpeg-devel] [PATCH 3/3] avutil/pixfmt: Clarify the meaning of the alpha bits in rgb444 and similar formats

wm4 nfxjfg at googlemail.com
Fri Feb 6 22:04:53 CET 2015


On Fri, 6 Feb 2015 21:55:49 +0100
Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:

> On Fri, Feb 06, 2015 at 09:49:17PM +0100, wm4 wrote:
> > On Fri,  6 Feb 2015 20:57:50 +0100
> > Michael Niedermayer <michaelni at gmx.at> wrote:
> > 
> > > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > > ---
> > >  libavutil/pixfmt.h |    8 ++++----
> > >  1 file changed, 4 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
> > > index cbcccb2..cee5f2c 100644
> > > --- a/libavutil/pixfmt.h
> > > +++ b/libavutil/pixfmt.h
> > > @@ -141,10 +141,10 @@ enum AVPixelFormat {
> > >  #endif
> > >      AV_PIX_FMT_DXVA2_VLD,    ///< HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer
> > >  
> > > -    AV_PIX_FMT_RGB444LE,  ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), little-endian, most significant bits to 0
> > > -    AV_PIX_FMT_RGB444BE,  ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), big-endian, most significant bits to 0
> > > -    AV_PIX_FMT_BGR444LE,  ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1
> > > -    AV_PIX_FMT_BGR444BE,  ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), big-endian, most significant bits to 1
> > > +    AV_PIX_FMT_RGB444LE,  ///< packed RGB 4:4:4, 16bpp, (msb)4u 4R 4G 4B(lsb), little-endian, most significant bits to 0
> > > +    AV_PIX_FMT_RGB444BE,  ///< packed RGB 4:4:4, 16bpp, (msb)4u 4R 4G 4B(lsb), big-endian, most significant bits to 0
> > > +    AV_PIX_FMT_BGR444LE,  ///< packed BGR 4:4:4, 16bpp, (msb)4u 4B 4G 4R(lsb), little-endian, most significant bits to 1
> > > +    AV_PIX_FMT_BGR444BE,  ///< packed BGR 4:4:4, 16bpp, (msb)4u 4B 4G 4R(lsb), big-endian, most significant bits to 1
> > >      AV_PIX_FMT_YA8,       ///< 8bit gray, 8bit alpha
> > >  
> > >      AV_PIX_FMT_Y400A = AV_PIX_FMT_YA8, ///< alias for AV_PIX_FMT_YA8
> > 
> > Doesn't explain what "u" means. Also, what does it mean by "most
> > significant bits to 1"?
> 
> Minor comment: Other specifications (for example DirectX) use "X"
> to mean unused.
> I.e. DirectX has both RGBA and RGBX formats for example.
> Or more commonly D24S8 vs. D24X8 for a depth texture with
> and without stencil.
> I don't mind much, but if you don't care I'm for being
> consistent with conventions others are using already.

I agree; though fixing the name is probably a bit too late.


More information about the ffmpeg-devel mailing list