mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ffprobe: add pixel format chroma sub-sampling output
Adds output of chroma sub-sampling information to ffprobe -show_pixel_formats option. Note: This patch just prints the "raw" log2_charoma_w/h values instead of the previously suggested mapping into a chroma sub-sampling pattern string like "4:2:2". Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7d327d6242
commit
1acc9189b4
@ -309,6 +309,8 @@
|
||||
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="nb_components" type="xsd:int" use="required"/>
|
||||
<xsd:attribute name="log2_chroma_w" type="xsd:int"/>
|
||||
<xsd:attribute name="log2_chroma_h" type="xsd:int"/>
|
||||
<xsd:attribute name="bits_per_pixel" type="xsd:int"/>
|
||||
</xsd:complexType>
|
||||
|
||||
|
@ -2586,6 +2586,13 @@ static void ffprobe_show_pixel_formats(WriterContext *w)
|
||||
writer_print_section_header(w, SECTION_ID_PIXEL_FORMAT);
|
||||
print_str("name", pixdesc->name);
|
||||
print_int("nb_components", pixdesc->nb_components);
|
||||
if ((pixdesc->nb_components >= 3) && !(pixdesc->flags & AV_PIX_FMT_FLAG_RGB)) {
|
||||
print_int ("log2_chroma_w", pixdesc->log2_chroma_w);
|
||||
print_int ("log2_chroma_h", pixdesc->log2_chroma_h);
|
||||
} else {
|
||||
print_str_opt("log2_chroma_w", "N/A");
|
||||
print_str_opt("log2_chroma_h", "N/A");
|
||||
}
|
||||
n = av_get_bits_per_pixel(pixdesc);
|
||||
if (n) print_int ("bits_per_pixel", n);
|
||||
else print_str_opt("bits_per_pixel", "N/A");
|
||||
|
Loading…
Reference in New Issue
Block a user