• mtk camera faq


    一mtk修改对焦模式
    1.log中搜索SensorId知道对应 SensorId
    LensMCU : LensMCU[isSupportLens][CurrSensorDev]0x0001 [CurrSensorId]0x1241
    2.根据SensorId(如0x1241)从kernel中知道对应的宏名称OV12A10MIPI_SENSOR_ID
    lilei@gome07-OptiPlex-7040:~/codes/mtk_8.1_6763_baseline_for_GomeMultiScan/kernel-4.4/drivers/misc/mediatek/imgsensor$ grep -rni "0x1241" ./
    ./src/mt6763/ov12a10_mipi_raw/ov12a10mipiraw_Sensor.c:914:static kal_uint32 return_sensor_id(void) // jack_yan 0x1241
    ./inc/kd_imgsensor.h:190:#define OV12A10MIPI_SENSOR_ID 0x1241
    3.根据sensor宏名称从vendor中查找对应的参数配置目录ov12a10_mipi_raw/,在目录中搜索MTK_CONTROL_AF关键字设置相关对焦配置

    通过上述驱动配置找到对应的sensor
    /codes/mtk_8.1_6763_baseline_for_GomeMultiScan/vendor/mediatek/proprietary/custom/mt6763/hal/imgsensor_metadata/ov12a10_mipi_raw

    查找所有配置自动对焦模式的地方,修改自动对焦模式
    CONFIG_METADATA_BEGIN(MTK_CONTROL_AF_MODE)//(pre:auto)
    CONFIG_ENTRY_VALUE(MTK_CONTROL_AF_MODE_OFF, MUINT8)

    config_request_metadata__.h
    搜MTK_CONTROL_AF

    4.修改后编译
    编译hal默认配置参数路径
    A:codesmtk_8.1_6763_baseline_for_GomeMultiScanvendormediatekproprietaryhardwaremtkcamutilsmetastore

    二.如何判断当前预览或者拍照,走的tuning profile是否正常
    1
    adb shell setprop debug.paramctrl.enable 1
    adb shell setprop debug.isp_debug.enable 1
    2.
    logcat | grep -i "isp_tuning_idx"
    08-06 14:20:47.850 581 17192 D isp_tuning_idx: [IndexMgr][dump] DBS:2, OBC:0, BPC:2, NR1:2, PDC:2, RNR:2, UDM:2, ANR:2, ANR2:2, CCR:2, HFG:2, EE:2, MFB:0, MIX3:0
    08-06 14:20:47.850 581 17192 D isp_tuning_idx: [IndexMgr][dump] DBS:2, OBC:0, BPC:2, NR1:2, PDC:2, RNR:2, UDM:2, ANR:2, ANR2:2, CCR:2, HFG:2, EE:2, MFB:0, MIX3:0
    08-06 14:20:47.850 581 17192 D isp_tuning_idx: [IndexMgr][dump] DBS:1, OBC:0, BPC:1, NR1:1, PDC:1, RNR:1, UDM:1, ANR:1, ANR2:1, CCR:1, HFG:1, EE:1, MFB:0, MIX3:0
    08-06 14:20:47.850 581 17192 D isp_tuning_idx: [IndexMgr][dump] DBS:1, OBC:0, BPC:1, NR1:1, PDC:1, RNR:1, UDM:1, ANR:1, ANR2:1, CCR:1, HFG:1, EE:1, MFB:0, MIX3:0
    08-06 14:20:47.850 581 17192 D isp_tuning_idx: [IndexMgr][dump] DBS:2, OBC:0, BPC:2, NR1:2, PDC:2, RNR:2, UDM:2, ANR:2, ANR2:2, CCR:2, HFG:2, EE:2, MFB:0, MIX3:0
    08-06 14:20:47.851 581 17192 D isp_tuning_idx: [IndexMgr][dump] DBS:2, OBC:0, BPC:2, NR1:2, PDC:2, RNR:2, UDM:2, ANR:2, ANR2:2, CCR:2, HFG:2, EE:2, MFB:0, MIX3:0
    08-06 14:20:47.851 581 17192 D isp_tuning_idx: [IndexMgr][dump] DBS:1, OBC:0, BPC:1, NR1:1, PDC:1, RNR:1, UDM:1, ANR:1, ANR2:1, CCR:1, HFG:1, EE:1, MFB:0, MIX3:0
    08-06 14:20:47.851 581 17192 D isp_tuning_idx: [IndexMgr][dump] DBS:1, OBC:0, BPC:1, NR1:1, PDC:1, RNR:1, UDM:1, ANR:1, ANR2:1, CCR:1, HFG:1, EE:1, MFB:0, MIX3:0
    3.grep -rni "define DBS" ./
    找到对应DBS配置
    /vendor/mediatek/proprietary/custom/mt6763/hal/imgsensor/ver1/ov12a10_mipi_raw$ grep -rni "define DBS_0001"
    camera_isp_regs_preview_ov12a10mipiraw.h:135:#define DBS_0001 /*profile = Preview, sensor = Preview, ISO_1*/{{

    三。mtk修改支持的拍照尺寸
    1.log中搜索SensorId知道对应SensorId
    LensMCU : LensMCU[isSupportLens][CurrSensorDev]0x0001 [CurrSensorId]0x1241
    2.根据SensorId(如0x1241)从kernel中知道对应的宏名称OV12A10MIPI_SENSOR_ID
    3.搜索config.ftbl*找到如下路径文件config.ftbl.ov12a10_mipi_raw.h
    /vendor/mediatek/proprietary/custom/mt6763/hal$ find ./ -name config.ftbl*
    ./sendepfeature/ov12a10_mipi_raw/config.ftbl.ov12a10_mipi_raw.h
    4.打开config.ftbl.ov12a10_mipi_raw.h,搜索KEY_PICTURE_SIZE即对应配置的支持的拍照尺寸列表


    四 log打印会退出处理方法?
    修改logd打印容量 diff如下
    /device/gome/gm18a$ git diff
    diff --git a/device.mk b/device.mk
    index 61d9e6a..4930c9a 100644
    --- a/device.mk
    +++ b/device.mk
    @@ -163,3 +163,4 @@ PRODUCT_BRAND := GOME
    PRODUCT_MANUFACTURER := GOME
    PRODUCT_PROPERTY_OVERRIDES += ro.build.display.factoryid=$(strip $(MTK_BUILD_FACTORYID))

    +PRODUCT_PROPERTY_OVERRIDES += ro.logd.size=16M

    五 录屏功能
    screenrecord --size 1280x720 --time-limit 60 sdcard/weixin.mp4

    六.mtk判断微信是否走turning效果
    请在复现问题前,输入如下adb命令,这样可以在log中实时打印出当前帧所用到的的ISP index,可搜索关键字“isp_tuning_idx”。
    adb shell setprop debug.paramctrl.enable 1
    adb shell setprop debug.isp_debug.enable 1
    七.mtk 打印更多debuglog
    请进camera之前输入:抓取更多log
    adb shell setprop debug.camera.log 3


    八.mtk hal中修改配置的摄像头安装角度
    vendor/mediatek/proprietary/custom/mt6763/hal/imgsensor_src/cfg_setting_imgsensor.cpp
    其中u4Degree_1设置前摄的安装角度,若果预览不正常可以尝试修改角度值
    getSensorOrientation()
    {
    static SensorOrientation_T const inst = {
    .u4Degree_0 = 90, // main sensor in degree (0, 90, 180, 270)
    .u4Degree_1 = 270, // sub sensor in degree (0, 90, 180, 270)
    .u4Degree_2 = 90, // main2 sensor in degree (0, 90, 180, 270)
    .u4Degree_3 = 90, // sub2 sensor in degree (0, 90, 180, 270)
    };

  • 相关阅读:
    lua 取table长度
    [转] 理解 LSTM 网络
    [转]An Intuitive Explanation of Convolutional Neural Networks
    [转]How rival bots battled their way to poker supremacy
    【转】Principles of training multi-layer neural network using backpropagation
    [转]霍夫丁不等式与真实的机器学习
    [转]PLA算法总结及其证明
    jinja2 宏的简单使用总结(macro)
    Python 装饰器
    PYTHON REQUESTS的安装与简单运用
  • 原文地址:https://www.cnblogs.com/adamli/p/10245468.html
Copyright © 2020-2023  润新知