if (pVideoDec->bDRMPlayerMode == OMX_TRUE) {
pVideoDec->csc_handle = csc_init(CSC_METHOD_HW);
csc_set_hw_property(pVideoDec->csc_handle, CSC_HW_PROPERTY_FIXED_NODE, 2);
+ csc_set_hw_property(pVideoDec->csc_handle, CSC_HW_PROPERTY_HW_TYPE, CSC_HW_TYPE_GSCALER);
csc_set_hw_property(pVideoDec->csc_handle, CSC_HW_PROPERTY_MODE_DRM, pVideoDec->bDRMPlayerMode);
} else {
pVideoDec->csc_handle = csc_init(csc_method);
pVideoEnc->csc_set_format = OMX_FALSE;
#if defined(USE_CSC_GSCALER)
csc_set_hw_property(pVideoEnc->csc_handle, CSC_HW_PROPERTY_FIXED_NODE, CSC_GSCALER_IDX);
+ csc_set_hw_property(pVideoEnc->csc_handle, CSC_HW_PROPERTY_HW_TYPE, CSC_HW_TYPE_GSCALER);
#endif
pExynosComponent->bMultiThreadProcess = OMX_TRUE;
if (m_exynosPictureCSC == NULL)
ALOGE("ERR(%s): csc_init() fail", __FUNCTION__);
csc_set_hw_property(m_exynosPictureCSC, CSC_HW_PROPERTY_FIXED_NODE, PICTURE_GSC_NODE_NUM);
+ csc_set_hw_property(m_exynosPictureCSC, CSC_HW_PROPERTY_HW_TYPE, CSC_HW_TYPE_GSCALER);
m_exynosVideoCSC = csc_init(cscMethod);
if (m_exynosVideoCSC == NULL)
ALOGE("ERR(%s): csc_init() fail", __FUNCTION__);
csc_set_hw_property(m_exynosVideoCSC, CSC_HW_PROPERTY_FIXED_NODE, VIDEO_GSC_NODE_NUM);
+ csc_set_hw_property(m_exynosVideoCSC, CSC_HW_PROPERTY_HW_TYPE, CSC_HW_TYPE_GSCALER);
m_setExifFixedAttribute();
CSC_V_PLANE = 2
} CSC_PLANE;
-typedef enum _CSC_HW_TYPE {
- CSC_HW_TYPE_FIMC = 0,
- CSC_HW_TYPE_GSCALER
-} CSC_HW_TYPE;
-
typedef struct _CSC_FORMAT {
unsigned int width;
unsigned int height;
csc_handle = (CSC_HANDLE *)handle;
if (csc_handle->csc_method == CSC_METHOD_HW) {
-#ifdef ENABLE_FIMC
- csc_handle->csc_hw_type = CSC_HW_TYPE_FIMC;
-#endif
-#ifdef ENABLE_GSCALER
- csc_handle->csc_hw_type = CSC_HW_TYPE_GSCALER;
-#endif
switch (csc_handle->csc_hw_type) {
#ifdef ENABLE_FIMC
case CSC_HW_TYPE_FIMC:
return CSC_ErrorNotInit;
csc_handle = (CSC_HANDLE *)handle;
+
+ if (csc_handle->csc_hw_handle) {
+ ALOGE("%s:: cannot set hw property after hw is already initialized", __func__);
+ return CSC_ErrorUnsupportFormat;
+ }
+
switch (property) {
case CSC_HW_PROPERTY_FIXED_NODE:
csc_handle->hw_property.fixed_node = value;
case CSC_HW_PROPERTY_MODE_DRM:
csc_handle->hw_property.mode_drm = value;
break;
+ case CSC_HW_PROPERTY_HW_TYPE:
+ csc_handle->csc_hw_type = value;
+ break;
default:
ALOGE("%s:: not supported hw property", __func__);
ret = CSC_ErrorUnsupportFormat;
typedef enum _CSC_HW_PROPERTY_TYPE {
CSC_HW_PROPERTY_FIXED_NODE = 0,
CSC_HW_PROPERTY_MODE_DRM,
+ CSC_HW_PROPERTY_HW_TYPE,
} CSC_HW_PROPERTY_TYPE;
+typedef enum _CSC_HW_TYPE {
+ CSC_HW_TYPE_NONE = 0,
+ CSC_HW_TYPE_FIMC,
+ CSC_HW_TYPE_GSCALER,
+ CSC_HW_TYPE_G2D,
+} CSC_HW_TYPE;
+
/*
* change hal pixel format to omx pixel format
*