Feature Table加载原理和调试方法

[FAQ14389] Feature Table加载原理和调试方法

[QUESTION]

  不同branch的feature table的位置可能略有不同,在修改和调试过程中,可能对于加载机制有所疑惑

 

[DESCRIPTION]

 

   1  Feature Table文件的位置:   vendor/mediatek/proprietary/custom//hal/sendepfeature//config.ftbl..h

   因为历史原因,有的会位于vendor/mediatek/proprietary/custom//hal/imgsensor//config.ftbl..h

  

   2  如何确定Feature Table的位置究竟在哪里?

    vendor/mediatek/proprietary/hardware/matkcam/v1/common/paramsmgr/feature/custom/Android.mk

    此文件是如何编译feature table静态库的makefile.

    会有类似如下的语句:

    ifeq ($(wildcard $(MTK_PATH_CUSTOM)/hal/sendepfeature), )

       MY_CUST_FTABLE_PATH +=  $(MTK_PATH_CUSTOM_PLATFORM)/hal/sendepfeature
    endif

    这说明使用的是hal/sendepfeature目录里面的feature table文件。

   

   3 Feature Table文件是如何被编译的?

      如上面的makefile,  它的执行是:

      在指定的目录中寻找feature table文件,并把这些头文件加上#include 字样写到一个中间头文件custgen.config.ftbl.h,此中间头文件会被custom.cpp包含,最终编译到libcam.paramsmgr.feature.custom.a中.

   

 define my-all-config.ftbl-under
$(patsubst ./%,%, \
 $(shell find $(1) -maxdepth 1 \( -name "config.ftbl.*.h" \) -and -not -name ".*") \
 )
endef

 MY_CUST_FTABLE_FILE_LIST := $(call my-all-config.ftbl-under, $(MY_CUST_FTABLE_PATH))

LOCAL_MODULE := libcam.paramsmgr.feature.custom
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
INTERMEDIATES := $(call local-intermediates-dir)
# custom feature table all-in-one file
MY_CUST_FTABLE_FINAL_FILE := $(INTERMEDIATES)/custgen.config.ftbl.h
LOCAL_GENERATED_SOURCES += $(MY_CUST_FTABLE_FINAL_FILE)
$(MY_CUST_FTABLE_FINAL_FILE): $(MY_CUST_FTABLE_FILE_LIST)
 @mkdir -p $(dir $@)
 @echo '//this file is auto-generated; do not modify it!' > $@
 @echo '#define MY_CUST_VERSION "$(MY_CUST_VERSION)"' >> $@
 @echo '#define MY_CUST_FTABLE_FILE_LIST "$(MY_CUST_FTABLE_FILE_LIST)"' >> $@
 @for x in $(MY_CUST_FTABLE_FILE_LIST); do echo "#include <`basename $$x`>" >> $@; done

