Skip to content
5 changes: 5 additions & 0 deletions app/oapv_app_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,11 @@ static int update_param(args_var_t *vars, oapve_param_t *param)
UPDATE_A_PARAM_W_KEY_VAL(param, "tile-h", vars->tile_h);

param->csp = vars->input_csp;
// ensure frame width multiple of 2 in case of 422 format
if ((param->csp == 2) && (param->w & 0x1)) {
logerr("width should be a multiple of 2 for '--input-csp 2'\n");
return -1;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this code to 'check_conf()' function?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kpchoi
I have moved the changes to the check_conf() function.

return 0;
}

Expand Down