How to convert to Lab color space or an arbitrary color space?
I want to convert Yuv (or is it really YCbCr?) to Lab. Is there a built in way to do this or to maybe specify an arbitrary color transform through a matrix or something?
I want to convert Yuv (or is it really YCbCr?) to Lab. Is there a built in way to do this or to maybe specify an arbitrary color transform through a matrix or something?
I reckon doing most things in linear light is the "correct" way. Does this apply to scaling? What does scaling in the non-linear transfer function domain introduce as artifacts? Does it matter and if yes - how?
I'm interested in PQ UHD yuv420p10le to PQ HD yuv420p10le and possibly doing the scaling in yuv420p16le linear, but any insight into this topic is welcome. I don't think ffmpeg supports float here. Does it matter if the scaling is not exactly 2x, for example when converting a weird aspect ratio as well in the process.
Also, what is the correct way of building the filter chain for this? When do I need to dither and which algorithm? I tried
zscale=t=linear,format=yuv420p16le,zscale=1920:-1:filter=spline64,zscale=d=error_diffusion:t=smpte2084,format=yuv420p10le
and it seems to work, but I'm not sure if this is the correct order of things. The compressed files are a bit bigger using the same settings, when encoded from the linear scale, but I don't know why exactly. Maybe dither is the culprit? Is dither even necessary when going from 16 to 10 bits?