[FFmpeg-cvslog] r25688 - trunk/libavcodec/imgconvert.c
Sun Nov 7 22:24:17 CET 2010
On date Sunday 2010-11-07 20:39:54 +0100, Michael Niedermayer wrote:
> On Sun, Nov 07, 2010 at 02:45:39PM +0100, Stefano Sabatini wrote:
> > On date Sunday 2010-11-07 14:30:39 +0100, stefano wrote:
> > > Author: stefano
> > > Date: Sun Nov 7 14:30:39 2010
> > > New Revision: 25688
> > >
> > > Log:
> > > Use av_pix_fmt_descriptors information in avcodec_pix_fmt_string().
> > >
> > > Modified:
> > > trunk/libavcodec/imgconvert.c
> > >
> > > Modified: trunk/libavcodec/imgconvert.c
> > > ==============================================================================
> > > --- trunk/libavcodec/imgconvert.c Sun Nov 7 14:30:36 2010 (r25687)
> > > +++ trunk/libavcodec/imgconvert.c Sun Nov 7 14:30:39 2010 (r25688)
> > > @@ -446,7 +446,7 @@ void avcodec_pix_fmt_string (char *buf,
> > > "%-11s %5d %9d",
> > > av_pix_fmt_descriptors[pix_fmt].name,
> > > info.nb_channels,
> > > - info.depth
> > > + av_get_bits_per_pixel(&av_pix_fmt_descriptors[pix_fmt])
> > > );
> > And now I see that this is wrong, as "depth" is not the same as the
> > number of bits per pixel.
> > I suppose the better way to fix this is to change the header, and
> > print "nb_bits" rather than "depth".
> what is the diff this patch does to the output?
avcodec_pix_fmt_string() is currently unused in the code, but well you
can see the difference checking the definitions in PixFmtInfo and
comparing it to the bits per pixel (depth is supposed to be the bits
per pixel *per component*, but this definition is ambiguos since there
are formats for which the bits per component depends on the
So the saner solution is to simply change the headers (or
alternatively revert the commit, since I want to move the function to
libavcore this seems counterproductive).
FFmpeg = Forgiving and Forgiving MultiPurpose Erratic Goblin
More information about the ffmpeg-cvslog