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})
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")
/* 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
#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.
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
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
};
%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
#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