diff options
author | Surajit Podder <spodder@codeaurora.org> | 2018-01-31 16:38:52 +0530 |
---|---|---|
committer | Santhosh Behara <santhoshbehara@codeaurora.org> | 2018-04-05 12:55:26 +0530 |
commit | d7429f70394fe53a84358066576d50dc71694fc9 (patch) | |
tree | 7d7851e83b7ac62e881a43c0c36400fb41f38c48 /mm-video-v4l2 | |
parent | 47f48706a8d5827dbe73280c47ec67798ac1f5d7 (diff) | |
download | media-d7429f70394fe53a84358066576d50dc71694fc9.tar.gz |
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
Diffstat (limited to 'mm-video-v4l2')
-rw-r--r--[-rwxr-xr-x] | mm-video-v4l2/vidc/vdec/inc/omx_vdec.h | 4 | ||||
-rwxr-xr-x | mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h index 77c96c4d..876119ab 100755..100644 --- a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h +++ b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h @@ -1168,7 +1168,6 @@ class omx_vdec: public qc_omx_component OMX_FRAMESIZETYPE framesize; OMX_CONFIG_RECTTYPE rectangle; OMX_U32 prev_n_filled_len; - bool is_down_scalar_enabled; bool m_force_down_scalar; struct custom_buffersize { OMX_U32 input_buffersize; @@ -1357,6 +1356,9 @@ class omx_vdec: public qc_omx_component void get_preferred_color_aspects(ColorAspects& preferredColorAspects); void get_preferred_hdr_info(HDRStaticInfo& preferredHDRInfo); bool vdec_query_cap(struct v4l2_queryctrl &cap); +public: + bool is_down_scalar_enabled; + bool m_is_split_mode; }; enum instance_state { 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; } |