buffer-sharing: align small resolution stride to 32
authorWind Yuan <feng.yuan@intel.com>
Thu, 7 Mar 2013 10:05:52 +0000 (12:05 +0200)
committerJussi Saavalainen <jussi.saavalainen@ixonos.com>
Thu, 7 Mar 2013 10:06:28 +0000 (12:06 +0200)
Change-Id: I602f86e473a54966599a399321eaa936af63f129

gst-libs/gst/camera/gstmfldcamerasrc.c
packaging/gst-plugins-atomisp.changes

index 457c56a..c62e149 100644 (file)
@@ -890,6 +890,13 @@ gst_camerasrc_fixate (GstBaseSrc * basesrc, GstCaps * caps)
       fourcc = gst_value_get_fourcc (gst_value_list_get_value (v, 0));
       gst_structure_set (structure, "format", GST_TYPE_FOURCC, fourcc, NULL);
     }
+    if (gst_structure_has_name(structure, "video/x-vaapi-sharing")) {
+        gint stride = 0;
+        gst_structure_get_int(structure, "width", &stride);
+        /* row stride need width aligned to 32*/
+        stride = ((stride+31)&(~31));
+        gst_structure_set (structure, "row-stride", G_TYPE_INT, stride, NULL);
+    }
   }
 
   GST_DEBUG_OBJECT (basesrc, "fixated caps %" GST_PTR_FORMAT, caps);
@@ -993,6 +1000,13 @@ gst_camerasrc_negotiate (GstBaseSrc * basesrc)
 
     /* now fixate */
     if (!gst_caps_is_empty (caps)) {
+      GstStructure *s = gst_caps_get_structure (caps, 0);
+      /* set row-stride for vaapi-sharing */
+      if (s && gst_structure_has_name(s, "video/x-vaapi-sharing")) {
+        if (!gst_structure_has_field(s, "row-stride")) {
+            gst_structure_set (s, "row-stride", GST_TYPE_INT_RANGE, 0, G_MAXINT, NULL);
+        }
+      }
       gst_pad_fixate_caps (GST_BASE_SRC_PAD (basesrc), caps);
       GST_DEBUG_OBJECT (basesrc, "fixated to: %" GST_PTR_FORMAT, caps);
 
index dbe5a90..f9de91d 100644 (file)
@@ -1,3 +1,6 @@
+* Thu Mar 07 2013 Jussi Saavalainen <jussi.saavalainen@ixonos.com> submit/tizen_2.0/20130301.090545@808b4df
+- buffer-sharing: align small resolution stride to 32 TZSP-5386
+
 * Fri Mar 01 2013 Jussi Saavalainen <jussi.saavalainen@ixonos.com> submit/trunk/20130219.070004@140594f
 - Use correct data type for BA10 in static caps
 - combine ae/af/awb enable/disable to one 3a property.