[FAQ18418]三方APK录像preview偏暗

xiaoxiao2021-02-28  113

[DESCRIPTION]    

三方APK录像时候preview偏暗,一般是因为有将帧率固定为30帧,是否设置了固定帧率可以看是否有类似以下的log打印出来,其中m_i4AEMinFps = m_i4AEMaxFps

058894 01-01 00:13:29.409972   343   992 D ae_mgr  : m_i4AEMinFps: 300 m_i4AEMaxFps:300

    [SOLUTION]    

具体分三种case

 1.录像时候有开启EIS

Solution请参考FAQ17385:录像打开EIS后画面变的突然很暗

   2. M版本中,cpp 中的setParameters函数会去吃config.ftbl.xxxmipiraw.h中设定的preview fps range

Solution请参考FAQ18200Android M 第三方camera APK, preview video偏暗

   3. MT6580、MT6735M、MT6735P平台,修改以上两种case依然还是固定帧率

Solution

1/vendor/mediatek/proprietary/platform/mt6580/hardware/mtkcam/v1/hal/adapter/MtkDefault/MtkDefaultCamParameter.cpp

 

status_t

CamAdapter::

setParameters()

函数内将

if(mpParamsMgr->getRecordingHint())

129 {

130 cam3aParam.i4MinFps = mpParamsMgr->getInt(CameraParameters::KEY_PREVIEW_FRAME_RATE)*1000;

131 cam3aParam.i4MaxFps = mpParamsMgr->getInt(CameraParameters::KEY_PREVIEW_FRAME_RATE)*1000;

132 }

133 else

134 {

135 cam3aParam.i4MinFps = 5000;

136 cam3aParam.i4MaxFps = 60000;

137 }

修改为:

cam3aParam.i4MinFps = 5000;

cam3aParam.i4MaxFps = 60000;

2./vendor/mediatek/proprietary/platform/mt6580/hardware/mtkcam/v1/hal/adapter/MtkDefault/MtkDefaultCamAdapter.Record.cpp

文件中的函数

status_t

CamAdapter::

onHandleStartRecording()

{

中的语句

cam3aParam.i4MinFps = mpParamsMgr->getInt(CameraParameters::KEY_PREVIEW_FRAME_RATE)*1000;

cam3aParam.i4MaxFps = mpParamsMgr->getInt(CameraParameters::KEY_PREVIEW_FRAME_RATE)*1000;

修改为:

cam3aParam.i4MinFps = 5000;

cam3aParam.i4MaxFps = 60000;

转载请注明原文地址: https://www.6miu.com/read-25095.html

最新回复(0)