summaryrefslogtreecommitdiff
path: root/mm-video-v4l2/vidc
diff options
context:
space:
mode:
authorShi Zhongbo <zhongbos@codeaurora.org>2017-11-30 13:50:58 +0800
committerSanthosh Behara <santhoshbehara@codeaurora.org>2018-04-05 13:08:40 +0530
commiteb025445a62c4f5d0c9d8b9c2520b251bf25fd59 (patch)
treed0e879495d49d4211cb24e899db024786cf93b52 /mm-video-v4l2/vidc
parentd7429f70394fe53a84358066576d50dc71694fc9 (diff)
downloadmedia-eb025445a62c4f5d0c9d8b9c2520b251bf25fd59.tar.gz
mm-video-v4l2: vdec: add HEVC main10 profile query support
Add HEVC main10 profile in the supported profile list for client's query. Change-Id: I1e3a9d204b3340bad68a57bee9f23ff04052acd1
Diffstat (limited to 'mm-video-v4l2/vidc')
-rwxr-xr-xmm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
index 46413664..17f0dc69 100755
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -3382,7 +3382,8 @@ OMX_ERRORTYPE omx_vdec::get_supported_profile_level(OMX_VIDEO_PARAM_PROFILELEVEL
QOMX_VIDEO_AVCProfileMain,
QOMX_VIDEO_AVCProfileConstrainedHigh,
QOMX_VIDEO_AVCProfileHigh };
- int hevc_profiles[2] = { OMX_VIDEO_HEVCProfileMain,
+ int hevc_profiles[3] = { OMX_VIDEO_HEVCProfileMain,
+ OMX_VIDEO_HEVCProfileMain10,
OMX_VIDEO_HEVCProfileMain10HDR10 };
int mpeg2_profiles[2] = { OMX_VIDEO_MPEG2ProfileSimple,
OMX_VIDEO_MPEG2ProfileMain};
@@ -3487,9 +3488,24 @@ OMX_ERRORTYPE omx_vdec::get_supported_profile_level(OMX_VIDEO_PARAM_PROFILELEVEL
/* Check if the profile is supported by driver or not */
/* During query caps of profile driver sends a mask of */
/* of all v4l2 profiles supported(in the flags field) */
- if (!profile_level_converter::convert_omx_profile_to_v4l2(output_capability, profileLevelType->eProfile, &v4l2_profile)) {
- DEBUG_PRINT_ERROR("Invalid profile, cannot find corresponding omx profile");
- return OMX_ErrorHardware;
+ if(output_capability != V4L2_PIX_FMT_HEVC) {
+ if (!profile_level_converter::convert_omx_profile_to_v4l2(output_capability, profileLevelType->eProfile, &v4l2_profile)) {
+ DEBUG_PRINT_ERROR("Invalid profile, cannot find corresponding omx profile");
+ return OMX_ErrorHardware;
+ }
+ }else { //convert omx profile to v4l2 profile for HEVC Main10 and Main10HDR10 profiles,seperately
+ switch (profileLevelType->eProfile) {
+ case OMX_VIDEO_HEVCProfileMain:
+ v4l2_profile = V4L2_MPEG_VIDC_VIDEO_HEVC_PROFILE_MAIN;
+ break;
+ case OMX_VIDEO_HEVCProfileMain10:
+ case OMX_VIDEO_HEVCProfileMain10HDR10:
+ v4l2_profile = V4L2_MPEG_VIDC_VIDEO_HEVC_PROFILE_MAIN10;
+ break;
+ default:
+ DEBUG_PRINT_ERROR("Invalid profile, cannot find corresponding omx profile");
+ return OMX_ErrorHardware;
+ }
}
if(!((profile_cap.flags >> v4l2_profile) & 0x1)) {