Linear scaling for HDR content should not be disabled #281
Description
For correct results resampling should always be done in linear color space. Otherwise problems will be introduced: a too dark image, stair-stepping along edges, stars start to twinkle in panning shots, etc...
https://x.com/ID_AA_Carmack/status/1654528504724062217
https://petewarden.com/2008/08/02/why-fonts-need/
http://www.ericbrasseur.org/gamma.html
Unfortunately in libplacebo linear resampling is currently always disabled for HDR content. This leads to errors when downscaling.
See this example clip. It was created by taking screenshot of the output of mpv of HDR content rescaled from 2160p to 1080p. On the left with libplacebo as is, on the right libplacebo patched to allow linear scaling with HDR content.
(please view images in original size with 100% zoom on monitor with 1:1 pixel mapping)
Notice on the left the stair-stepping along the edges of the A and V. Also notice the wobbling between the T and the O and the T and wings of the logo (simular problem as twinkling stars described by Carmack). Compare to the correct linear resampling on the right.
Here another shot:
Again the stair-stepping / aliasing on the left, the text is also too slim. The linear resampling on the right looks way better.
Please do not disable linear scaling for HDR content so we can get correctly scaled video.