[hardware/rockchip/camera] Camerahal: v1.0x36.9

This commit is contained in:
Firefly
2015-07-28 20:11:02 +08:00
committed by djw
parent 459cd235b8
commit d2e5260617
10 changed files with 122 additions and 63 deletions

View File

@ -151,6 +151,7 @@ endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM)),rk3368)
LOCAL_CFLAGS += -DTARGET_RK3368
LOCAL_CFLAGS += -DHAVE_ARM_NEON
LOCAL_CFLAGS += -DTARGET_RK32
LOCAL_CFLAGS += -DHAL_MOCKUP
endif

View File

@ -917,7 +917,7 @@ int AppMsgNotifier::Jpegfillgpsinfo(RkGPSInfo *gpsInfo,picture_info_s &params)
int AppMsgNotifier::captureEncProcessPicture(FramInfo_s* frame){
int ret = 0;
int jpeg_w,jpeg_h,i,jpeg_buf_w,jpeg_buf_h;
int jpeg_w,jpeg_h,i;
unsigned int pictureSize;
int jpegSize;
int quality;
@ -980,18 +980,14 @@ int AppMsgNotifier::captureEncProcessPicture(FramInfo_s* frame){
if(picfmt ==V4L2_PIX_FMT_RGB565){
encodetype = HWJPEGENC_RGB565;
pictureSize = jpeg_w * jpeg_h *2;
pictureSize = ((jpeg_w+15)&(~15)) * ((jpeg_h+15)&(~15)) *2;
}
else{
encodetype = JPEGENC_YUV420_SP;
jpeg_buf_w = jpeg_w;
jpeg_buf_h = jpeg_h;
if(jpeg_buf_w%16)
jpeg_buf_w += 8;
if(jpeg_buf_h%16)
jpeg_buf_h += 8;
pictureSize = jpeg_buf_w * jpeg_buf_h * 3/2;
pictureSize = ((jpeg_w+15)&(~15)) * ((jpeg_h+15)&(~15)) * 3/2;
}
jpeg_w = (jpeg_w+15)&(~15);
jpeg_h = (jpeg_h+15)&(~15);
if (pictureSize & 0xfff) {
pictureSize = (pictureSize & 0xfffff000) + 0x1000;
}

View File

@ -171,7 +171,7 @@ status_t CameraAdapter::startPreview(int preview_w,int preview_h,int w, int h, i
//create buffer
LOG_FUNCTION_NAME
unsigned int frame_size = 0,i,buf_w,buf_h;
unsigned int frame_size = 0,i;
struct bufferinfo_s previewbuf;
int ret = 0,buf_count = CONFIG_CAMERA_PREVIEW_BUF_CNT;
LOGD("%s%d:preview_w = %d,preview_h = %d,drv_w = %d,drv_h = %d",__FUNCTION__,__LINE__,preview_w,preview_h,w,h);
@ -181,13 +181,9 @@ status_t CameraAdapter::startPreview(int preview_w,int preview_h,int w, int h, i
{
case V4L2_PIX_FMT_NV12:
case V4L2_PIX_FMT_YUV420:
buf_w = w;
buf_h = h;
if(buf_w%16)
buf_w += 8;
if(buf_h%16)
buf_h += 8;
frame_size = buf_w*buf_h*3/2;
w = (w+15)&(~15);
h = (h+15)&(~15);
frame_size = w*h*3/2;
break;
case V4L2_PIX_FMT_NV16:
case V4L2_PIX_FMT_YUV422P:

View File

@ -504,18 +504,30 @@ namespace android {
*v1.0x36.3:
1) support rk3188 platform.
*v1.0x36.4:
1) fix Luma value to 45 in auto flash mode.
1) fix Luma value to 45 in auto flash mode.
*v1.0x36.5:
1) support rk3188,android5.1.
1) support rk3188,android5.1.
*v1.0x36.6:
1) fix rk3188 thumbnails
1) fix rk3188 thumbnails
*v1.0x36.7:
1) Support the query of iommu_enabled for usb camera.
1) Support the query of iommu_enabled for usb camera.
*v1.0x36.8:
1) bug exist in v1.0x36.7, fix it.
1) bug exist in v1.0x36.7, fix it.
*v1.0x36.9:
1) merge with 3368 camera branch,include follow versions:
*v1.0x30.1:
1) CameraHal_board_xml_parse.cpp: strncpy is not safer,replace it with strlncpy.
*v1.0x30.2:
1) risk exist in v1.0x30.1, fix it.
*v1.0x30.3:
1) enable neon for isp soc camera.
*v1.0x30.4:
1) ensure that input size and offset is 2 alignment for rga.
*v1.0x30.5:
1) src x_offset must be 32 alignment, rga's bug.
*/
#define CONFIG_CAMERAHAL_VERSION KERNEL_VERSION(1, 0x36, 8)
#define CONFIG_CAMERAHAL_VERSION KERNEL_VERSION(1, 0x36, 9)
/* */

