微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 手机设计讨论 > MTK手机平台交流 > Android L0 版本 awb Perference gain 不生效问题

Android L0 版本 awb Perference gain 不生效问题

时间:10-02 整理:3721RD 点击:

[DESCRIPTION]
CAMERA_tuning_para_sensorNamemipiraw.cpp文件中修改AWB preference color gain不起作用。
[SOLUTION]
1:MT6582/MT6592 KK 版本的AWB preference color gain 修改是在 camera_tuning_para_SensorNamemipiraw.cpp中。
即下面部分:


L 版本升级的话,增加了 针对不同 LV 下 不同色温下 AWB Preference Gain 的调整。
如果直接修改camera_tuning_para_SensorNamemipiraw.cpp 文件中 Preference Gain部分,是不会 生效的。
在 L0 版本上需要做如下修改:
sensor_awb.cpp Path:alps\vendor\mediatek\proprietary\custom\ [$platform,$project] \hal\imgsensor_src\sensor_awb.cpp中
(1) Add

  1. AWB_PARAM2_T&getAWBParam2_SensorName();

复制代码

(2)

  1. Add #if defined(SensorNameDefine)
  2. case SensorNameId:
  3. return getAWBParam2_SensorName ();
  4. #endif

复制代码

如下以 IMX135 为例说明:

  1. AWB_PARAM2_T& getAWBParam2_IMX135();
  2. AWB_PARAM2_T& getAWBParam2(int sensorId)
  3. {
  4. switch(sensorId)
  5. {
  6. #if defined(IMX135_MIPI_RAW)
  7. case IMX135MIPI_SENSOR_ID:
  8. return getAWBParam2_IMX135();
  9. #endif
  10. default:
  11. return getAWBParam2_default();
  12. }
  13. return getAWBParam2_default();
  14. }

复制代码

(3)在 alps\vendor\mediatek\proprietary\custom\ [$platform,$project] \hal\imgsensor\ SensorName SensorName \ awb_para_ SensorName.cpp里面直接修改不同 色温下不同LV 下 AWB Preference Gain 。 如下以 IMX135 为例说明:

  1. AWB_PARAM2_T& getAWBParam2_IMX135()
  2. {
  3. static AWB_PARAM2_T rAWBParam =
  4. { {
  5. // LV0 LV1 LV2 LV3 LV4 LV5 LV6 LV7 LV8 LV9
  6. {
  7. {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512,512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512,512}, {512, 512, 512},
  8. // LV10 LV11 LV12 LV13 LV14 LV15 LV16 LV17 LV18
  9. {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512,512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 515,512}
  10. }, // STROBE
  11. {
  12. {490, 512, 512}, {490, 512, 512}, {490, 512, 512}, {490, 512, 512}, {490,512, 512}, {490, 512, 512}, {490, 512, 512}, {490, 512, 512}, {490, 512,512}, {490, 512, 512},
  13. {490, 512, 512}, {490, 512, 512}, {490, 512, 512}, {490, 512, 512}, {490,512, 512}, {490, 512, 512}, {490, 512, 512}, {490, 512, 512}, {490, 512,512}
  14. }, // TUNGSTEN
  15. {
  16. {512, 508, 577}, {512, 508, 577}, {512, 508, 577}, {512, 508, 577}, {512,508, 577}, {512, 508, 577}, {512, 508, 577}, {512, 508, 577}, {512, 508,577}, {512, 508, 577},
  17. {512, 508, 577}, {512, 508, 577}, {512, 508, 577}, {512, 508, 577}, {512,508, 577}, {512, 508, 577}, {512, 508, 577}, {512, 508, 577}, {512, 508,577}
  18. }, // WARM F
  19. {
  20. {520, 512, 512}, {520, 512, 512}, {520, 512, 512}, {520, 512, 512}, {520,512, 512}, {520, 512, 512}, {520, 512, 512}, {520, 512, 512}, {520, 512,512}, {520, 512, 512},
  21. {520, 512, 512}, {520, 512, 512}, {520, 512, 512}, {520, 512, 512}, {520,512, 512}, {520, 512, 512}, {520, 512, 512}, {520, 512, 512}, {520, 512,512}
  22. }, // F
  23. {
  24. {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512,512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512,512}, {512, 512, 512},
  25. {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512,512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512,512}
  26. }, // CWF
  27. {
  28. {518, 512, 512}, {518, 512, 512}, {518, 512, 512}, {518, 512, 512}, {518,512, 512}, {518, 512, 512}, {518, 512, 512}, {518, 512, 512}, {518, 512,512}, {518, 512, 512},
  29. {518, 512, 512}, {518, 512, 512}, {518, 512, 512}, {518, 512, 512}, {518,512, 512}, {518, 512, 512}, {518, 512, 512}, {518, 512, 512}, {518, 512,512}
  30. }, // DAYLIGHT
  31. {
  32. {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512,512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512,512}, {512, 512, 512},
  33. {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512,512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512,512}
  34. }, // SHADE
  35. {
  36. {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512,512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512,512}, {512, 512, 512},
  37. {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512,512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512,512}
  38. } // DAYLIGHT F
  39. }
  40. };
  41. return rAWBParam;

复制代码

2:MT6595/MT6752/MT6732/MT6795 等chip L0 版本上
不同色温下不同LV 下 AWB Preference Gain的修改在 awb_tuning_custom_main.cpp或者 awb_tuning_custom_sub.cpp 档案中
但是这样的修改,会影响到 减弱的所有camera 的效果。
awb_tuning_custom_main.cpp或者awb_tuning_custom_sub.cpp 档案 路径:
alps\vendor\mediatek\proprietary\custom\ [$platform,$project] \hal\camera_3a\awb_tuning_custom_main.cpp
因此如果要客制化不同 色温下不同LV 下 AWB Preference Gain的话,建议参考如下说明:

  1. sensor_awb.cpp
  2. Path:alps\vendor\mediatek\proprietary\custom\ [$platform,$project]

复制代码

\hal\imgsensor_src\sensor_awb.cpp中
(1) Add

  1. AWB_PARAM2_T&getAWBParam2_SensorName();

复制代码

(2) Add

  1. #if defined(SensorNameDefine) case SensorNameId:
  2. return getAWBParam2_SensorName ();
  3. #endif

复制代码

如下以 IMX135 为例说明:

  1. AWB_PARAM2_T& getAWBParam2_IMX135();
  2. AWB_PARAM2_T& getAWBParam2(int sensorId)
  3. {
  4. switch(sensorId)
  5. {
  6. #if defined(IMX135_MIPI_RAW)
  7. case IMX135MIPI_SENSOR_ID:
  8. return getAWBParam2_IMX135();
  9. #endif
  10. default:
  11. return getAWBParam2_default();
  12. }
  13. return getAWBParam2_default();
  14. }

复制代码

(3)在 alps\vendor\mediatek\proprietary\custom\ [$platform,$project] \hal\imgsensor\ SensorName SensorName \ awb_para_ SensorName.cpp里面直接修改不同
色温下不同LV 下 AWB Preference Gain 。 如下以 IMX135 为例说明:

  1. AWB_PARAM2_T& getAWBParam2_IMX135()
  2. {
  3. static AWB_PARAM2_T rAWBParam =
  4. { {
  5. // LV0 LV1 LV2 LV3 LV4 LV5 LV6 LV7 LV8 LV9
  6. {
  7. {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512,512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512,512}, {512, 512, 512},
  8. // LV10 LV11 LV12 LV13 LV14 LV15 LV16 LV17 LV18
  9. {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512,512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 515,512}
  10. }, // STROBE
  11. {
  12. {490, 512, 512}, {490, 512, 512}, {490, 512, 512}, {490, 512, 512}, {490,512, 512}, {490, 512, 512}, {490, 512, 512}, {490, 512, 512}, {490, 512,512}, {490, 512, 512},
  13. {490, 512, 512}, {490, 512, 512}, {490, 512, 512}, {490, 512, 512}, {490,512, 512}, {490, 512, 512}, {490, 512, 512}, {490, 512, 512}, {490, 512,512}
  14. }, // TUNGSTEN
  15. {
  16. {512, 508, 577}, {512, 508, 577}, {512, 508, 577}, {512, 508, 577}, {512,508, 577}, {512, 508, 577}, {512, 508, 577}, {512, 508, 577}, {512, 508,577}, {512, 508, 577},
  17. {512, 508, 577}, {512, 508, 577}, {512, 508, 577}, {512, 508, 577}, {512,508, 577}, {512, 508, 577}, {512, 508, 577}, {512, 508, 577}, {512, 508,577}
  18. }, // WARM F
  19. {
  20. {520, 512, 512}, {520, 512, 512}, {520, 512, 512}, {520, 512, 512}, {520,512, 512}, {520, 512, 512}, {520, 512, 512}, {520, 512, 512}, {520, 512,512}, {520, 512, 512},
  21. {520, 512, 512}, {520, 512, 512}, {520, 512, 512}, {520, 512, 512}, {520,512, 512}, {520, 512, 512}, {520, 512, 512}, {520, 512, 512}, {520, 512,512}
  22. }, // F
  23. {
  24. {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512,512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512,512}, {512, 512, 512},
  25. {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512,512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512,512}
  26. }, // CWF
  27. {
  28. {518, 512, 512}, {518, 512, 512}, {518, 512, 512}, {518, 512, 512}, {518,512, 512}, {518, 512, 512}, {518, 512, 512}, {518, 512, 512}, {518, 512,512}, {518, 512, 512},{518, 512, 512}, {518, 512, 512}, {518, 512, 512}, {518, 512, 512}, {518,512, 512}, {518, 512, 512}, {518, 512, 512}, {518, 512, 512}, {518, 512,512}}, // DAYLIGHT{{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512,512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512,512}, {512, 512, 512},{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512,512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512,512}}, // SHADE{{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512,512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512,512}, {512, 512, 512},{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512,512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512,512}} // DAYLIGHT F}};
  29. return rAWBParam;

复制代码

(4) L1 版本 :不同 色温下不同LV 下 AWB Preference Gain直接修改 camera_tuning_para_SensorNamemipiraw.cpp 档案即可。

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top