When the HDR original video contains extremely saturated color (close to the edge of BT.2020 gamut), zscale may hit integer overflow, turning bright green (negative Cb, negative Cr) into deep cyan/blue color (positive Cb, negative Cr).
For example, when using zscale as part of tonemapping to extract JPEG thumbnails to sRGB gamma 2.4 one can observe the following chroma integer overflow. This has been reproduced using latest release 3.0.3
When the HDR original video contains extremely saturated color (close to the edge of BT.2020 gamut), zscale may hit integer overflow, turning bright green (negative Cb, negative Cr) into deep cyan/blue color (positive Cb, negative Cr).
For example, when using zscale as part of tonemapping to extract JPEG thumbnails to sRGB gamma 2.4 one can observe the following chroma integer overflow. This has been reproduced using latest release 3.0.3
while using the
colorspace
filter instead ofzscale
produces the expected outputI'm not sure whether Github will properly preserve the input video used for this example.
https://user-images.githubusercontent.com/1358/158000634-8b808946-8500-4e3f-b069-c26674c4196d.mp4