Loading media/libstagefright/codecs/avcenc/SoftAVCEnc.cpp +5 −3 Original line number Diff line number Diff line Loading @@ -1016,10 +1016,10 @@ OMX_ERRORTYPE SoftAVC::internalSetParameter(OMX_INDEXTYPE index, const OMX_PTR p if ((avcType->nAllowedPictureTypes & OMX_VIDEO_PictureTypeB) && avcType->nPFrames) { mBframes = avcType->nBFrames / avcType->nPFrames; mBframes = avcType->nBFrames; } mIInterval = avcType->nPFrames + avcType->nBFrames; mIInterval = (avcType->nPFrames + 1) * (avcType->nBFrames + 1); mConstrainedIntraFlag = avcType->bconstIpred; if (OMX_VIDEO_AVCLoopFilterDisable == avcType->eLoopFilterMode) Loading @@ -1033,7 +1033,9 @@ OMX_ERRORTYPE SoftAVC::internalSetParameter(OMX_INDEXTYPE index, const OMX_PTR p || avcType->bDirect8x8Inference != OMX_FALSE || avcType->bDirectSpatialTemporal != OMX_FALSE || avcType->nCabacInitIdc != 0) { return OMX_ErrorUndefined; // OMX does not allow a way to signal what values are wrong, so it's // best for components to just do best effort in supporting these values ALOGV("ignoring unsupported settings"); } if (OK != ConvertOmxAvcLevelToAvcSpecLevel(avcType->eLevel, &mAVCEncLevel)) { Loading media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp +4 −9 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ SoftMPEG4Encoder::SoftMPEG4Encoder( 176 /* width */, 144 /* height */, callbacks, appData, component), mEncodeMode(COMBINE_MODE_WITH_ERR_RES), mIDRFrameRefreshIntervalInSec(1), mKeyFrameInterval(30), mNumInputFrames(-1), mStarted(false), mSawInputEOS(false), Loading Loading @@ -159,14 +159,7 @@ OMX_ERRORTYPE SoftMPEG4Encoder::initEncParams() { } // Set IDR frame refresh interval if (mIDRFrameRefreshIntervalInSec < 0) { mEncParams->intraPeriod = -1; } else if (mIDRFrameRefreshIntervalInSec == 0) { mEncParams->intraPeriod = 1; // All I frames } else { mEncParams->intraPeriod = (mIDRFrameRefreshIntervalInSec * mFramerate) >> 16; } mEncParams->intraPeriod = mKeyFrameInterval; mEncParams->numIntraMB = 0; mEncParams->sceneDetect = PV_ON; Loading Loading @@ -378,6 +371,8 @@ OMX_ERRORTYPE SoftMPEG4Encoder::internalSetParameter( return OMX_ErrorUndefined; } mKeyFrameInterval = int32_t(mpeg4type->nPFrames + 1); return OMX_ErrorNone; } Loading media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ private: } InputBufferInfo; MP4EncodingMode mEncodeMode; int32_t mIDRFrameRefreshIntervalInSec; int32_t mKeyFrameInterval; // 1: all I-frames, <0: infinite int64_t mNumInputFrames; bool mStarted; Loading Loading
media/libstagefright/codecs/avcenc/SoftAVCEnc.cpp +5 −3 Original line number Diff line number Diff line Loading @@ -1016,10 +1016,10 @@ OMX_ERRORTYPE SoftAVC::internalSetParameter(OMX_INDEXTYPE index, const OMX_PTR p if ((avcType->nAllowedPictureTypes & OMX_VIDEO_PictureTypeB) && avcType->nPFrames) { mBframes = avcType->nBFrames / avcType->nPFrames; mBframes = avcType->nBFrames; } mIInterval = avcType->nPFrames + avcType->nBFrames; mIInterval = (avcType->nPFrames + 1) * (avcType->nBFrames + 1); mConstrainedIntraFlag = avcType->bconstIpred; if (OMX_VIDEO_AVCLoopFilterDisable == avcType->eLoopFilterMode) Loading @@ -1033,7 +1033,9 @@ OMX_ERRORTYPE SoftAVC::internalSetParameter(OMX_INDEXTYPE index, const OMX_PTR p || avcType->bDirect8x8Inference != OMX_FALSE || avcType->bDirectSpatialTemporal != OMX_FALSE || avcType->nCabacInitIdc != 0) { return OMX_ErrorUndefined; // OMX does not allow a way to signal what values are wrong, so it's // best for components to just do best effort in supporting these values ALOGV("ignoring unsupported settings"); } if (OK != ConvertOmxAvcLevelToAvcSpecLevel(avcType->eLevel, &mAVCEncLevel)) { Loading
media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp +4 −9 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ SoftMPEG4Encoder::SoftMPEG4Encoder( 176 /* width */, 144 /* height */, callbacks, appData, component), mEncodeMode(COMBINE_MODE_WITH_ERR_RES), mIDRFrameRefreshIntervalInSec(1), mKeyFrameInterval(30), mNumInputFrames(-1), mStarted(false), mSawInputEOS(false), Loading Loading @@ -159,14 +159,7 @@ OMX_ERRORTYPE SoftMPEG4Encoder::initEncParams() { } // Set IDR frame refresh interval if (mIDRFrameRefreshIntervalInSec < 0) { mEncParams->intraPeriod = -1; } else if (mIDRFrameRefreshIntervalInSec == 0) { mEncParams->intraPeriod = 1; // All I frames } else { mEncParams->intraPeriod = (mIDRFrameRefreshIntervalInSec * mFramerate) >> 16; } mEncParams->intraPeriod = mKeyFrameInterval; mEncParams->numIntraMB = 0; mEncParams->sceneDetect = PV_ON; Loading Loading @@ -378,6 +371,8 @@ OMX_ERRORTYPE SoftMPEG4Encoder::internalSetParameter( return OMX_ErrorUndefined; } mKeyFrameInterval = int32_t(mpeg4type->nPFrames + 1); return OMX_ErrorNone; } Loading
media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ private: } InputBufferInfo; MP4EncodingMode mEncodeMode; int32_t mIDRFrameRefreshIntervalInSec; int32_t mKeyFrameInterval; // 1: all I-frames, <0: infinite int64_t mNumInputFrames; bool mStarted; Loading