Android P 三方AP预览录像偏暗

问题描述

 Android P版本,三方APK使用camera出现预览、录像偏暗.
Roootcause:AP选择规定帧率设定下来给AE,导致AEpline被帧率限定住. 例如微信 fix15fps,抖音fix30fps

解决方案

对于 alps-mp-p0.mp1请先申请patch ALPS04268930,
并将CUST_FIX_FPS_PLINE (in ae_mgr.h)设定为1.然后自行客制化AEplinetable。
step by step guide如下:
 
 1/vendor/mediatek/proprietary/custom/common/hal/inc/custom/aaa/AEPlinetable.h
添加一组scene mode for fix fps
typedef enum
{
LIB3A_AE_SCENE_UNSUPPORTED = -1,
LIB3A_AE_SCENE_OFF = 0, // disable AE
LIB3A_AE_SCENE_AUTO = 1, // auto mode full auto ,EV ISO LCE .. is inactive

LIB3A_AE_SCENE_CSHOT = 200,
LIB3A_AE_SCENE_SWEEP_PANORAMA = 201,
LIB3A_AE_SCENE_FIX_15FPS = 202,
LIB3A_AE_SCENE_FIX_30FPS = 203,
} LIB3A_AE_SCENE_T;

2 /vendor/mediatek/proprietary/hardware/mtkcam/aaa/source/isp_30/ae_mgr/ae_mgr_pline.cpp

MRESULT AeMgr::setSceneMode(MUINT32 u4NewAEScene)
{

if((m_i4AEMaxFps == m_i4AEMinFps) ){
if(m_i4AEMinFps==150){
eAEScene = LIB3A_AE_SCENE_FIX_15FPS;
AE_LOG_IF(m_3ALogEnable,"Modify scene mode : %d for 3rd AP fix 15fps", eAEScene);
}
else if(m_i4AEMinFps == 300){
eAEScene = LIB3A_AE_SCENE_FIX_30FPS;
AE_LOG_IF(m_3ALogEnable,"Modify scene mode : %d for 3rd AP fix 30fps", eAEScene);
}
else{
AE_LOG_IF(m_3ALogEnable,"m_i4AEMinFps:%d,m_i4AEMaxFps:%d", m_i4AEMinFps,m_i4AEMaxFps);
}
}
if (m_eAEScene != eAEScene) {
AE_LOG("[setSceneMode] m_eAEScene: %d old:%d\n", eAEScene, m_eAEScene);
if(m_eAEScene == LIB3A_AE_SCENE_FIREWORKS)
{
m_bUpdateAELockIdx = MTRUE;
}
…..
}
3修改camera_AE_PlineTable_xxxmipiraw.h中的mapping表,添加一组LIB3A_AE_SCENE_FIX_15FPS,将preview,capture,video,zsd的table mapping到一组没有用过的AE table index上,比如AETABLE_SCENE_INDEX8, 然后用CCT重新去gen这组table, 将帧率卡在15fps的时候把gain拉大.
static strAESceneMapping g_AEScenePLineMapping =
{
{

{LIB3A_AE_SCENE_FIX_15FPS, {AETABLE_SCENE_INDEX8,AETABLE_SCENE_INDEX8,AETABLE_SCENE_INDEX8,AETABLE_VIDEO1_AUTO,AETABLE_VIDEO2_AUTO,AETABLE_CUSTOM1_AUTO,AETABLE_CUSTOM2_AUTO,AETABLE_CUSTOM3_AUTO,AETABLE_CUSTOM4_AUTO,AETABLE_CUSTOM5_AUTO,AETABLE_SCENE_INDEX8}}, //reserve for future
}

}

作者: RESSRC

个人资源站

发表评论

邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据