From d7429f70394fe53a84358066576d50dc71694fc9 Mon Sep 17 00:00:00 2001 From: Surajit Podder Date: Wed, 31 Jan 2018 16:38:52 +0530 Subject: mm-video-v4l2: Fix issue with crop update Initiate port reconfig on sequence changed sufficient event with change in resolution, if downscalar is not enabled and split mode is enabled, to ensure OPB resolution is correctly set. This ensures output port resolution is consistent in capture port format and output extradata. Change-Id: Ifda1915f9d49cabeb77529df980e3474f5372186 --- mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'mm-video-v4l2/vidc/vdec/src') 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 2aa3fc2a..46413664 100755 --- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp +++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp @@ -313,6 +313,12 @@ void* async_message_thread (void *input) } } + if (!omx->is_down_scalar_enabled && omx->m_is_split_mode && + (omx->drv_ctx.video_resolution.frame_height != ptr[0] || + omx->drv_ctx.video_resolution.frame_width != ptr[1])) { + event_fields_changed = true; + } + if (event_fields_changed) { DEBUG_PRINT_HIGH("VIDC Port Reconfig Old Resolution(H,W) = (%d,%d) New Resolution(H,W) = (%d,%d))", omx->drv_ctx.video_resolution.frame_height, @@ -722,7 +728,8 @@ omx_vdec::omx_vdec(): m_error_propogated(false), m_queued_codec_config_count(0), secure_scaling_to_non_secure_opb(false), m_force_compressed_for_dpb(true), - m_is_display_session(false) + m_is_display_session(false), + m_is_split_mode(false) { m_poll_efd = -1; drv_ctx.video_driver_fd = -1; @@ -1036,6 +1043,7 @@ OMX_ERRORTYPE omx_vdec::set_dpb(bool is_split_mode, int dpb_color_format) DEBUG_PRINT_ERROR("Failed to set ext ctrls for opb_dpb: %d\n", rc); return OMX_ErrorUnsupportedSetting; } + m_is_split_mode = is_split_mode; return OMX_ErrorNone; } -- cgit v1.2.3