[FFmpeg-devel] [PATCH v3] ffprobe: Add bits_per_component to stream output

Tobias Rapp t.rapp at noa-audio.com
Fri Sep 5 08:29:45 CEST 2014


On 04.09.2014 17:39, wm4 wrote:
>> diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h
>> index 41e81db..f8af18f 100644
>> --- a/libavutil/pixdesc.h
>> +++ b/libavutil/pixdesc.h
>> @@ -251,6 +251,13 @@ int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc);
>>   int av_get_padded_bits_per_pixel(const AVPixFmtDescriptor *pixdesc);
>>
>>   /**
>> + * Return the number of bits per component (bit depth) for the pixel format
>> + * described by pixdesc or 0 if the pixel format has unknown or non-uniform
>> + * bit depth.
>> + */
>> +int av_get_bits_per_component(const AVPixFmtDescriptor *pixdesc);
>> +
>> +/**
>>    * @return a pixel format descriptor for provided pixel format or NULL if
>>    * this pixel format is unknown.
>>    */
>
>
> Does something such highly specialized really warrant its own API
> function? There are several ways how to handle the case if the
> component bit depths are not uniform, or even how the term "bit depth"
> is to be interpreted, so IMO this should just be internal to ffprobe.

That would also be fine for me. Do you suggest to put it directly in 
ffprobe.c or cmdutils.c or some other file?




More information about the ffmpeg-devel mailing list