[FFmpeg-devel] PixFmtInfo cleanup
Thu Mar 5 00:51:47 CET 2009
On Thu, Mar 05, 2009 at 12:01:31AM +0100, Stefano Sabatini wrote:
> On date Wednesday 2009-03-04 22:45:28 +0100, Stefano Sabatini encoded:
> > On date Tuesday 2009-02-24 02:13:08 +0100, Michael Niedermayer encoded:
> > > in svn
> > Nice, just one maybe silly question, why all these minus1/plus1?
> I just figured out i myslef, I suppose is to spare bits.
> Next one is: why then offset_plus1?
because we need a -1 somewhere
> > And simple patch attached.
> > --
> > FFmpeg = Fast and Frightening Meaningless Powerful Embarassing God
> > Index: libavcodec/pixdesc.h
> > ===================================================================
> > --- libavcodec/pixdesc.h (revision 17811)
> > +++ libavcodec/pixdesc.h (working copy)
> > @@ -27,7 +27,7 @@
> > uint16_t plane :2; ///< which of the 4 planes contains the component
> > uint16_t step_minus1 :3; ///< number of bytes between 2 horizontally consecutive pixels minus 1
> > uint16_t offset_plus1 :3; ///< number of bytes before the component of the first pixel plus 1
> > - uint16_t shift :3; ///< number of lsb that must be shifted away to get the value
> > + uint16_t shift :3; ///< number of least significant bits that must be shifted away to get the value
> > uint16_t depth_minus1 :4; ///< number of bits in the component minus 1
> > }AVComponentDescriptor;
> What if we need to shift away instead some of the *most* significant
> bits (PIX_FMT_BGR555 is the only format I can use as an example)?
> Maybe just another shift_msb field?
we have depth
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I hate to see young programmers poisoned by the kind of thinking
Ulrich Drepper puts forward since it is simply too narrow -- Roman Shaposhnik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel