Merge "ultrahdr: Add more error checks for input arguments of encode API" into udc-dev