video: driver: reject odd resolution for encode sessions

reject odd resolution for encode session only.

Change-Id: I197688edb9e7f40d8b43524f7423ba52bb738cc2
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
This commit is contained in:
Darshana Patil
2021-05-20 17:44:29 -07:00
parent 1b620d866b
commit c897e250bd

View File

@@ -5142,7 +5142,8 @@ int msm_vidc_check_session_supported(struct msm_vidc_inst *inst)
} }
/* reject odd resolution session */ /* reject odd resolution session */
if (is_odd(iwidth) || is_odd(iheight) || is_odd(owidth) || is_odd(oheight)) { if (is_encode_session(inst) &&
(is_odd(iwidth) || is_odd(iheight) || is_odd(owidth) || is_odd(oheight))) {
i_vpr_e(inst, "resolution is not even. input [%u x %u], output [%u x %u]\n", i_vpr_e(inst, "resolution is not even. input [%u x %u], output [%u x %u]\n",
iwidth, iheight, owidth, oheight); iwidth, iheight, owidth, oheight);
goto exit; goto exit;