#-----------------------------------------------------------
include $(BUILD_STATIC_LIBRARY)

  

  4 如何快速调试feature table?

  最终feature table静态库会被编译到libcam.paramsmgr.so中。

  具体的编译为:

 

 touch vendor/mediatek/proprietary/hardware/mtkcam/v1/common/paramsmgr/feature/custom/custom.cpp && \
 mmm -j24 vendor/mediatek/proprietary/hardware/mtkcam/v1/common/paramsmgr/ 2>&1 | tee ft.lib.log && \
 mmm -j24 vendor/mediatek/proprietary//hardware/mtkcam/v1/common/paramsmgr 2>&1 | tee ft.so.log

   最后把生成的libcam.paramsmgr.so 根据32位或者64位push到设备的/system/lib目录或者/system/lib64目录中。

   一般,目前camera app使用的是32位的目录/system/lib.

  因为此动态库是mediaserver加载,用如下命令重启mediaserver来重新加载feature table:

  adb shell stop media && adb shell start media

 

  如果是调试camera app, 请先关闭camera app, 避免app缓存了feature table信息导致调试不生效。

 

  5 从log中如何查看feature table是否生效?

   您可以在log中搜索MtkCam/ParamsManager来确定是否生效,也可以搜索"s8Symbols="来确定加载的是否是指定sensor的feature table.

   "s8Symbols="的log信息来源于Feature.extern.cpp queryCustomFeature函数。

 

  6  深入了解feature table的机制:

   请在vendor/mediatek/proprietary/hardware/mtkcam/v1/common/paramsmgr/feature/custom/Android.mk中增加LOCAL_CFLAGS += -E 来获取custom.cpp预处理后feature table头文件的信息。

  编译feature table静态库,最终会保存在out/target/product//obj/STATIC_LIBRARIES/libcam.paramsmgr.feature.custom_intermediates/custom.o

 

 

 extern "C" bool queryCustCamfeature_SENSOR_DRVNAME_(FeatureKeyedMap& rFMap, uint32_t u4SensorType, int facing) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] """"\r\n", __FUNCTION__));

{

 

    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_SCENE_MODE; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::SCENE_MODE_AUTO }; char const* szDefaultScene_ItemList [] = { MtkCameraParameters::SCENE_MODE_AUTO, MtkCameraParameters::SCENE_MODE_PORTRAIT, MtkCameraParameters::SCENE_MODE_LANDSCAPE, MtkCameraParameters::SCENE_MODE_NIGHT, MtkCameraParameters::SCENE_MODE_NIGHT_PORTRAIT, MtkCameraParameters::SCENE_MODE_THEATRE, MtkCameraParameters::SCENE_MODE_BEACH, MtkCameraParameters::SCENE_MODE_SNOW, MtkCameraParameters::SCENE_MODE_SUNSET, MtkCameraParameters::SCENE_MODE_STEADYPHOTO, MtkCameraParameters::SCENE_MODE_FIREWORKS, MtkCameraParameters::SCENE_MODE_SPORTS, MtkCameraParameters::SCENE_MODE_PARTY, MtkCameraParameters::SCENE_MODE_CANDLELIGHT, MtkCameraParameters::SCENE_MODE_HDR, }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 80 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_EFFECT; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::EFFECT_NONE }; char const* szDefaultScene_ItemList [] = { MtkCameraParameters::EFFECT_NONE, MtkCameraParameters::EFFECT_MONO, MtkCameraParameters::EFFECT_NEGATIVE, MtkCameraParameters::EFFECT_SEPIA, MtkCameraParameters::EFFECT_AQUA, MtkCameraParameters::EFFECT_WHITEBOARD, MtkCameraParameters::EFFECT_BLACKBOARD, MtkCameraParameters::EFFECT_POSTERIZE, MtkCameraParameters::EFFECT_NASHVILLE, MtkCameraParameters::EFFECT_HEFE, MtkCameraParameters::EFFECT_VALENCIA , MtkCameraParameters::EFFECT_XPROII , MtkCameraParameters::EFFECT_LOFI, MtkCameraParameters::EFFECT_SIERRA , MtkCameraParameters::EFFECT_WALDEN , }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 112 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_PICTURE_SIZE; char const* szDefaultScene_ItemDefault[] = { "1600x1200" }; char const* szDefaultScene_ItemList [] = { "512x512", "800x800", "1024x1024", "1280x720", "1600x1200", "1920x1080", "1920x1088" }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 125 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_PREVIEW_SIZE; char const* szDefaultScene_ItemDefault[] = { "1920x1080" }; char const* szDefaultScene_ItemList [] = { "176x144", "320x240", "352x288", "480x320", "480x368", "640x480", "720x480", "800x480", "800x600", "864x480", "800x800", "960x540", "1280x720", "1920x1080", "1920x1088" }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 140 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_VIDEO_SIZE; char const* szDefaultScene_ItemDefault[] = { "1920x1080" }; char const* szDefaultScene_ItemList [] = { "176x144", "320x240", "480x320", "640x480", "720x480", "864x480", "800x800", "1280x720", "1280x960", "1920x1080", "1920x1088" }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 154 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "user"; char const* szFKey = MtkCameraParameters::KEY_PREVIEW_FPS_RANGE; char const* szDefaultScene_ItemDefault[] = { "30000,30000" }; char const* szDefaultScene_ItemList [] = { "(15000,15000)", "(24000,24000)", "(30000,30000)", }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 169 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "user"; char const* szFKey = MtkCameraParameters::KEY_EXPOSURE_COMPENSATION; char const* szDefaultScene_ItemDefault[] = { "0" }; char const* szDefaultScene_ItemList [] = { "-3", "3", "1.0", }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); { char const* szScene = MtkCameraParameters::SCENE_MODE_HDR; char const* szDefault[] = { "0" }; char const* szList [] = { "0", "0", "1.0", }; enum { eListSize = sizeof(szList)/sizeof(szList[0]) }; sceneKeyedMap.add(FSCENE_T(szScene), FeatureInfo(szDefault[0], szList, eListSize)); } rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 196 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_ANTIBANDING; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::ANTIBANDING_AUTO }; char const* szDefaultScene_ItemList [] = { MtkCameraParameters::ANTIBANDING_OFF, MtkCameraParameters::ANTIBANDING_50HZ, MtkCameraParameters::ANTIBANDING_60HZ, MtkCameraParameters::ANTIBANDING_AUTO, }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 212 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "user"; char const* szFKey = MtkCameraParameters::KEY_VIDEO_SNAPSHOT_SUPPORTED; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::TRUE }; char const* szDefaultScene_ItemList [] = { }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 222 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "default-supported"; char const* szFKey = MtkCameraParameters::KEY_VIDEO_STABILIZATION; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::FALSE }; char const* szDefaultScene_ItemList [] = { MtkCameraParameters::TRUE }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 239 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "user"; char const* szFKey = MtkCameraParameters::KEY_ZOOM; char const* szDefaultScene_ItemDefault[] = { "0" }; char const* szDefaultScene_ItemList [] = { "100", "114", "132", "151", "174", "200", "229", "263", "303", "348", "400", }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 255 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_ZSD_MODE; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::ON }; char const* szDefaultScene_ItemList [] = { MtkCameraParameters::OFF, MtkCameraParameters::ON }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 269 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_CAPTURE_MODE; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::CAPTURE_MODE_NORMAL }; char const* szDefaultScene_ItemList [] = { MtkCameraParameters::CAPTURE_MODE_NORMAL, MtkCameraParameters::CAPTURE_MODE_FACE_BEAUTY, MtkCameraParameters::CAPTURE_MODE_CONTINUOUS_SHOT, MtkCameraParameters::CAPTURE_MODE_SMILE_SHOT, MtkCameraParameters::CAPTURE_MODE_AUTO_PANORAMA_SHOT, MtkCameraParameters::CAPTURE_MODE_ASD_SHOT, }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 304 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
        { char const* szFType = "default-supported"; char const* szFKey = MtkCameraParameters::KEY_FACE_BEAUTY; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::FALSE }; char const* szDefaultScene_ItemList [] = { MtkCameraParameters::TRUE }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 318 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
        { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_MFB_MODE; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::KEY_MFB_MODE_MFLL }; char const* szDefaultScene_ItemList [] = { MtkCameraParameters::OFF, MtkCameraParameters::KEY_MFB_MODE_MFLL, MtkCameraParameters::KEY_MFB_MODE_AIS, }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 336 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_3DNR_MODE; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::OFF }; char const* szDefaultScene_ItemList [] = { MtkCameraParameters::ON, MtkCameraParameters::OFF, }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 350 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
}

 

 

{

 

    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_FOCUS_MODE; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::FOCUS_MODE_FIXED }; char const* szDefaultScene_ItemList [] = { MtkCameraParameters::FOCUS_MODE_FIXED, }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 374 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_ISO_SPEED; char const* szDefaultScene_ItemDefault[] = { "auto" }; char const* szDefaultScene_ItemList [] = { "auto", }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); { char const* szScene = MtkCameraParameters::SCENE_MODE_AUTO; char const* szDefault[] = { "auto" }; char const* szList [] = { "auto", "100", "200", "400", "800", "1600", }; enum { eListSize = sizeof(szList)/sizeof(szList[0]) }; sceneKeyedMap.add(FSCENE_T(szScene), FeatureInfo(szDefault[0], szList, eListSize)); } { char const* szScene = MtkCameraParameters::SCENE_MODE_NORMAL; char const* szDefault[] = { "auto" }; char const* szList [] = { "auto", "100", "200", "400", "800", "1600", }; enum { eListSize = sizeof(szList)/sizeof(szList[0]) }; sceneKeyedMap.add(FSCENE_T(szScene), FeatureInfo(szDefault[0], szList, eListSize)); } rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 406 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_WHITE_BALANCE; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::WHITE_BALANCE_AUTO }; char const* szDefaultScene_ItemList [] = { MtkCameraParameters::WHITE_BALANCE_AUTO, MtkCameraParameters::WHITE_BALANCE_INCANDESCENT, MtkCameraParameters::WHITE_BALANCE_FLUORESCENT, MtkCameraParameters::WHITE_BALANCE_WARM_FLUORESCENT, MtkCameraParameters::WHITE_BALANCE_DAYLIGHT, MtkCameraParameters::WHITE_BALANCE_CLOUDY_DAYLIGHT, MtkCameraParameters::WHITE_BALANCE_TWILIGHT, MtkCameraParameters::WHITE_BALANCE_SHADE, }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); { char const* szScene = MtkCameraParameters::SCENE_MODE_LANDSCAPE; char const* szDefault[] = { MtkCameraParameters::WHITE_BALANCE_DAYLIGHT }; char const* szList [] = { MtkCameraParameters::WHITE_BALANCE_AUTO, MtkCameraParameters::WHITE_BALANCE_INCANDESCENT, MtkCameraParameters::WHITE_BALANCE_FLUORESCENT, MtkCameraParameters::WHITE_BALANCE_WARM_FLUORESCENT, MtkCameraParameters::WHITE_BALANCE_DAYLIGHT, MtkCameraParameters::WHITE_BALANCE_CLOUDY_DAYLIGHT, MtkCameraParameters::WHITE_BALANCE_TWILIGHT, MtkCameraParameters::WHITE_BALANCE_SHADE, }; enum { eListSize = sizeof(szList)/sizeof(szList[0]) }; sceneKeyedMap.add(FSCENE_T(szScene), FeatureInfo(szDefault[0], szList, eListSize)); } { char const* szScene = MtkCameraParameters::SCENE_MODE_SUNSET; char const* szDefault[] = { MtkCameraParameters::WHITE_BALANCE_DAYLIGHT }; char const* szList [] = { MtkCameraParameters::WHITE_BALANCE_AUTO, MtkCameraParameters::WHITE_BALANCE_INCANDESCENT, MtkCameraParameters::WHITE_BALANCE_FLUORESCENT, MtkCameraParameters::WHITE_BALANCE_WARM_FLUORESCENT, MtkCameraParameters::WHITE_BALANCE_DAYLIGHT, MtkCameraParameters::WHITE_BALANCE_CLOUDY_DAYLIGHT, MtkCameraParameters::WHITE_BALANCE_TWILIGHT, MtkCameraParameters::WHITE_BALANCE_SHADE, }; enum { eListSize = sizeof(szList)/sizeof(szList[0]) }; sceneKeyedMap.add(FSCENE_T(szScene), FeatureInfo(szDefault[0], szList, eListSize)); } { char const* szScene = MtkCameraParameters::SCENE_MODE_CANDLELIGHT; char const* szDefault[] = { MtkCameraParameters::WHITE_BALANCE_INCANDESCENT }; char const* szList [] = { MtkCameraParameters::WHITE_BALANCE_AUTO, MtkCameraParameters::WHITE_BALANCE_INCANDESCENT, MtkCameraParameters::WHITE_BALANCE_FLUORESCENT, MtkCameraParameters::WHITE_BALANCE_WARM_FLUORESCENT, MtkCameraParameters::WHITE_BALANCE_DAYLIGHT, MtkCameraParameters::WHITE_BALANCE_CLOUDY_DAYLIGHT, MtkCameraParameters::WHITE_BALANCE_TWILIGHT, MtkCameraParameters::WHITE_BALANCE_SHADE, }; enum { eListSize = sizeof(szList)/sizeof(szList[0]) }; sceneKeyedMap.add(FSCENE_T(szScene), FeatureInfo(szDefault[0], szList, eListSize)); } rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 459 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_EDGE; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::MIDDLE }; char const* szDefaultScene_ItemList [] = { MtkCameraParameters::LOW, MtkCameraParameters::MIDDLE, MtkCameraParameters::HIGH, }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 474 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_HUE; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::MIDDLE }; char const* szDefaultScene_ItemList [] = { MtkCameraParameters::LOW, MtkCameraParameters::MIDDLE, MtkCameraParameters::HIGH, }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 489 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_SATURATION; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::MIDDLE }; char const* szDefaultScene_ItemList [] = { MtkCameraParameters::LOW, MtkCameraParameters::MIDDLE, MtkCameraParameters::HIGH, }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 504 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_BRIGHTNESS; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::MIDDLE }; char const* szDefaultScene_ItemList [] = { MtkCameraParameters::LOW, MtkCameraParameters::MIDDLE, MtkCameraParameters::HIGH, }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 519 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
    { char const* szFType = "default-values"; char const* szFKey = MtkCameraParameters::KEY_CONTRAST; char const* szDefaultScene_ItemDefault[] = { MtkCameraParameters::MIDDLE }; char const* szDefaultScene_ItemList [] = { MtkCameraParameters::LOW, MtkCameraParameters::MIDDLE, MtkCameraParameters::HIGH, }; enum { eDefaultScene_ItemListSize = sizeof(szDefaultScene_ItemList)/sizeof(szDefaultScene_ItemList[0]) }; SceneKeyedMap sceneKeyedMap(szFType, FeatureInfo( szDefaultScene_ItemDefault[0], szDefaultScene_ItemList, eDefaultScene_ItemListSize )); rFMap.add(FKEY_T(szFKey), sceneKeyedMap); do { if ( (0) ) { ((void)__android_log_print(ANDROID_LOG_DEBUG, "MtkCam/ParamsManager", "[%s] ""%s=%s""\r\n", __FUNCTION__, szFKey, sceneKeyedMap.getDefault().getDefaultItem().string())); } }while(0); }
# 532 "./device/mediatek/$project_name/custom/hal/sendepfeature/$sensor_name/config.ftbl.$sensor_name.h"
}

return true; }

 可以看出,就是把一些数据加到数组中,最后提供给外部一个query的函数来获取。

你可能感兴趣的:(camera调试)