[FFmpeg-devel] [GSoC] Patch which adds support for gamma correct scaling

Pedro Arthur 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
> artifacts.
>
> 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
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>


More information about the ffmpeg-devel mailing list