aboutsummaryrefslogtreecommitdiffstats
path: root/videocodec/OMXVideoEncoderAVC.cpp
diff options
context:
space:
mode:
authorgji2 <guoliang.ji@intel.com>2014-04-22 05:42:03 +0800
committerPatrick Tjin <pattjin@google.com>2014-07-21 22:02:59 -0700
commit88e64cfe7880b3ee81c3e5e34b37a408eb855680 (patch)
tree139bd3b506b2dbbcda5305d5225f2382c608c9e0 /videocodec/OMXVideoEncoderAVC.cpp
parentdc6587395a102b4d59af5010adf5a6507b1f6556 (diff)
downloadandroid_hardware_intel_common_omx-components-88e64cfe7880b3ee81c3e5e34b37a408eb855680.tar.gz
android_hardware_intel_common_omx-components-88e64cfe7880b3ee81c3e5e34b37a408eb855680.tar.bz2
android_hardware_intel_common_omx-components-88e64cfe7880b3ee81c3e5e34b37a408eb855680.zip
Set cabac as default encode parameter
BZ: 190561 Set cabac as default encode parameter compatible for webrtc baseline + cavlc Change-Id: Ie7808a79db5f6db9fea9f3bd2bceb70023673679 Signed-off-by: gji2 <guoliang.ji@intel.com>
Diffstat (limited to 'videocodec/OMXVideoEncoderAVC.cpp')
-rw-r--r--videocodec/OMXVideoEncoderAVC.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/videocodec/OMXVideoEncoderAVC.cpp b/videocodec/OMXVideoEncoderAVC.cpp
index a554ee3..cac4fcb 100644
--- a/videocodec/OMXVideoEncoderAVC.cpp
+++ b/videocodec/OMXVideoEncoderAVC.cpp
@@ -702,6 +702,11 @@ OMX_ERRORTYPE OMXVideoEncoderAVC::GetParamVideoAvc(OMX_PTR pStructure) {
CHECK_PORT_INDEX(p, OUTPORT_INDEX);
mVideoEncoder->getParameters(mAVCParams);
+ if(mParamAvc.eProfile == OMX_VIDEO_AVCProfileHigh)
+ {
+ mAVCParams->bEntropyCodingCABAC = 1;
+ mAVCParams->bDirect8x8Inference = 1;
+ }
mParamAvc.bEntropyCodingCABAC = (OMX_BOOL)mAVCParams->bEntropyCodingCABAC;
mParamAvc.bWeightedPPrediction = (OMX_BOOL)mAVCParams->bWeightedPPrediction;
mParamAvc.nRefIdx10ActiveMinus1 = mAVCParams->refIdx10ActiveMinus1;
@@ -765,6 +770,10 @@ OMX_ERRORTYPE OMXVideoEncoderAVC::SetParamVideoAvc(OMX_PTR pStructure) {
mVideoEncoder->getParameters(mAVCParams);
mAVCParams->bEntropyCodingCABAC = mParamAvc.bEntropyCodingCABAC;
mAVCParams->bDirect8x8Inference = mParamAvc.bDirect8x8Inference;
+ if(mParamAvc.eProfile == OMX_VIDEO_AVCProfileBaseline){
+ mAVCParams->bEntropyCodingCABAC = 0;
+ mAVCParams->bDirect8x8Inference = 0;
+ }
mVideoEncoder->setParameters(mAVCParams);