aboutsummaryrefslogtreecommitdiffstats
path: root/videocodec/OMXVideoDecoderMPEG4.cpp
diff options
context:
space:
mode:
authorwgu11 <wangyi.gu@intel.com>2012-07-02 14:41:03 +0800
committerPatrick Tjin <pattjin@google.com>2014-07-21 22:02:47 -0700
commit54272c0e474f97ac0269706170eb9161b36a9170 (patch)
tree6a590eddd9737c7ddeb956cbc003d259d1d2c0e8 /videocodec/OMXVideoDecoderMPEG4.cpp
parentd128eedd844b44fa32ae952216d74d64b3b58a4f (diff)
downloadandroid_hardware_intel_common_omx-components-54272c0e474f97ac0269706170eb9161b36a9170.tar.gz
android_hardware_intel_common_omx-components-54272c0e474f97ac0269706170eb9161b36a9170.tar.bz2
android_hardware_intel_common_omx-components-54272c0e474f97ac0269706170eb9161b36a9170.zip
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 <wangyi.gu@intel.com> Reviewed-on: http://android.intel.com:8080/54931 Reviewed-by: Feng, Wei <wei.feng@intel.com> Reviewed-by: Ding, Haitao <haitao.ding@intel.com> Tested-by: Ding, Haitao <haitao.ding@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
Diffstat (limited to 'videocodec/OMXVideoDecoderMPEG4.cpp')
-rw-r--r--videocodec/OMXVideoDecoderMPEG4.cpp16
1 files changed, 13 insertions, 3 deletions
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;
}