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

Michael Niedermayer michaelni at gmx.at
Thu Apr 23 20:25:11 CEST 2015


On Tue, Apr 21, 2015 at 05:25:37PM -0300, Pedro Arthur wrote:
> New patch with changes.
> 
> 2015-04-21 13:14 GMT-03:00 Pedro Arthur <bygrandao at gmail.com>:
> 
> > 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.
> >
> > 2015-04-21 12:31 GMT-03:00 Kevin Wheatley <kevin.j.wheatley at gmail.com>:
> >
> > Pedro
> >>
> >> I understand the desire to 'degamma' images prior to scaling, I'd be
> >> interested in understanding how this could work with the colour_trc
> >> options rather than only assuming a simple gamma.
> >>
> >> Kevin
> >> _______________________________________________
> >> ffmpeg-devel mailing list
> >> ffmpeg-devel at ffmpeg.org
> >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >>
> >
> >

>  options.c          |    3 ++
>  swscale.c          |   51 +++++++++++++++++++++++++++++++++++
>  swscale.h          |    1 
>  swscale_internal.h |    9 +++++-
>  utils.c            |   76 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 139 insertions(+), 1 deletion(-)
> 2d3c2ec7671d700454621fedf30f2ddc40d8a33c  0001-Add-gamma-encodign-decoding-before-after-scaling-in-.patch
> From aff2c1c0f73e867f2aed90aa01cf3e0a1ba95261 Mon Sep 17 00:00:00 2001
> From: Pedro Arthur <bygrandao at gmail.com>
> Date: Fri, 17 Apr 2015 17:08:42 -0300
> Subject: [PATCH] Add gamma encodign/decoding before/after scaling in
>  libswscale
> 
> ---
>  libswscale/options.c          |  3 ++
>  libswscale/swscale.c          | 51 +++++++++++++++++++++++++++++
>  libswscale/swscale.h          |  1 +
>  libswscale/swscale_internal.h |  9 ++++-
>  libswscale/utils.c            | 76 +++++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 139 insertions(+), 1 deletion(-)

applied (as time is a bit short before the deadline and the patch
is basically fine, remaining are just nitpicks)

replaced SWS_GAMMA_CORRECT by a internal varible

Feel free to submit any follow up improvments on top of this

Thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150423/46ce3819/attachment.asc>


More information about the ffmpeg-devel mailing list