|
解决mipi摄像头只能打开一次的方案
发表于 2015-3-27 18:14:10
浏览:9239
|
回复:1
打印
只看该作者
[复制链接]
楼主
打开/hardware/rk29/camera/CameraHal/CameraIspAdapter.cpp
@@ -171,6 +171,8 @@ void CameraIspAdapter::setupPreview(int width_sensor,int height_sensor,int previ
{
CamEngineWindow_t dcWin;
//when cts FOV ,don't crop
+ALOGE("=====width_sensor:%d,height_sensor:%d,preview_w:%d,preview:h:%d========",
+ width_sensor,height_sensor,preview_w,preview_h);
if((!mImgAllFovReq)&&((width_sensor*10/height_sensor) != (preview_w*10/preview_h))){
int ratio = ((width_sensor*10/preview_w) >= (height_sensor*10/preview_h))?(height_sensor*10/preview_h):(width
dcWin.width = ((ratio*preview_w/10) & ~0x1);
@@ -1363,6 +1365,14 @@ void CameraIspAdapter::loadSensor( const int cameraId)
m_camDevice->getPreferedSensorRes(&resReq);
m_camDevice->setSensorResConfig(resReq.resolution);
+
+ ALOGE("zhansb>>>:mCamDrvWidth=%d,mCamDrvHeight:%d,RES_W:%d,RES_H:%d",
+ mCamDrvWidth,mCamDrvHeight,
+ ISI_RES_W_GET(resReq.resolution), ISI_RES_H_GET(resReq.resolution));
+
+ mCamDrvWidth= ISI_RES_W_GET(resReq.resolution);
+ mCamDrvHeight= ISI_RES_H_GET(resReq.resolution);
+
setupPreview(mCamDrvWidth,mCamDrvHeight,DEFAULTPREVIEWWIDTH,DEFAULTPREVIEWHEIGHT,mZoomVal);
connectCamera();
mCamPreviewH = DEFAULTPREVIEWHEIGHT;
|
|