mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
vp9parse: Set subsampling to src caps even if GBR stream
Some muxer elements will need the subsampling information Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3297>
This commit is contained in:
parent
47f1dc837f
commit
32b13a883a
1 changed files with 11 additions and 16 deletions
|
@ -686,23 +686,18 @@ gst_vp9_parse_update_src_caps (GstVp9Parse * self, GstCaps * caps)
|
|||
}
|
||||
}
|
||||
|
||||
if (self->color_space != GST_VP9_CS_SRGB) {
|
||||
if (self->parser->subsampling_x == 1 && self->parser->subsampling_y == 1)
|
||||
chroma_format = "4:2:0";
|
||||
else if (self->parser->subsampling_x == 1 &&
|
||||
self->parser->subsampling_y == 0)
|
||||
chroma_format = "4:2:2";
|
||||
else if (self->parser->subsampling_x == 0 &&
|
||||
self->parser->subsampling_y == 1)
|
||||
chroma_format = "4:4:0";
|
||||
else if (self->parser->subsampling_x == 0 &&
|
||||
self->parser->subsampling_y == 0)
|
||||
chroma_format = "4:4:4";
|
||||
if (self->parser->subsampling_x == 1 && self->parser->subsampling_y == 1)
|
||||
chroma_format = "4:2:0";
|
||||
else if (self->parser->subsampling_x == 1 && self->parser->subsampling_y == 0)
|
||||
chroma_format = "4:2:2";
|
||||
else if (self->parser->subsampling_x == 0 && self->parser->subsampling_y == 1)
|
||||
chroma_format = "4:4:0";
|
||||
else if (self->parser->subsampling_x == 0 && self->parser->subsampling_y == 0)
|
||||
chroma_format = "4:4:4";
|
||||
|
||||
if (chroma_format)
|
||||
gst_caps_set_simple (final_caps,
|
||||
"chroma-format", G_TYPE_STRING, chroma_format, NULL);
|
||||
}
|
||||
if (chroma_format)
|
||||
gst_caps_set_simple (final_caps,
|
||||
"chroma-format", G_TYPE_STRING, chroma_format, NULL);
|
||||
|
||||
switch (self->bit_depth) {
|
||||
case GST_VP9_BIT_DEPTH_8:
|
||||
|
|
Loading…
Reference in a new issue