> I intended to fetch the correct gamma value from the video/image metada > or pass it by flag (like gamma=x) but yet I don't know how to get the > correct gamma based on the input, thus for now it is hardcode.
This is how we do it in mpv: 1. If the source has enum AVColorTransferCharacteristic set, use that. 2. Otherwise, apply this heuristic: If YCbCr, assume BT.1886 If RGB, assume sRGB Also, you should note that scaling in linear light is only desirable for downscaling. For upscaling it tends to produce rather ugly ringing artifacts. So I would advise adding a check to see if (newRes < oldRes) before applying the gamma transformation.
pgpwzU9aiZNkt.pgp
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel