GC0339 Camera Rawdata hal层分析
很久没有出blog了,因为一直在解Bug,今天我不想成为一个解bug机器,所以我抽出一点时间来整理我本不熟悉的camera.希望各位技术达人勇于拍砖. 目前我调试的是基于高通msm7627a平台的格科微摄像头GC0339.代码主要集中在vendor/qcom/android-open/libcamera2/目录下和vendor/qcom/proprietary/mm-camera/ 目录下. 从vendor/qcom/android-open/libcamera2/目录下看Android.mk,发现7x27a系列只用到了QualcommCameraHardware.cpp文件.我们先从修改色彩效果入手: 函数status_t QualcommCameraHardware::setParameters(const CameraParameters& params)下有个if ((rc = setEffect(params))) final_rc = rc; --> status_t QualcommCameraHardware::setEffect(const CameraParameters& params) --> native_set_parms(CAMERA_PARM_EFFECT, sizeof(value), (void *)&value,(int *)&result); --> mCfgControl.mm_camera_set_parm(type,value); --> mm-vamera/targets/tgtcommon/config/config_proc_ctrlcmd.c里面的函数int8_t config_proc_MSM_V4L2_PROC_CTRL_CMD(void *parm1, void *parm2) --> case CAMERA_SET_PARM_EFFECT:
rc = config_proc_ctrlcmd(CAMERA_SET_PARM_EFFECT, ctrl, ctrlCmd);
break; 因为#define config_proc_ctrlcmd(ctrlcmd, parm1, parm2) config_proc_##ctrlcmd(parm1, parm2) 所以config_proc_ctrlcmd(CAMERA_SET_PARM_EFFECT, ctrl, ctrlCmd); == int8_t config_proc_CAMERA_SET_PARM_EFFECT(void *parm1, void *parm2); --> config_set_parm_effect(ctrl, effect); --> effects_set_special_effect(ctrl, effect); 走到 /mm-camera/targets/tgtcommon/effects/effects.c 里面的函数int8_t effects_set_special_effect(void *ctrl, int32_t parm) --> case CAMERA_EFFECT_AQUA:
vfe_util_update_color_conversion(&chrom3a->aqua_color_conversion,
&effect->color_conversion_matrix); 走到高通的Vfe了.这样一个流程来走camera的效果代码.
|