Remove build warnning 64/149064/2
authorSejun Park <sejun79.park@samsung.com>
Mon, 11 Sep 2017 11:02:57 +0000 (20:02 +0900)
committerSejun Park <sejun79.park@samsung.com>
Mon, 11 Sep 2017 11:46:06 +0000 (20:46 +0900)
Change-Id: I0100f675c4b4a5920f1ad8d9957f0a0ebacca083

gst/videoconvert/gsttbmbufferpool.c
gst/videoconvert/gsttbmbufferpool.h
packaging/gst-plugins-base.spec

index 254db32..f0d1955 100644 (file)
@@ -16,61 +16,18 @@ int new_calc_plane(int width, int height)
      (mbY * S5P_FIMV_NUM_PIXELS_IN_MB_ROW));
 }
 
-int new_calc_yplane(int width, int height)
-{
-    return (ALIGN_TO_4KB(new_calc_plane(width, height) +
-              S5P_FIMV_D_ALIGN_PLANE_SIZE));
-}
-
-int new_calc_uvplane(int width, int height)
-{
-    return (ALIGN_TO_4KB((new_calc_plane(width, height) >> 1) +
-              S5P_FIMV_D_ALIGN_PLANE_SIZE));
-}
-
-int
-calc_plane(int width, int height)
-{
-    int mbX, mbY;
-
-    mbX = ALIGN(width, S5P_FIMV_NV12MT_HALIGN);
-    mbY = ALIGN(height, S5P_FIMV_NV12MT_VALIGN);
-
-    return ALIGN(mbX * mbY, S5P_FIMV_DEC_BUF_ALIGN);
-}
-
-int
-calc_yplane(int width, int height)
-{
-    int mbX, mbY;
-
-    mbX = ALIGN(width + 24, S5P_FIMV_NV12MT_HALIGN);
-    mbY = ALIGN(height + 16, S5P_FIMV_NV12MT_VALIGN);
-
-    return ALIGN(mbX * mbY, S5P_FIMV_DEC_BUF_ALIGN);
-}
-
-int
-calc_uvplane(int width, int height)
-{
-    int mbX, mbY;
-
-    mbX = ALIGN(width + 16, S5P_FIMV_NV12MT_HALIGN);
-    mbY = ALIGN(height + 4, S5P_FIMV_NV12MT_VALIGN);
-
-    return ALIGN((mbX * mbY)>>1, S5P_FIMV_DEC_BUF_ALIGN);
-}
-
 int
 gst_calculate_y_size(int width, int height)
 {
-   return CHOOSE_MAX_SIZE(calc_yplane(width,height),new_calc_yplane(width,height));
+  return (ALIGN_TO_4KB(new_calc_plane(width, height) +
+      S5P_FIMV_D_ALIGN_PLANE_SIZE));
 }
 
 int
 gst_calculate_uv_size(int width, int height)
 {
-   return CHOOSE_MAX_SIZE(calc_uvplane(width,height),new_calc_uvplane(width,height));
+  return (ALIGN_TO_4KB((new_calc_plane(width, height) >> 1) +
+      S5P_FIMV_D_ALIGN_PLANE_SIZE));
 }
 
 static GstMemory *
@@ -174,7 +131,6 @@ gst_mm_memory_allocator_alloc (GstAllocator * allocator, GstMemoryFlags flags,
 
 
 
-GType gst_mm_buffer_pool_get_type (void);
 
 G_DEFINE_TYPE (GstMMBufferPool, gst_mm_buffer_pool, GST_TYPE_BUFFER_POOL);
 
@@ -190,7 +146,7 @@ gst_mm_buffer_pool_stop (GstBufferPool * bpool)
 {
   GstMMBufferPool *pool = GST_MM_BUFFER_POOL (bpool);
 
-  if(gst_buffer_pool_is_active (pool) == TRUE)
+  if(gst_buffer_pool_is_active (bpool) == TRUE)
       return FALSE;
   /* Remove any buffers that are there */
   if(pool->buffers != NULL){
@@ -210,8 +166,6 @@ gst_mm_buffer_pool_stop (GstBufferPool * bpool)
 static const gchar **
 gst_mm_buffer_pool_get_options (GstBufferPool * bpool)
 {
-  static const gchar *raw_video_options[] =
-      { GST_BUFFER_POOL_OPTION_VIDEO_META, NULL };
   static const gchar *options[] = { NULL };
   return options;
 }
@@ -271,7 +225,7 @@ gst_mm_buffer_pool_alloc_buffer (GstBufferPool * bpool,
   mm_buf = (GstMMBuffer*) malloc(sizeof(GstMMBuffer));
   mem = gst_mm_memory_allocator_alloc (pool->allocator, 0, mm_buf);
   buf = gst_buffer_new ();
-  buf->pool = pool;
+  buf->pool = bpool;
   mem->size = sizeof(GstMMBuffer);
   mem->offset = 0;
   gst_buffer_append_memory (buf, mem);
@@ -402,9 +356,9 @@ gst_mm_buffer_pool_acquire_buffer (GstBufferPool * bpool,
 
    pool->current_buffer_index = i;
    g_return_val_if_fail (pool->current_buffer_index != -1, GST_FLOW_ERROR);
-   GST_DEBUG(" Acquiring buffer at index:[%d]",pool->current_buffer_index);
+   GST_DEBUG(" Acquiring buffer at index:[%d]", pool->current_buffer_index);
    buf = g_ptr_array_index (pool->buffers, pool->current_buffer_index);
-   GST_DEBUG("\ buffer:[%p]",buf);
+   GST_DEBUG("buffer:[%p]", buf);
    g_return_val_if_fail (buf != NULL, GST_FLOW_ERROR);
    *buffer = buf;
    ret = GST_FLOW_OK;
index ee2f78d..f6f113a 100644 (file)
@@ -50,7 +50,10 @@ struct _GstMMBuffer
 
 static GQuark gst_mm_buffer_data_quark = 0;
 
-#define GST_MM_BUFFER_POOL(pool) ((GstMMBufferPool *) pool)
+#define GST_TYPE_MM_BUFFER_POOL \
+  (gst_mm_buffer_pool_get_type()
+#define GST_MM_BUFFER_POOL(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OMX_MM_POOL,GstMMBufferPool))
 typedef struct _GstMMBufferPool GstMMBufferPool;
 typedef struct _GstMMBufferPoolClass GstMMBufferPoolClass;
 
@@ -99,6 +102,12 @@ struct _GstMMBufferPoolClass
 GstBufferPool *
 gst_mm_buffer_pool_new (GstElement * element );
 
+GType gst_mm_buffer_pool_get_type (void);
+
+int new_calc_plane(int width, int height);
+int gst_calculate_y_size(int width, int height);
+int gst_calculate_uv_size(int width, int height);
+
 #ifdef USE_TBM_BUFFER
 
 /*MFC Buffer alignment macros*/
@@ -475,4 +484,6 @@ gst_tbm_buffer_pool_new (GstElement * element, GstOMXComponent * component,
 
   return GST_BUFFER_POOL (pool);
 }
+
+
 #endif
index ebd9388..5409802 100755 (executable)
@@ -5,7 +5,7 @@
 
 Name:           gst-plugins-base
 Version:        1.6.1
-Release:        12
+Release:        13
 License:        LGPL-2.0+
 Summary:        GStreamer Streaming-Media Framework Plug-Ins
 Url:            http://gstreamer.freedesktop.org/