mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
video: Return correct component width/height for A420
This commit is contained in:
parent
8f3aec570a
commit
a13720fc55
1 changed files with 2 additions and 3 deletions
|
@ -1377,7 +1377,7 @@ gst_video_format_get_component_width (GstVideoFormat format,
|
|||
case GST_VIDEO_FORMAT_Y16:
|
||||
return width;
|
||||
case GST_VIDEO_FORMAT_A420:
|
||||
if (component == 0 || component == 1) {
|
||||
if (component == 0 || component == 3) {
|
||||
return width;
|
||||
} else {
|
||||
return GST_ROUND_UP_2 (width) / 2;
|
||||
|
@ -1451,7 +1451,7 @@ gst_video_format_get_component_height (GstVideoFormat format,
|
|||
case GST_VIDEO_FORMAT_UYVP:
|
||||
return height;
|
||||
case GST_VIDEO_FORMAT_A420:
|
||||
if (component == 0 || component == 1) {
|
||||
if (component == 0 || component == 3) {
|
||||
return height;
|
||||
} else {
|
||||
return GST_ROUND_UP_2 (height) / 2;
|
||||
|
@ -1672,7 +1672,6 @@ gst_video_format_get_component_offset (GstVideoFormat format,
|
|||
return GST_ROUND_UP_4 (width) * GST_ROUND_UP_2 (height) +
|
||||
2 * GST_ROUND_UP_4 (GST_ROUND_UP_2 (width) / 2) *
|
||||
(GST_ROUND_UP_2 (height) / 2);
|
||||
|
||||
}
|
||||
default:
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue