diff options
author | Praneeth Paladugu <ppaladug@codeaurora.org> | 2016-04-04 18:27:07 -0700 |
---|---|---|
committer | Arun Menon <avmenon@codeaurora.org> | 2016-05-09 17:20:15 -0700 |
commit | accaaf8fe5dd64d510f50e82a15ad233974846f0 (patch) | |
tree | ce894dcdc7b682bad7be020c85b6f0d166112d4b | |
parent | 8943d964bf14048c698f0fb91888307b93d43575 (diff) | |
download | android_hardware_qcom_media-accaaf8fe5dd64d510f50e82a15ad233974846f0.tar.gz android_hardware_qcom_media-accaaf8fe5dd64d510f50e82a15ad233974846f0.tar.bz2 android_hardware_qcom_media-accaaf8fe5dd64d510f50e82a15ad233974846f0.zip |
mm-video-v4l2: vdec: DPB mode to split for CPU access of buffers
The driver sends info to userspace whether the clip is progressive or
maybe interlaced. For CPU access of buffers, change the DPB mode to
split with DPB as UBWC and OPB as the color format selected when
the clip is progressive. Similarly the DPB mode is in combined mode
when the clip is maybe interlaced.
CRs-fixed: 1004998
Change-Id: Ie31d1eb5543f3d5c2221694e52108975e52baee3
-rw-r--r-- | mm-video-v4l2/vidc/vdec/inc/omx_vdec.h | 1 | ||||
-rw-r--r-- | mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp | 24 |
2 files changed, 10 insertions, 15 deletions
diff --git a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h index b79b9c08..ed44214b 100644 --- a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h +++ b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h @@ -471,6 +471,7 @@ class omx_vdec: public qc_omx_component bool async_thread_force_stop; volatile bool message_thread_stop; struct extradata_info m_extradata_info; + int m_progressive; private: // Bit Positions 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 eee6fc7b..937ffdf8 100644 --- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp +++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp @@ -256,16 +256,14 @@ void* async_message_thread (void *input) vdec_msg.msgdata.output_frame.picsize.frame_height = ptr[0]; vdec_msg.msgdata.output_frame.picsize.frame_width = ptr[1]; DEBUG_PRINT_HIGH("VIDC Port Reconfig received insufficient"); - if (omx->async_message_process(input,&vdec_msg) < 0) { - DEBUG_PRINT_HIGH("async_message_thread Exited"); - break; + if(ptr[2] & V4L2_EVENT_BITDEPTH_FLAG) { + omx->dpb_bit_depth = ptr[3]; + DEBUG_PRINT_HIGH("VIDC Port Reconfig Bitdepth change - %d", ptr[3]); + } + if(ptr[2] & V4L2_EVENT_PICSTRUCT_FLAG) { + omx->m_progressive = ptr[4]; + DEBUG_PRINT_HIGH("VIDC Port Reconfig PicStruct change - %d", ptr[4]); } - } else if (dqevent.type == V4L2_EVENT_MSM_VIDC_PORT_SETTINGS_BITDEPTH_CHANGED_INSUFFICIENT ) { - struct vdec_msginfo vdec_msg; - vdec_msg.msgcode=VDEC_MSG_EVT_CONFIG_CHANGED; - vdec_msg.status_code=VDEC_S_SUCCESS; - omx->dpb_bit_depth = dqevent.u.data[0]; - DEBUG_PRINT_HIGH("VIDC Port Reconfig Bitdepth change - %d", dqevent.u.data[0]); if (omx->async_message_process(input,&vdec_msg) < 0) { DEBUG_PRINT_HIGH("async_message_thread Exited"); break; @@ -996,14 +994,9 @@ OMX_ERRORTYPE omx_vdec::decide_dpb_buffer_mode(bool force_split_mode) bool cpu_access = capture_capability != V4L2_PIX_FMT_NV12_UBWC; - bool is_res_above_1080p = (drv_ctx.video_resolution.frame_width > 1920 && - drv_ctx.video_resolution.frame_height > 1088) || - (drv_ctx.video_resolution.frame_width > 1088 && - drv_ctx.video_resolution.frame_height > 1920); - if (cpu_access) { if (dpb_bit_depth == MSM_VIDC_BIT_DEPTH_8) { - if ((m_force_compressed_for_dpb || is_res_above_1080p) && + if ((m_force_compressed_for_dpb || m_progressive) && !force_split_mode) { //split DPB-OPB //DPB -> UBWC , OPB -> Linear @@ -2317,6 +2310,7 @@ OMX_ERRORTYPE omx_vdec::component_init(OMX_STRING role) } dpb_bit_depth = MSM_VIDC_BIT_DEPTH_8; + m_progressive = MSM_VIDC_PIC_STRUCT_PROGRESSIVE; if (m_disable_ubwc_mode) { capture_capability = V4L2_PIX_FMT_NV12; |