summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2015-03-25 16:43:59 (GMT)
committerSebastian Dröge <sebastian@centricular.com>2015-05-04 07:34:15 (GMT)
commit0654442c8f56b268df0aeb314b26a85b6b93816c (patch)
treef425593da9c8c0bcb6d38fb94bc66fc4309babd5
parent3fae18b5d259fdf76ac7de36d79e59a1083f16b2 (diff)
downloadgst-plugins-bad-0654442c8f56b268df0aeb314b26a85b6b93816c.tar.gz
gst-plugins-bad-0654442c8f56b268df0aeb314b26a85b6b93816c.tar.xz
androidmedia: Add suport for Intel color formats
https://bugzilla.gnome.org/show_bug.cgi?id=747126
-rw-r--r--sys/androidmedia/gstamc-constants.h2
-rw-r--r--sys/androidmedia/gstamc.c16
2 files changed, 18 insertions, 0 deletions
diff --git a/sys/androidmedia/gstamc-constants.h b/sys/androidmedia/gstamc-constants.h
index 6117032..4ea6443 100644
--- a/sys/androidmedia/gstamc-constants.h
+++ b/sys/androidmedia/gstamc-constants.h
@@ -94,6 +94,8 @@ enum
COLOR_Format24BitABGR6666 = 43,
COLOR_FormatAndroidOpaque = 0x7F000789,
COLOR_TI_FormatYUV420PackedSemiPlanar = 0x7f000100,
+ COLOR_INTEL_FormatYUV420PackedSemiPlanar = 0x7fa00e00,
+ COLOR_INTEL_FormatYUV420PackedSemiPlanar_Tiled = 0x7fa00f00,
COLOR_QCOM_FormatYUV420SemiPlanar = 0x7fa30c00,
COLOR_QCOM_FormatYUV420PackedSemiPlanar64x32Tile2m8ka = 0x7fa30c03,
/* NV12 but with stride and plane heights aligned to 32 */
diff --git a/sys/androidmedia/gstamc.c b/sys/androidmedia/gstamc.c
index dd41ad5..db78bf9 100644
--- a/sys/androidmedia/gstamc.c
+++ b/sys/androidmedia/gstamc.c
@@ -1778,6 +1778,8 @@ static const struct
COLOR_FormatYUV420SemiPlanar, GST_VIDEO_FORMAT_NV12}, {
COLOR_TI_FormatYUV420PackedSemiPlanar, GST_VIDEO_FORMAT_NV12}, {
COLOR_TI_FormatYUV420PackedSemiPlanarInterlaced, GST_VIDEO_FORMAT_NV12}, {
+ COLOR_INTEL_FormatYUV420PackedSemiPlanar, GST_VIDEO_FORMAT_NV12}, {
+ COLOR_INTEL_FormatYUV420PackedSemiPlanar_Tiled, GST_VIDEO_FORMAT_NV12}, {
COLOR_QCOM_FormatYUV420SemiPlanar, GST_VIDEO_FORMAT_NV12}, {
COLOR_QCOM_FormatYUV420PackedSemiPlanar64x32Tile2m8ka, GST_VIDEO_FORMAT_NV12}, {
COLOR_QCOM_FormatYVU420SemiPlanar32m, GST_VIDEO_FORMAT_NV12}, {
@@ -1977,6 +1979,20 @@ gst_amc_color_format_info_set (GstAmcColorFormatInfo * color_format_info,
1) / 2);
break;
}
+ case COLOR_INTEL_FormatYUV420PackedSemiPlanar:
+ case COLOR_INTEL_FormatYUV420PackedSemiPlanar_Tiled:
+ if (stride == 0) {
+ GST_ERROR ("Stride is 0");
+ return FALSE;
+ }
+ if (slice_height <= 0)
+ slice_height = height;
+
+ frame_size =
+ stride * (slice_height - crop_top / 2) +
+ (GST_ROUND_UP_2 (stride) * ((slice_height + 1) / 2));
+ break;
+
case COLOR_TI_FormatYUV420PackedSemiPlanar:
case COLOR_TI_FormatYUV420PackedSemiPlanarInterlaced:{
if (stride == 0 || slice_height == 0) {