Automatically set internal bit depth to at least the input bit depth. Upgrade profile if required. Change-Id: Ieb2b77d2446290a8fc749739247a01e8f0600c55