[FFmpeg-devel] [GSoC] Patch which adds support for gamma correct scaling
bygrandao at gmail.com
Wed Apr 22 15:23:31 CEST 2015
Thank you for the tips, I'll work on it.
2015-04-22 3:06 GMT-03:00 nand <nand at nand.wakku.to>:
> > 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
> So I would advise adding a check to see if (newRes < oldRes) before
> applying the gamma transformation.
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel