[FFmpeg-trac] #4858(avfilter:new): Support GIMP curves preset files in curves filter

FFmpeg trac at avcodec.org
Sun Mar 27 16:11:23 CEST 2016


#4858: Support GIMP curves preset files in curves filter
-------------------------------------+------------------------------------
             Reporter:  llogan       |                    Owner:
                 Type:  enhancement  |                   Status:  new
             Priority:  wish         |                Component:  avfilter
              Version:  git-master   |               Resolution:
             Keywords:  curves       |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+------------------------------------

Comment (by Ilya87):

 If only I could write I a parser!

 1 - There are two types of curves in Gimp -  Free (drawed by hand) and
 Smooth.
 1.1 - This type stated in (curve    (curve-type free) or (curve    (curve-
 type smooth) section for every color channel.
 2 - Only 17 points on channel can be set in Smooth mode.
 3 - The order of color channels in the file: value, red, green, blue,
 alpha.
 4 - If curve-type smooth is set, then coordinates of points must be read
 from section (points 34 from the beginning, negative values must be
 ignored, positive values follow in pair (x y) correspond to the ffmpeg
 coordinates x/y. -1.000000 0.240854 0.139194 -1.000000 means
 0.240854/0.139194 for ffmpeg, 0.045714 0.045249 0.091429 0.095023 means
 0.045714/0.045249 0.091429/0.095023 for ffmpeg.
 5 - If curve-type free is set, then coordinates of points must be read
 from section (samples 256. There are only y coordinates are stated, so x
 coordinate is calculated by the following formula: x1=0, x2=1/255,
 x3=2/255, x4=3/255,...,x256=1
 6 - All points coordinates pairs follow strictly (for both curve types) x
 coordinate ascending order.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4858#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list