[FFmpeg-devel] [PATCH 1/1] Print bit depth when executing 'ffmpeg -pix_fmts'
Soft Works
softworkz at hotmail.com
Wed Oct 13 10:20:30 EEST 2021
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Tobias Rapp
> Sent: Wednesday, October 13, 2021 8:56 AM
> To: ffmpeg-devel at ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH 1/1] Print bit depth when
> executing 'ffmpeg -pix_fmts'
>
> On 13/10/2021 06:58, Soft Works wrote:
> > New output looks like this:
> >
> > Pixel formats:
> > I.... = Supported Input format for conversion
> > .O... = Supported Output format for conversion
> > ..H.. = Hardware accelerated format
> > ...P. = Paletted format
> > ....B = Bitstream format
> > FLAGS NAME NB_COMPONENTS BITS_PER_PIXEL BIT_DEPTH
> > -----
> > IO... yuv420p 3 12 8
> > IO... yuyv422 3 16 8
> > IO... rgb24 3 24 8
> > IO... bgr24 3 24 8
> >
> > [...]
> >
> > @@ -1772,7 +1772,8 @@ int show_pix_fmts(void *optctx, const char
> *opt, const char *arg)
> > pix_desc->flags & AV_PIX_FMT_FLAG_BITSTREAM ? 'B'
> : '.',
> > pix_desc->name,
> > pix_desc->nb_components,
> > - av_get_bits_per_pixel(pix_desc));
> > + av_get_bits_per_pixel(pix_desc),
> > + pix_desc->comp[0].depth);
> > }
> > return 0;
> > }
> >
>
> I think it is misleading to only print the bit-depth of the first
> component. You can already get bit-depth information for all
> components
> in different data formats with "ffprobe -show_pixel_formats".
The bit depth of the first component is often considered as the
"nominal" bit depth of formats: For example, yuva420p10 is
said to be a "10bit format" even though it doesn't apply to all
components.
That's the intention of the output in this case, means it's for
user information, not a developer output.
Kind regards,
softworkz
More information about the ffmpeg-devel
mailing list