-
Notifications
You must be signed in to change notification settings - Fork 254
Description
Currently, when avifenc is run with an input file in .y4m format, the colour depth used in the resulting AVIF file is always the same as in the original Y4M file. This currently overrides any explicit bit depth specified on the command line.
While this behaviour is documented, it is non-intuitive. In addition, the --depth parameter is silently ignored, rather than printing an appropriate warning.
Ideally, if the input bit depth and --depth parameter differ, the input should be converted to the requested precision before compression. This can help squeeze a bit more out of the format: usually, even if the input file uses an 8-bit depth, compressing at a 10-bit internal precision gains a few % better compression at a negligible time cost, due to a reduction in rounding error within the codec.
If this is done, I would also like to request that avifenc normalize "unknown" colour space components to definite values. Otherwise, the colour space inferred by downstream tools can differ between 8-bit and 10-bit files, leading to the wrong colours being displayed.