aboutsummaryrefslogtreecommitdiffstats
path: root/videocodec/OMXVideoEncoderBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'videocodec/OMXVideoEncoderBase.cpp')
-rw-r--r--videocodec/OMXVideoEncoderBase.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/videocodec/OMXVideoEncoderBase.cpp b/videocodec/OMXVideoEncoderBase.cpp
index 63ab076..70d6b60 100644
--- a/videocodec/OMXVideoEncoderBase.cpp
+++ b/videocodec/OMXVideoEncoderBase.cpp
@@ -28,7 +28,6 @@ OMXVideoEncoderBase::OMXVideoEncoderBase()
,mEncoderParams(NULL)
,mFrameInputCount(0)
,mFrameOutputCount(0)
- ,mPFrames(0)
,mFrameRetrieved(OMX_TRUE)
,mFirstFrame(OMX_TRUE)
,mStoreMetaDataInBuffers(OMX_FALSE) {
@@ -271,11 +270,11 @@ OMX_ERRORTYPE OMXVideoEncoderBase::SetVideoEncoderParam() {
mConfigFramerate.xEncodeFramerate = paramPortDefinitionInput->format.video.xFramerate >> 16;
}
- if(mPFrames == 0) {
- mPFrames = mEncoderParams->frameRate.frameRateNum / 2;
- mPFrames = (mPFrames < 15) ? 15 : mPFrames; // Limit intra frame period to ensure video quality for low bitrate application.
+ if(mEncoderParams->intraPeriod == 0) {
+ OMX_U32 intraPeriod = mEncoderParams->frameRate.frameRateNum / 2;
+ mEncoderParams->intraPeriod = (intraPeriod < 15) ? 15 : intraPeriod; // Limit intra frame period to ensure video quality for low bitrate application.
}
- mEncoderParams->intraPeriod = mPFrames;
+
mEncoderParams->rawFormat = RAW_FORMAT_NV12;
LOGV("frameRate.frameRateDenom = %d\n", mEncoderParams->frameRate.frameRateDenom);