[Decoder/Sub] build static lib
authorJaeyun <jy1210.jung@samsung.com>
Fri, 19 Jul 2019 06:42:50 +0000 (15:42 +0900)
committerwooksong <wook16.song@samsung.com>
Wed, 24 Jul 2019 10:52:59 +0000 (19:52 +0900)
change font file in decoder-subplugins to build static library.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
ext/nnstreamer/tensor_decoder/meson.build
ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c
ext/nnstreamer/tensor_decoder/tensordec-font.c [moved from ext/nnstreamer/tensor_decoder/font.h with 98% similarity]
ext/nnstreamer/tensor_decoder/tensordec-pose.c
jni/nnstreamer.mk

index 79a64ae..bd82b60 100644 (file)
@@ -46,7 +46,8 @@ static_library('nnstreamer_decoder_image_labeling',
 
 # bounding boxes
 decoder_sub_bounding_boxes_sources = [
-  'tensordec-boundingbox.c'
+  'tensordec-boundingbox.c',
+  'tensordec-font.c'
 ]
 
 nnstreamer_decoder_bounding_boxes_sources = []
@@ -69,7 +70,8 @@ static_library('nnstreamer_decoder_bounding_boxes',
 
 # pose estimation
 decoder_sub_pose_estimation_sources = [
-  'tensordec-pose.c'
+  'tensordec-pose.c',
+  'tensordec-font.c'
 ]
 
 nnstreamer_decoder_pose_estimation_sources = []
index 79db973..a7bb1d1 100644 (file)
 #include <glib.h>
 #include <gst/gst.h>
 #include <math.h>               /* expf */
-#include "font.h"
 #include <nnstreamer_plugin_api_decoder.h>
 #include <nnstreamer_plugin_api.h>
 
 void init_bb (void) __attribute__ ((constructor));
 void fini_bb (void) __attribute__ ((destructor));
 
+/* font.c */
+extern uint8_t rasters[][13];
+
 #define BOX_SIZE                  4
 #define TFLITE_SSD_DETECTION_MAX  1917
 #define TFLITE_SSD_MAX_TENSORS    2
similarity index 98%
rename from ext/nnstreamer/tensor_decoder/font.h
rename to ext/nnstreamer/tensor_decoder/tensordec-font.c
index 9fed530..1c2d22d 100644 (file)
@@ -35,7 +35,7 @@
  * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
  */
 /**
- * @file font.h
+ * @file tensordec-font.c
  * @date 20 Nov 2018
  * @brief imported from font.c of https://courses.cs.washington.edu/courses/cse457/98a/tech/OpenGL/font.c
  *        and modified to support tensordec-boundingbox.c
@@ -44,9 +44,9 @@
  * @bug No known bugs.
  * @author Silicon Graphics Inc. (imported and modified by MyungJoo Ham <myungjoo.ham@samsung.com>)
  */
-#ifndef _NNSTREAMER_FONT_H_
-#define _NNSTREAMER_FONT_H_
+
 #include <stdint.h>
+
 /**
  * raster[ch][12] is the top pixels
  * raster[ch][0] is the bottom pixels
@@ -150,4 +150,4 @@ uint8_t rasters[][13] = {
 {0x00, 0x00, 0xf0, 0x18, 0x18, 0x18, 0x1c, 0x0f, 0x1c, 0x18, 0x18, 0x18, 0xf0},
 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x8f, 0xf1, 0x60, 0x00, 0x00, 0x00}
 };
-#endif /* _NNSTREAMER_FONT_H_ */
+
index 019b53a..d4ed1f5 100644 (file)
@@ -34,7 +34,6 @@
 #include <string.h>
 #include <stdint.h>
 #include <glib.h>
-#include "font.h"
 #include <gst/gst.h>
 #include <nnstreamer_plugin_api_decoder.h>
 #include <nnstreamer_plugin_api.h>
@@ -42,6 +41,9 @@
 void init_pose (void) __attribute__ ((constructor));
 void finish_pose (void) __attribute__ ((destructor));
 
+/* font.c */
+extern uint8_t rasters[][13];
+
 #define POSE_SIZE                  14
 #define PIXEL_VALUE               (0xFFFFFFFF)  /* White 100% in RGBA */
 
index 48be275..6a0b36c 100644 (file)
@@ -71,7 +71,8 @@ NNSTREAMER_FILTER_CAFFE2_SRCS := \
 
 # decoder boundingbox
 NNSTREAMER_DECODER_BB_SRCS := \
-    $(NNSTREAMER_EXT_HOME)/tensor_decoder/tensordec-boundingbox.c
+    $(NNSTREAMER_EXT_HOME)/tensor_decoder/tensordec-boundingbox.c \
+    $(NNSTREAMER_EXT_HOME)/tensor_decoder/tensordec-font.c
 
 # decoder directvideo
 NNSTREAMER_DECODER_DV_SRCS := \
@@ -83,7 +84,8 @@ NNSTREAMER_DECODER_IL_SRCS := \
 
 # decoder pose estimation
 NNSTREAMER_DECODER_PE_SRCS := \
-    $(NNSTREAMER_EXT_HOME)/tensor_decoder/tensordec-pose.c
+    $(NNSTREAMER_EXT_HOME)/tensor_decoder/tensordec-pose.c \
+    $(NNSTREAMER_EXT_HOME)/tensor_decoder/tensordec-font.c
 
 # common features
 NO_AUDIO := false