From 54272c0e474f97ac0269706170eb9161b36a9170 Mon Sep 17 00:00:00 2001 From: wgu11 Date: Mon, 2 Jul 2012 14:41:03 +0800 Subject: Movie studio: make the ASP MPEG4 clip added to movie studio successfully(OMX part) BZ: 44275 adjust the profile/level support for MPEG4, and make H264/H263 follow the style. Change-Id: Iaff4c26cdae7bb964fdd022b60af886b1a1d46e0 Signed-off-by: wgu11 Reviewed-on: http://android.intel.com:8080/54931 Reviewed-by: Feng, Wei Reviewed-by: Ding, Haitao Tested-by: Ding, Haitao Reviewed-by: buildbot Tested-by: buildbot --- videocodec/OMXVideoDecoderMPEG4.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'videocodec/OMXVideoDecoderMPEG4.cpp') diff --git a/videocodec/OMXVideoDecoderMPEG4.cpp b/videocodec/OMXVideoDecoderMPEG4.cpp index d6e6757..0be7571 100644 --- a/videocodec/OMXVideoDecoderMPEG4.cpp +++ b/videocodec/OMXVideoDecoderMPEG4.cpp @@ -113,10 +113,20 @@ OMX_ERRORTYPE OMXVideoDecoderMPEG4::GetParamVideoMpeg4ProfileLevel(OMX_PTR pStru OMX_ERRORTYPE ret; OMX_VIDEO_PARAM_PROFILELEVELTYPE *p = (OMX_VIDEO_PARAM_PROFILELEVELTYPE *)pStructure; CHECK_TYPE_HEADER(p); - CHECK_ENUMERATION_RANGE(p->nProfileIndex,1); - p->eProfile = mParamMpeg4.eProfile; - p->eLevel = mParamMpeg4.eLevel; + struct ProfileLevelTable { + OMX_U32 profile; + OMX_U32 level; + } plTable[] = { + {OMX_VIDEO_MPEG4ProfileSimple, OMX_VIDEO_MPEG4Level3}, + {OMX_VIDEO_MPEG4ProfileAdvancedSimple, OMX_VIDEO_MPEG4Level5} + }; + + OMX_U32 count = sizeof(plTable)/sizeof(ProfileLevelTable); + CHECK_ENUMERATION_RANGE(p->nProfileIndex,count); + + p->eProfile = plTable[p->nProfileIndex].profile; + p->eLevel = plTable[p->nProfileIndex].level; return OMX_ErrorNone; } -- cgit v1.2.3