如何修改 zoomRatio
修改过程:
1, 先找到 gZoomRatio 数组序列的值
Location: V:\project_code\project_name\ALPS.JB.MP.V1_W_20120919\mediatek\platform\mt6577\hardware\camera\hal\CamAdapter\mHal\mHalCamParameters.cpp
/******************************************************************************
*
*******************************************************************************/
//NOTE: zoomRatio can be customized. BUT
//Ratio should be no less than 100. The first one must be 100.
//The upper bound is limited to hardware capability.
//Value must be ordered in ascedent
static const uint32_t gZoomRatio[] = {
// 100, 114, 132, 151, 174,
// 200, 229, 263, 303, 348,
100, 104, 109, 114, 119, 124, 130, 135, 141, 148, 154, 161, 168, 176, 183, 192,
201, 209, 218, 228, 238, 248, 260, 271, 283, 295, 308, 322, 336, 351, 367, 383,
400
};
2, 修改 zoomRatio 当中的某一个值,譬如将 200 修改为 201
3, 编译命令及模块 ./mk -t mm mediatek/platform/mt6577/hardware/camera/
4, 将编译得到的 out/target/product/bbk17_td3001_jb/system/lib/hw/camera.default.so push 到手机端 system/lib/hw 目录下
5, 需要重启 mediaserver
6, zoomRatio 的确定原则:
确定基准值 100, 200,400
得到 2开根号5次方 的值(1.14),每次用上一次的值去乘以该值,
譬如
100, 100*1.14, 100*1.14^2, 100*1.14^3, 100*1.14^4
200, 200*1.14, 200*1.14^2, 200*1.14^3, 200*1.14^4
400
这一组值。
这组值越多,手势变焦时过渡就越平滑。而通过变焦条变焦只有8个级别,是通过index 除法运算得到的,每隔多少个值取一个值,组成的8个值