Change define COLOR_PICKER_ENABLE not to affect to jpeglib.h header 34/198034/2 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.011857 accepted/tizen/5.5/unified/mobile/hotfix/20201027.074308 accepted/tizen/5.5/unified/wearable/hotfix/20201027.100624 accepted/tizen/unified/20190128.061327 submit/tizen/20190118.022535 submit/tizen/20190121.012429 submit/tizen_5.5/20191031.000007 submit/tizen_5.5_mobile_hotfix/20201026.185107 submit/tizen_5.5_wearable_hotfix/20201026.184307 tizen_5.5.m2_release
authorjiyong.min <jiyong.min@samsung.com>
Fri, 18 Jan 2019 01:53:38 +0000 (10:53 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Fri, 18 Jan 2019 01:57:21 +0000 (10:57 +0900)
Change-Id: I536fdc4d3ed19d5852b334fe3fd5d3a480c2acf7

CMakeLists.txt
jconfig.h.in
jpeglib.h
packaging/libjpeg-turbo.spec
win/jconfig.h.in

index efeb51a..71d5cae 100644 (file)
@@ -167,6 +167,8 @@ option(WITH_SIMD "Include SIMD extensions, if available for this platform" TRUE)
 boolean_number(WITH_SIMD)
 option(WITH_TURBOJPEG "Include the TurboJPEG API library and associated test programs" TRUE)
 boolean_number(WITH_TURBOJPEG)
+option(ENABLE_COLOR_PICKER "Enable color picker for product TV" FALSE)
+boolean_number(ENABLE_COLOR_PICKER)
 
 macro(report_option var desc)
   if(${var})
@@ -253,6 +255,12 @@ else()
   set(JPEG_LIB_VERSION 62)
 endif()
 
+if(ENABLE_COLOR_PICKER)
+  set(COLOR_PICKER_ENABLE 1)
+else()
+  set(COLOR_PICKER_ENABLE 0)
+endif()
+
 math(EXPR JPEG_LIB_VERSION_DIV10 "${JPEG_LIB_VERSION} / 10")
 math(EXPR JPEG_LIB_VERSION_MOD10 "${JPEG_LIB_VERSION} % 10")
 if(JPEG_LIB_VERSION STREQUAL "62")
index 18a69a4..3cacc49 100644 (file)
@@ -9,6 +9,9 @@
 /* libjpeg-turbo version in integer form */
 #define LIBJPEG_TURBO_VERSION_NUMBER  @LIBJPEG_TURBO_VERSION_NUMBER@
 
+/* for product VD */
+#define COLOR_PICKER_ENABLE @COLOR_PICKER_ENABLE@
+
 /* Support arithmetic encoding */
 #cmakedefine C_ARITH_CODING_SUPPORTED 1
 
index 302b8c6..ddac798 100644 (file)
--- a/jpeglib.h
+++ b/jpeglib.h
@@ -37,7 +37,6 @@ extern "C" {
 #endif
 #endif
 
-
 /* Various constants determining the sizes of things.
  * All of these are specified by the JPEG standard, so don't change them
  * if you want to be compatible.
@@ -504,7 +503,7 @@ struct jpeg_decompress_struct {
 
   unsigned int scale_num, scale_denom; /* fraction by which to scale image */
 
-#ifdef COLOR_PICKER_ENABLE
+#if COLOR_PICKER_ENABLE == 1
   unsigned int region_x, region_y, region_w, region_h; /* if region_w && region_h > 0, then use this region to decode. scale above is done prior to region select */
 #endif
 
@@ -721,7 +720,7 @@ struct jpeg_decompress_struct {
   struct jpeg_color_deconverter *cconvert;
   struct jpeg_color_quantizer *cquantize;
 
-#ifdef COLOR_PICKER_ENABLE
+#if COLOR_PICKER_ENABLE == 1
   struct _Pick_Color_ *pick_color_data;
 #endif
 };
index b3082bc..0f566e8 100644 (file)
@@ -56,9 +56,13 @@ cp %{SOURCE1001} .
 %build
 %if "%{tizen_profile_name}" == "tv"
 echo "tizen_product_tv"
-export CFLAGS="$CFLAGS -D_TIZEN_PRODUCT_TV -D_USE_PRODUCT_TV -DCOLOR_PICKER_ENABLE"
+export CFLAGS="$CFLAGS -D_TIZEN_PRODUCT_TV -D_USE_PRODUCT_TV"
 %endif
-%cmake . -DCMAKE_BUILD_TYPE=Release -DENABLE_SHARED=TRUE -DENABLE_STATIC=FALSE -DWITH_JPEG8=TRUE
+%cmake . -DCMAKE_BUILD_TYPE=Release -DENABLE_SHARED=TRUE -DENABLE_STATIC=FALSE \
+%if "%{tizen_profile_name}" == "tv"
+        -DENABLE_COLOR_PICKER=TRUE \
+%endif
+       -DWITH_JPEG8=TRUE
 %__make %{?jobs:-j%jobs}
 
 %install
index 6db0b34..2af6945 100644 (file)
@@ -1,6 +1,7 @@
 #define JPEG_LIB_VERSION  @JPEG_LIB_VERSION@
 #define LIBJPEG_TURBO_VERSION  @VERSION@
 #define LIBJPEG_TURBO_VERSION_NUMBER  @LIBJPEG_TURBO_VERSION_NUMBER@
+#define COLOR_PICKER_ENABLE @COLOR_PICKER_ENABLE@
 
 #cmakedefine C_ARITH_CODING_SUPPORTED
 #cmakedefine D_ARITH_CODING_SUPPORTED