Forums - Performance of H.264 encoding on Sensation XE (OMX)

1 post / 0 new
Performance of H.264 encoding on Sensation XE (OMX)
cschiang
Join Date: 29 Aug 12
Posts: 2
Posted: Sat, 2012-09-08 23:45

 

Hello all,

I've tried to do H.264 encoding using HTC Sensation XE.

But it takes 240ms (average) to encode 1 frame (544x960 YUV format).

I also found the size after H.264 encoding all around 30K (per frame), which is way too big. 

I guess there's something wrong with my parameter, please help to check my parameter:

======================================================

FrameWidth=544
FrameHeight=960
FrameRate=10 
RateControl=1 
RateControl=3 
BitRate=544*960*3

 

Comparing to the sample code of qcom_video_codec_sample_1_3_1:

FrameWidth=320
FrameHeight=240
FrameRate=10
RateControl=3 (OMX_Video_ControlRateVariableSkipFrames)
BitRate=320*240*3

 

The code is as below:

======================================================

if (OMX_VIDEO_AVCProfileBaseline == omxProfileLevel.eProfile &&

OMX_VIDEO_AVCLevel41 <= omxProfileLevel.eLevel) {

DBGL();

break;

}

omxAVC.bEnableUEP = OMX_FALSE;

omxAVC.bEnableFMO = OMX_FALSE;

omxAVC.bEnableASO = OMX_FALSE;

omxAVC.bEnableRS = OMX_FALSE;

omxAVC.eProfile = OMX_VIDEO_AVCProfileBaseline;

if (omxAVC.eProfile == OMX_VIDEO_AVCProfileBaseline) {

omxAVC.nSliceHeaderSpacing = 0;

omxAVC.nPFrames = 1/*IFrame Interval*/ * ctx->omxProp.frameRate;

omxAVC.nBFrames = 0;

omxAVC.bUseHadamard = OMX_TRUE;

omxAVC.nRefFrames = 1;

omxAVC.nRefIdx10ActiveMinus1 = 0;

omxAVC.nRefIdx11ActiveMinus1 = 0;

omxAVC.bEntropyCodingCABAC = OMX_FALSE;

omxAVC.bWeightedPPrediction = OMX_FALSE;

omxAVC.bconstIpred = OMX_FALSE;

omxAVC.bDirect8x8Inference = OMX_FALSE;

omxAVC.bDirectSpatialTemporal = OMX_FALSE;

omxAVC.nCabacInitIdc = 0;

}

 

omxAVC.nAllowedPictureTypes = OMX_VIDEO_PictureTypeI;

if (omxAVC.nPFrames > 0) {

omxAVC.nAllowedPictureTypes |= OMX_VIDEO_PictureTypeP;

}

if (omxAVC.nBFrames > 0) {

omxAVC.nAllowedPictureTypes |= OMX_VIDEO_PictureTypeB;

}

omxAVC.bFrameMBsOnly = OMX_TRUE;

omxAVC.bMBAFF = OMX_FALSE;

omxAVC.eLoopFilterMode = OMX_VIDEO_AVCLoopFilterEnable;

======================================================

 

 

 

  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.