13
hardware/rockchip/camera/CameraHal/CameraHalUtil.cpp Executable file → Normal file
View File

@ -494,10 +494,15 @@ extern "C" int rga_nv12_scale_crop(int src_width, int src_height, char *src, sho
Rga_Request.src.vir_w = src_width;
Rga_Request.src.vir_h = src_height;
Rga_Request.src.format = RK_FORMAT_YCbCr_420_SP;
Rga_Request.src.act_w = src_cropW;
Rga_Request.src.act_h = src_cropH;
Rga_Request.src.x_offset = src_left_offset;
Rga_Request.src.y_offset = src_top_offset;
Rga_Request.src.act_w = src_cropW & (~0x01);
Rga_Request.src.act_h = src_cropH & (~0x01);
#if defined(TARGET_RK3368)
Rga_Request.src.x_offset = src_left_offset & (~0x1f);//32 alignment,rga's bug
Rga_Request.src.y_offset = src_top_offset & (~0xf);
#else
Rga_Request.src.x_offset = src_left_offset & (~0x01);
Rga_Request.src.y_offset = src_top_offset & (~0x01);
#endif
#if defined(TARGET_RK3188)
Rga_Request.dst.yrgb_addr = (long)dst;
Rga_Request.dst.uv_addr = (long)dst + dst_width*dst_height;

View File

@ -42,10 +42,10 @@ void camera_board_profiles::ParserSensorInfo(const char *name, const char **att
rk_sensor_info *pSensorInfo = &(pCamInfo->mHardInfo.mSensorInfo);
int result;
if (strcmp(name, "SensorName")==0) {
strncpy(pSensorInfo->mSensorName, atts[1], strlen(atts[1]));
strlcpy(pSensorInfo->mSensorName, atts[1], sizeof(pSensorInfo->mSensorName));
ALOGD("%s(%d): SensorName(%s)\n", __FUNCTION__, __LINE__, pSensorInfo->mSensorName);
} else if (strcmp(name, "SensorLens")==0) {
strncpy(pSensorInfo->mLensName, atts[1], strlen(atts[1]));
strlcpy(pSensorInfo->mLensName, atts[1], sizeof(pSensorInfo->mLensName));
ALOGD("%s(%d): lensName(%s)\n", __FUNCTION__, __LINE__, pSensorInfo->mLensName);
} else if (strcmp(name, "SensorDevID")==0) {
ALOGD("%s(%d): SensorDevID(%s)\n", __FUNCTION__, __LINE__, atts[1]);
@ -64,13 +64,13 @@ void camera_board_profiles::ParserSensorInfo(const char *name, const char **att
ALOGD("%s(%d): SensorHostDevID(%s)\n", __FUNCTION__, __LINE__, atts[1]);
if(strcmp("CAMSYS_DEVID_MARVIN", atts[1])==0){
pSensorInfo->mHostDevid= CAMSYS_DEVID_MARVIN;
strncpy(pSensorInfo->mCamsysDevPath, "/dev/camsys_marvin", sizeof(pSensorInfo->mCamsysDevPath));
strlcpy(pSensorInfo->mCamsysDevPath, "/dev/camsys_marvin", sizeof(pSensorInfo->mCamsysDevPath));
}else if(strcmp("CAMSYS_DEVID_CIF_0", atts[1])==0){
pSensorInfo->mHostDevid = CAMSYS_DEVID_CIF_0;
strncpy(pSensorInfo->mCamsysDevPath, "/dev/camsys_cif0", sizeof(pSensorInfo->mCamsysDevPath));
strlcpy(pSensorInfo->mCamsysDevPath, "/dev/camsys_cif0", sizeof(pSensorInfo->mCamsysDevPath));
}else if(strcmp("CAMSYS_DEVID_CIF_1", atts[1])==0){
pSensorInfo->mHostDevid = CAMSYS_DEVID_CIF_1;
strncpy(pSensorInfo->mCamsysDevPath, "/dev/camsys_cif1", sizeof(pSensorInfo->mCamsysDevPath));
strlcpy(pSensorInfo->mCamsysDevPath, "/dev/camsys_cif1", sizeof(pSensorInfo->mCamsysDevPath));
}else {
pSensorInfo->mHostDevid = 0;
ALOGD("%s(%d): SensorDevID(%s) don't support\n", __FUNCTION__, __LINE__, atts[1]);
@ -89,30 +89,30 @@ void camera_board_profiles::ParserSensorInfo(const char *name, const char **att
pSensorInfo->mMclkRate = atoi(atts[1]);
} else if (strcmp(name,"SensorAvdd")==0){
ALOGD("%s(%d): SensorAvdd(%s) min(%s) max(%s)\n", __FUNCTION__, __LINE__, atts[1], atts[3], atts[5]);
strncpy((char*)pSensorInfo->mAvdd.name, (atts[1]), strlen(atts[1]));
strlcpy((char*)pSensorInfo->mAvdd.name, (atts[1]), sizeof(pSensorInfo->mAvdd.name));
pSensorInfo->mAvdd.min_uv = atoi(atts[3]);
pSensorInfo->mAvdd.max_uv = atoi(atts[5]);
} else if (strcmp(name,"SensorDovdd")==0){
ALOGD("%s(%d): SensorDovdd(%s) min(%s) max(%s)\n", __FUNCTION__, __LINE__, atts[1], atts[3], atts[5]);
strncpy((char*)pSensorInfo->mDovdd.name, (atts[1]), strlen(atts[1]));
strlcpy((char*)pSensorInfo->mDovdd.name, (atts[1]), sizeof(pSensorInfo->mDovdd.name));
pSensorInfo->mDovdd.min_uv = atoi(atts[3]);
pSensorInfo->mDovdd.max_uv = atoi(atts[5]);
} else if (strcmp(name,"SensorDvdd")==0){
ALOGD("%s(%d): SensorDvdd(%s) min(%s) max(%s)\n", __FUNCTION__, __LINE__, atts[1], atts[3], atts[5]);
strncpy((char*)pSensorInfo->mDvdd.name, (atts[1]), strlen(atts[1]));
strlcpy((char*)pSensorInfo->mDvdd.name, (atts[1]), sizeof(pSensorInfo->mDvdd.name));
pSensorInfo->mDvdd.min_uv = atoi(atts[3]);
pSensorInfo->mDvdd.max_uv = atoi(atts[5]);
} else if (strcmp(name,"SensorGpioPwdn")==0){
ALOGD("%s(%d): SensorGpioPwdn(%s) active(%s) \n", __FUNCTION__, __LINE__, atts[1], atts[3]);
strncpy((char*)pSensorInfo->mSensorGpioPwdn.name, (atts[1]), strlen(atts[1]));
strlcpy((char*)pSensorInfo->mSensorGpioPwdn.name, (atts[1]), sizeof(pSensorInfo->mSensorGpioPwdn.name));
pSensorInfo->mSensorGpioPwdn.active = atoi(atts[3]);
} else if (strcmp(name,"SensorGpioRst")==0){
ALOGD("%s(%d): SensorGpioRst(%s) active(%s) \n", __FUNCTION__, __LINE__, atts[1], atts[3]);
strncpy((char*)pSensorInfo->mSensorGpioReset.name, (atts[1]), strlen(atts[1]));
strlcpy((char*)pSensorInfo->mSensorGpioReset.name, (atts[1]), sizeof(pSensorInfo->mSensorGpioReset.name));
pSensorInfo->mSensorGpioReset.active = atoi(atts[3]);
} else if (strcmp(name,"SensorGpioPwen")==0){
ALOGD("%s(%d): SensorGpioPwen(%s) active(%s) \n", __FUNCTION__, __LINE__, atts[1], atts[3]);
strncpy((char*)pSensorInfo->SensorGpioPwen.name, (atts[1]), strlen(atts[1]));
strlcpy((char*)pSensorInfo->SensorGpioPwen.name, (atts[1]), sizeof(pSensorInfo->SensorGpioPwen.name));
pSensorInfo->SensorGpioPwen.active = atoi(atts[3]);
}else if (strcmp(name,"SensorFacing")==0){
ALOGD("%s(%d): SensorFacing(%s) \n", __FUNCTION__, __LINE__, atts[1]);
@ -147,7 +147,7 @@ void camera_board_profiles::ParserSensorInfo(const char *name, const char **att
pSensorInfo->mOrientation = atoi(atts[1]);
}else if(strcmp(name, "SensorDriver")==0){
ALOGD("%s(%d): SensorDriver(%s) \n", __FUNCTION__, __LINE__, atts[1]);
strncpy(pSensorInfo->mSensorDriver, atts[1], sizeof(pSensorInfo->mSensorDriver));
strlcpy(pSensorInfo->mSensorDriver, atts[1], sizeof(pSensorInfo->mSensorDriver));
}else if(strcmp(name, "SensorPhy")==0){
camsys_fmt_t fmt;
@ -232,7 +232,7 @@ void camera_board_profiles::ParserSensorInfo(const char *name, const char **att
}else{
ALOGE("%s(%d): unknown phy mode(%s) \n" ,__FUNCTION__,__LINE__, atts[1]);
}
strncpy(pSensorInfo->mSensorDriver, atts[1], sizeof(pSensorInfo->mSensorDriver));
strlcpy(pSensorInfo->mSensorDriver, atts[1], sizeof(pSensorInfo->mSensorDriver));
}
else if(strcmp(name, "SensorFovParemeter")==0){
sscanf(atts[1], "%f", &(pSensorInfo->fov_h));
@ -253,10 +253,10 @@ void camera_board_profiles::ParserVCMInfo(const char *name, const char **atts, v
if (strcmp(name, "VCMDrvName")==0) {
ALOGD("%s(%d): VCMDrvName(%s)\n", __FUNCTION__, __LINE__, atts[1]);
strncpy(pVcmInfo->mVcmDrvName, atts[1], strlen(atts[1]));
strlcpy(pVcmInfo->mVcmDrvName, atts[1], sizeof(pVcmInfo->mVcmDrvName));
} else if (strcmp(name, "VCMName")==0) {
ALOGD("%s(%d): VCMName(%s)\n", __FUNCTION__, __LINE__, atts[1]);
strncpy(pVcmInfo->mVcmName, atts[1], strlen(atts[1]));
strlcpy(pVcmInfo->mVcmName, atts[1], sizeof(pVcmInfo->mVcmName));
} else if (strcmp(name, "VCMI2cBusNum")==0) {
ALOGD("%s(%d): VCMI2cBusNum(%s)\n", __FUNCTION__, __LINE__, atts[1]);
pVcmInfo->mVcmI2cBusNum = atoi(atts[1]);
@ -268,15 +268,15 @@ void camera_board_profiles::ParserVCMInfo(const char *name, const char **atts, v
pVcmInfo->mVcmI2cRate = atoi(atts[1]);
} else if (strcmp(name,"VCMGpioPwdn")==0){
ALOGD("%s(%d): VCMGpioPwdn(%s) active(%s) \n", __FUNCTION__, __LINE__, atts[1], atts[3]);
strncpy((char*)pVcmInfo->mVcmGpioPwdn.name, (atts[1]), strlen(atts[1]));
strlcpy((char*)pVcmInfo->mVcmGpioPwdn.name, (atts[1]), sizeof(pVcmInfo->mVcmGpioPwdn.name));
pVcmInfo->mVcmGpioPwdn.active = atoi(atts[3]);
} else if (strcmp(name,"VCMGpioPower")==0){
ALOGD("%s(%d): VCMGpioPower(%s) active(%s) \n", __FUNCTION__, __LINE__, atts[1], atts[3]);
strncpy((char*)pVcmInfo->mVcmGpioPower.name, (atts[1]), strlen(atts[1]));
strlcpy((char*)pVcmInfo->mVcmGpioPower.name, (atts[1]), sizeof(pVcmInfo->mVcmGpioPower.name));
pVcmInfo->mVcmGpioPower.active = atoi(atts[3]);
} else if (strcmp(name,"VCMVdd")==0){
ALOGD("%s(%d): VCMVdd(%s) min(%s) max(%s)\n", __FUNCTION__, __LINE__, atts[1], atts[3], atts[5]);
strncpy((char*)pVcmInfo->mVcmVdd.name, (atts[1]), strlen(atts[1]));
strlcpy((char*)pVcmInfo->mVcmVdd.name, (atts[1]), sizeof(pVcmInfo->mVcmVdd.name));
pVcmInfo->mVcmVdd.min_uv= atoi(atts[3]);
pVcmInfo->mVcmVdd.max_uv= atoi(atts[5]);
} else if (strcmp(name,"VCMCurrent") == 0) {
@ -306,7 +306,7 @@ void camera_board_profiles::ParserFlashInfo(const char *name, const char **atts,
if (strcmp(name, "FlashName")==0) {
ALOGD("%s(%d): FlashName(%s)\n", __FUNCTION__, __LINE__, atts[1]);
strncpy(pFlashInfo->mFlashName, atts[1], strlen(atts[1]));
strlcpy(pFlashInfo->mFlashName, atts[1], sizeof(pFlashInfo->mFlashName));
} else if (strcmp(name, "FlashI2cBusNum")==0) {
ALOGD("%s(%d): FlashI2cBusNum(%s)\n", __FUNCTION__, __LINE__, atts[1]);
pFlashInfo->mFlashI2cBusNum = atoi(atts[1]);
@ -318,11 +318,11 @@ void camera_board_profiles::ParserFlashInfo(const char *name, const char **atts,
pFlashInfo->mFlashI2cRate = atoi(atts[1]);
} else if (strcmp(name,"FlashTrigger")==0){
ALOGD("%s(%d): FlashTrigger(%s) active(%s) \n", __FUNCTION__, __LINE__, atts[1], atts[3]);
strncpy((char*)pFlashInfo->mFlashTrigger.name, (atts[1]), strlen(atts[1]));
strlcpy((char*)pFlashInfo->mFlashTrigger.name, (atts[1]), sizeof(pFlashInfo->mFlashTrigger.name));
pFlashInfo->mFlashTrigger.active = atoi(atts[3]);
} else if (strcmp(name,"FlashEn")==0){
ALOGD("%s(%d): FlashEn(%s) active(%s) \n", __FUNCTION__, __LINE__, atts[1], atts[3]);
strncpy((char*)pFlashInfo->mFlashEn.name, (atts[1]), strlen(atts[1]));
strlcpy((char*)pFlashInfo->mFlashEn.name, (atts[1]), sizeof(pFlashInfo->mFlashEn.name));
pFlashInfo->mFlashEn.active = atoi(atts[3]);
}else if(strcmp(name,"FlashModeType")==0){
pFlashInfo->mFlashMode = atoi(atts[1]);
@ -601,7 +601,7 @@ void camera_board_profiles::ParserDVConfig(const char *name, const char **atts,
ALOGD("%s(%d): DV_QCIF(%s) resolution(%sx%s) fps(%s) support(%s)\n", __FUNCTION__, __LINE__, atts[1],atts[3], atts[5],atts[7],atts[9]);
pDVResolution = new rk_DV_info();
if(pDVResolution){
strncpy(pDVResolution->mName, atts[1], strlen(atts[1]));
strlcpy(pDVResolution->mName, atts[1], sizeof(pDVResolution->mName));
pDVResolution->mWidth = atoi(atts[3]);
pDVResolution->mHeight = atoi(atts[5]);
pDVResolution->mFps = atoi(atts[7]);
@ -613,7 +613,7 @@ void camera_board_profiles::ParserDVConfig(const char *name, const char **atts,
ALOGD("%s(%d): DV_QVGA(%s) resolution(%sx%s) fps(%s) support(%s)\n", __FUNCTION__, __LINE__, atts[1],atts[3], atts[5],atts[7],atts[9]);
pDVResolution = new rk_DV_info();
if(pDVResolution){
strncpy(pDVResolution->mName, atts[1], strlen(atts[1]));
strlcpy(pDVResolution->mName, atts[1], sizeof(pDVResolution->mName));
pDVResolution->mWidth = atoi(atts[3]);
pDVResolution->mHeight = atoi(atts[5]);
pDVResolution->mFps = atoi(atts[7]);
@ -625,7 +625,7 @@ void camera_board_profiles::ParserDVConfig(const char *name, const char **atts,
ALOGD("%s(%d): DV_CIF(%s) resolution(%sx%s) fps(%s) support(%s)\n", __FUNCTION__, __LINE__, atts[1],atts[3], atts[5],atts[7],atts[9]);
pDVResolution = new rk_DV_info();
if(pDVResolution){
strncpy(pDVResolution->mName, atts[1], strlen(atts[1]));
strlcpy(pDVResolution->mName, atts[1], sizeof(pDVResolution->mName));
pDVResolution->mWidth = atoi(atts[3]);
pDVResolution->mHeight = atoi(atts[5]);
pDVResolution->mFps = atoi(atts[7]);
@ -637,7 +637,7 @@ void camera_board_profiles::ParserDVConfig(const char *name, const char **atts,
ALOGD("%s(%d): DV_VGA(%s) resolution(%sx%s) fps(%s) support(%s)\n", __FUNCTION__, __LINE__, atts[1],atts[3], atts[5],atts[7],atts[9]);
pDVResolution = new rk_DV_info();
if(pDVResolution){
strncpy(pDVResolution->mName, atts[1], strlen(atts[1]));
strlcpy(pDVResolution->mName, atts[1], sizeof(pDVResolution->mName));
pDVResolution->mWidth = atoi(atts[3]);
pDVResolution->mHeight = atoi(atts[5]);
pDVResolution->mFps = atoi(atts[7]);
@ -649,7 +649,7 @@ void camera_board_profiles::ParserDVConfig(const char *name, const char **atts,
ALOGD("%s(%d): DV_480P(%s) resolution(%sx%s) fps(%s) support(%s)\n", __FUNCTION__, __LINE__, atts[1],atts[3], atts[5],atts[7],atts[9]);
pDVResolution = new rk_DV_info();
if(pDVResolution){
strncpy(pDVResolution->mName, atts[1], strlen(atts[1]));
strlcpy(pDVResolution->mName, atts[1], sizeof(pDVResolution->mName));
pDVResolution->mWidth = atoi(atts[3]);
pDVResolution->mHeight = atoi(atts[5]);
pDVResolution->mFps = atoi(atts[7]);
@ -661,7 +661,7 @@ void camera_board_profiles::ParserDVConfig(const char *name, const char **atts,
ALOGD("%s(%d): DV_SVGA(%s) resolution(%sx%s) fps(%s) support(%s)\n", __FUNCTION__, __LINE__, atts[1],atts[3], atts[5],atts[7],atts[9]);
pDVResolution = new rk_DV_info();
if(pDVResolution){
strncpy(pDVResolution->mName, atts[1], strlen(atts[1]));
strlcpy(pDVResolution->mName, atts[1], sizeof(pDVResolution->mName));
pDVResolution->mWidth = atoi(atts[3]);
pDVResolution->mHeight = atoi(atts[5]);
pDVResolution->mFps = atoi(atts[7]);
@ -673,7 +673,7 @@ void camera_board_profiles::ParserDVConfig(const char *name, const char **atts,
ALOGD("%s(%d): DV_720P(%s) resolution(%sx%s) fps(%s) support(%s)\n", __FUNCTION__, __LINE__, atts[1],atts[3], atts[5],atts[7],atts[9]);
pDVResolution = new rk_DV_info();
if(pDVResolution){
strncpy(pDVResolution->mName, atts[1], strlen(atts[1]));
strlcpy(pDVResolution->mName, atts[1], sizeof(pDVResolution->mName));
pDVResolution->mWidth = atoi(atts[3]);
pDVResolution->mHeight = atoi(atts[5]);
pDVResolution->mFps = atoi(atts[7]);
@ -685,7 +685,7 @@ void camera_board_profiles::ParserDVConfig(const char *name, const char **atts,
ALOGD("%s(%d): DV_1080P(%s) resolution(%sx%s) fps(%s) support(%s)\n", __FUNCTION__, __LINE__, atts[1],atts[3], atts[5],atts[7],atts[9]);
pDVResolution = new rk_DV_info();
if(pDVResolution){
strncpy(pDVResolution->mName, atts[1], strlen(atts[1]));
strlcpy(pDVResolution->mName, atts[1], sizeof(pDVResolution->mName));
pDVResolution->mWidth = atoi(atts[3]);
pDVResolution->mHeight = atoi(atts[5]);
pDVResolution->mFps = atoi(atts[7]);
@ -1146,8 +1146,8 @@ int camera_board_profiles::RegisterSensorDevice(rk_cam_total_info* pCamInfo)
extdev.dovdd.min_uv = pSensorInfo->mDovdd.min_uv;
extdev.dovdd.max_uv = pSensorInfo->mDovdd.max_uv;
strlcpy((char*)extdev.dvdd.name, (char*)pSensorInfo->mDvdd.name,sizeof(extdev.dvdd.name));
extdev.dovdd.min_uv = pSensorInfo->mDvdd.min_uv;
extdev.dovdd.max_uv = pSensorInfo->mDvdd.max_uv;
extdev.dvdd.min_uv = pSensorInfo->mDvdd.min_uv;
extdev.dvdd.max_uv = pSensorInfo->mDvdd.max_uv;
strlcpy((char*)extdev.afvdd.name, (char*)pVcmInfo->mVcmVdd.name,sizeof(extdev.afvdd.name));
extdev.afvdd.min_uv = pVcmInfo->mVcmVdd.min_uv;
extdev.afvdd.max_uv = pVcmInfo->mVcmVdd.max_uv;
@ -2048,9 +2048,9 @@ int camera_board_profiles::ProduceNewXml(camera_board_profiles* profiles)
//if((int)nCamNum>=1){
if((int)nCamNum>=1 && fileexit == -1){
LOG1("enter produce new xml\n");
//new xml file name
strncpy(default_file, RK_DEFAULT_MEDIA_PROFILES_XML_PATH, sizeof(default_file));
strncpy(dst_file, RK_DST_MEDIA_PROFILES_XML_PATH, sizeof(dst_file));
//new xml file name
strlcpy(default_file, RK_DEFAULT_MEDIA_PROFILES_XML_PATH, sizeof(default_file));
strlcpy(dst_file, RK_DST_MEDIA_PROFILES_XML_PATH, sizeof(dst_file));
strlcpy(temp_dst_file, RK_TMP_MEDIA_PROFILES_XML_PATH, sizeof(temp_dst_file));
for(int i=0; i<(int)nCamNum; i++){
@ -2087,7 +2087,7 @@ int camera_board_profiles::LoadSensor(camera_board_profiles* profiles)
int err = RK_RET_SUCCESS;
int count = 0;
int result= 0;
LOG_FUNCTION_NAME
strlcpy(dst_file, RK_DST_MEDIA_PROFILES_XML_PATH, sizeof(dst_file));

View File

@ -69,6 +69,28 @@ extern "C" void arm_isp_yuyv_12bit_to_8bit (int src_w, int src_h,char *srcbuf,ui
if(ycSequence == ISI_YCSEQ_CBYCRY){
int n = y_size;
if(!is0bitto0bit){
#if defined(TARGET_RK3368)
asm volatile (
" pld [%[src], %[src_stride], lsl #2] \n\t"
" cmp %[n], #8 \n\t"
" blt 5f \n\t"
"0: @ 16 pixel swap \n\t"
" vld2.32 {q0,q1} , [%[src]]! @ q0 = dat0 q1 = dat1 \n\t"
" vshr.u32 q0,q0,#8 @ now q0 -> y1 00 v0 00 \n\t"
" vshr.u32 q1,q1,#8 @ now q1 -> y0 00 u0 00 \n\t"
" vswp q0, q1 @ now q0 = q1 q1 = q0 \n\t"
" vuzp.u8 q0,q4 @ now d0 = y0u0.. d8 = 00.. \n\t"
" vuzp.u8 q1,q5 @ now d2 = y1v0.. d10 = 00.. \n\t"
" vst2.16 {d0,d2},[%[dst_buf]]!@ now q0 -> dst \n\t"
" sub %[n], %[n], #8 \n\t"
" cmp %[n], #8 \n\t"
" bge 0b \n\t"
"5: @ end \n\t"
: [dst_buf] "+r" (dst_buf),[src] "+r" (srcint), [n] "+r" (n) ,[tmp] "+r" (is0bitto0bit)
: [src_stride] "r" (y_size)
: "cc", "memory", "q0", "q1", "q2","q3"
);
#else
asm volatile (
" pld [%[src], %[src_stride], lsl #2] \n\t"
" cmp %[n], #8 \n\t"
@ -89,6 +111,7 @@ extern "C" void arm_isp_yuyv_12bit_to_8bit (int src_w, int src_h,char *srcbuf,ui
: [src_stride] "r" (y_size)
: "cc", "memory", "q0", "q1", "q2","q3"
);
#endif
}else{
asm volatile (
" pld [%[src], %[src_stride], lsl #2] \n\t"

View File

@ -1,3 +1,5 @@
ifneq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), box)
ifeq ($(strip $(TARGET_BOARD_PLATFORM)), rk3368)
PRODUCT_PACKAGES += \
@ -44,6 +46,10 @@ PRODUCT_COPY_FILES += \
hardware/rockchip/camera/Config/cam_board_rk3288.xml:system/etc/cam_board.xml
endif
else
PRODUCT_PACKAGES += \
libisp_silicomimageisp_api
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM)), rk312x)
PRODUCT_PACKAGES += \

18
hardware/rockchip/camera/Config/user.mk Executable file → Normal file
View File

@ -1,3 +1,21 @@
ifeq ($(strip $(TARGET_BOARD_PLATFORM)), rk3368)
PRODUCT_PACKAGES += \
libisp_isi_drv_OV2659 \
libisp_isi_drv_OV8825 \
libisp_isi_drv_OV8820 \
libisp_isi_drv_OV8858 \
libisp_isi_drv_OV5648 \
libisp_isi_drv_OV5640 \
libisp_isi_drv_OV13850 \
libisp_isi_drv_HM2057 \
libisp_isi_drv_SP2518 \
libisp_isi_drv_GC0308 \
libisp_isi_drv_GC2035 \
libisp_isi_drv_GC2155 \
libisp_isi_drv_NT99252 \
libisp_isi_drv_OV2685
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM)), rk3288)
PRODUCT_PACKAGES += \

View File

@ -72,10 +72,12 @@ extern "C"
* 1). support for isi v0.5.0
*v0.a.0
* 1). support for isi v0.7.0
*v0.b.0
* 1). support for isi v0.8.0
*/
#define CONFIG_SENSOR_DRV_VERSION KERNEL_VERSION(0, 0xa, 0)
#define CONFIG_SENSOR_DRV_VERSION KERNEL_VERSION(0, 0xb, 0)