summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-02-09 08:58:00 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-02-09 08:58:00 -0800
commit0193b9c6b599e2be787fbb50bcd1cad8416b5d66 (patch)
treeb4b8b81fe89e14de8a9c4d319ec22522eaffe92d
parenta7f1dda4184ef2a44ae06557e6f3b7df46060e44 (diff)
parent48fa270814e1a4b9701515dc12a4939eb67890cf (diff)
downloadandroid_hardware_qcom_media-0193b9c6b599e2be787fbb50bcd1cad8416b5d66.tar.gz
android_hardware_qcom_media-0193b9c6b599e2be787fbb50bcd1cad8416b5d66.tar.bz2
android_hardware_qcom_media-0193b9c6b599e2be787fbb50bcd1cad8416b5d66.zip
Merge "mm-video-v4l2: vidc: venc: Fix profile and level setting issue"
-rw-r--r--mm-video-v4l2/vidc/venc/inc/omx_video_base.h1
-rw-r--r--mm-video-v4l2/vidc/venc/src/omx_video_base.cpp7
-rw-r--r--mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp3
-rw-r--r--mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp22
4 files changed, 28 insertions, 5 deletions
diff --git a/mm-video-v4l2/vidc/venc/inc/omx_video_base.h b/mm-video-v4l2/vidc/venc/inc/omx_video_base.h
index eb403090..883c18c7 100644
--- a/mm-video-v4l2/vidc/venc/inc/omx_video_base.h
+++ b/mm-video-v4l2/vidc/venc/inc/omx_video_base.h
@@ -631,6 +631,7 @@ class omx_video: public qc_omx_component
OMX_SKYPE_VIDEO_PARAM_DRIVERVER m_sDriverVer;
OMX_SKYPE_VIDEO_CONFIG_QP m_sConfigQP;
QOMX_EXTNINDEX_VIDEO_VENC_SAR m_sSar;
+ QOMX_VIDEO_H264ENTROPYCODINGTYPE m_sParamEntropy;
PrependSPSPPSToIDRFramesParams m_sPrependSPSPPS;
OMX_U32 m_sExtraData;
OMX_U32 m_input_msg_id;
diff --git a/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp b/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
index fc189127..e7e3845c 100644
--- a/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
+++ b/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
@@ -1682,6 +1682,13 @@ OMX_ERRORTYPE omx_video::get_parameter(OMX_IN OMX_HANDLETYPE hComp,
memcpy(pParam, &m_sParamProfileLevel, sizeof(m_sParamProfileLevel));
break;
}
+ case OMX_QcomIndexConfigH264EntropyCodingCabac:
+ {
+ QOMX_VIDEO_H264ENTROPYCODINGTYPE * pParam = (QOMX_VIDEO_H264ENTROPYCODINGTYPE*)paramData;
+ DEBUG_PRINT_LOW("get_parameter: OMX_QcomIndexConfigH264EntropyCodingCabac");
+ memcpy(pParam, &m_sParamEntropy, sizeof(m_sParamEntropy));
+ break;
+ }
/*Component should support this port definition*/
case OMX_IndexParamAudioInit:
{
diff --git a/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp b/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp
index a55744e7..94a61165 100644
--- a/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp
+++ b/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp
@@ -355,6 +355,9 @@ OMX_ERRORTYPE omx_venc::component_init(OMX_STRING role)
m_sParamProfileLevel.eLevel = (OMX_U32) OMX_VIDEO_HEVCMainTierLevel1;
}
+ OMX_INIT_STRUCT(&m_sParamEntropy, QOMX_VIDEO_H264ENTROPYCODINGTYPE);
+ m_sParamEntropy.bCabac = OMX_FALSE;
+
// Initialize the video parameters for input port
OMX_INIT_STRUCT(&m_sInPortDef, OMX_PARAM_PORTDEFINITIONTYPE);
m_sInPortDef.nPortIndex= (OMX_U32) PORT_INDEX_IN;
diff --git a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
index 4f58521f..532172da 100644
--- a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
+++ b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
@@ -3965,11 +3965,6 @@ bool venc_dev::venc_set_profile_level(OMX_U32 eProfile,OMX_U32 eLevel)
return true;
}
- if (vqzip_sei_info.enabled) {
- DEBUG_PRINT_HIGH("VQZIP is enabled. Profile and Level set by client. Skipping validation");
- return true;
- }
-
DEBUG_PRINT_LOW("Validating Profile/Level from table");
if (!venc_validate_profile_level(&eProfile, &eLevel)) {
@@ -4798,6 +4793,12 @@ bool venc_dev::venc_set_target_bitrate(OMX_U32 nTargetBitrate, OMX_U32 config)
(unsigned int)nTargetBitrate);
struct v4l2_control control;
int rc = 0;
+
+ if (vqzip_sei_info.enabled) {
+ DEBUG_PRINT_HIGH("For VQZIP 1.0, Bitrate setting is not supported");
+ return true;
+ }
+
control.id = V4L2_CID_MPEG_VIDEO_BITRATE;
control.value = nTargetBitrate;
@@ -4836,6 +4837,12 @@ bool venc_dev::venc_set_encode_framerate(OMX_U32 encode_framerate, OMX_U32 confi
parm.parm.output.timeperframe.numerator = frame_rate_cfg.fps_denominator;
parm.parm.output.timeperframe.denominator = frame_rate_cfg.fps_numerator;
+ if (vqzip_sei_info.enabled) {
+ DEBUG_PRINT_HIGH("For VQZIP 1.0, Framerate setting is not supported");
+ return true;
+ }
+
+
if (frame_rate_cfg.fps_numerator > 0)
rc = ioctl(m_nDriver_fd, VIDIOC_S_PARM, &parm);
@@ -6106,6 +6113,11 @@ bool venc_dev::venc_validate_profile_level(OMX_U32 *eProfile, OMX_U32 *eLevel)
OMX_U32 mb_per_frame, mb_per_sec;
bool profile_level_found = false;
+ if (vqzip_sei_info.enabled) {
+ DEBUG_PRINT_HIGH("VQZIP is enabled. Profile and Level set by client. Skipping validation");
+ return true;
+ }
+
DEBUG_PRINT_LOW("Init profile table for respective codec");
//validate the ht,width,fps,bitrate and set the appropriate profile and level