encoder: Update dimension check for semi-planar input

For YUV 420 semi-planar input, second plane's width was
wrongly being checked to be equal to half of first plane's width.
Corrected this condition now to check that both these widths are
same.

Bug: 242103647
Test: avcenc -c enc.cfg

Change-Id: I3c06f6e40823ddbf00df0435bfbd1cd314c982e3
This commit is contained in:
Harish Mahendrakar 2021-07-29 14:57:38 -07:00
parent d249d3642d
commit afd2eeb402

View file

@ -194,7 +194,7 @@ static IV_STATUS_T api_check_input_dimensions(codec_t *ps_codec,
break; break;
case IV_YUV_420SP_UV: case IV_YUV_420SP_UV:
case IV_YUV_420SP_VU: case IV_YUV_420SP_VU:
if ((ps_inp_buf->au4_wd[0] / 2) != ps_inp_buf->au4_wd[1]) if (ps_inp_buf->au4_wd[0] != ps_inp_buf->au4_wd[1])
{ {
ps_op->s_ive_op.u4_error_code |= 1 << IVE_UNSUPPORTEDPARAM; ps_op->s_ive_op.u4_error_code |= 1 << IVE_UNSUPPORTEDPARAM;
ps_op->s_ive_op.u4_error_code |= IH264E_WIDTH_NOT_SUPPORTED; ps_op->s_ive_op.u4_error_code |= IH264E_WIDTH_NOT_SUPPORTED;