diff options
| author | wgu11 <wangyi.gu@intel.com> | 2012-07-02 14:41:03 +0800 |
|---|---|---|
| committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 22:02:47 -0700 |
| commit | 54272c0e474f97ac0269706170eb9161b36a9170 (patch) | |
| tree | 6a590eddd9737c7ddeb956cbc003d259d1d2c0e8 | |
| parent | d128eedd844b44fa32ae952216d74d64b3b58a4f (diff) | |
| download | android_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>
| -rw-r--r-- | videocodec/OMXVideoDecoderAVC.cpp | 19 | ||||
| -rw-r--r-- | videocodec/OMXVideoDecoderH263.cpp | 15 | ||||
| -rw-r--r-- | videocodec/OMXVideoDecoderMPEG4.cpp | 16 |
3 files changed, 40 insertions, 10 deletions
diff --git a/videocodec/OMXVideoDecoderAVC.cpp b/videocodec/OMXVideoDecoderAVC.cpp index 054c6bb..d54ce99 100644 --- a/videocodec/OMXVideoDecoderAVC.cpp +++ b/videocodec/OMXVideoDecoderAVC.cpp @@ -15,7 +15,7 @@ */ -#define LOG_NDEBUG 0 +// #define LOG_NDEBUG 0 #define LOG_TAG "OMXVideoDecoder" #include <utils/Log.h> #include "OMXVideoDecoderAVC.h" @@ -283,10 +283,21 @@ OMX_ERRORTYPE OMXVideoDecoderAVC::GetParamVideoAVCProfileLevel(OMX_PTR pStructur OMX_VIDEO_PARAM_PROFILELEVELTYPE *p = (OMX_VIDEO_PARAM_PROFILELEVELTYPE *)pStructure; CHECK_TYPE_HEADER(p); CHECK_PORT_INDEX(p, INPORT_INDEX); - CHECK_ENUMERATION_RANGE(p->nProfileIndex,1); - p->eProfile = mParamAvc.eProfile; - p->eLevel = mParamAvc.eLevel; + struct ProfileLevelTable { + OMX_U32 profile; + OMX_U32 level; + } plTable[] = { + {OMX_VIDEO_AVCProfileBaseline, OMX_VIDEO_AVCLevel41}, + {OMX_VIDEO_AVCProfileMain, OMX_VIDEO_AVCLevel41}, + {OMX_VIDEO_AVCProfileHigh, OMX_VIDEO_AVCLevel41} + }; + + 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; } diff --git a/videocodec/OMXVideoDecoderH263.cpp b/videocodec/OMXVideoDecoderH263.cpp index 35697db..424ab54 100644 --- a/videocodec/OMXVideoDecoderH263.cpp +++ b/videocodec/OMXVideoDecoderH263.cpp @@ -113,10 +113,19 @@ OMX_ERRORTYPE OMXVideoDecoderH263::GetParamVideoH263ProfileLevel(OMX_PTR pStruct 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 = mParamH263.eProfile; - p->eLevel = mParamH263.eLevel; + struct ProfileLevelTable { + OMX_U32 profile; + OMX_U32 level; + } plTable[] = { + {OMX_VIDEO_H263ProfileBaseline, OMX_VIDEO_H263Level70} + }; + + 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; } 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; } |
