[Ffmpeg-devel] PATCH colortrunc

Rich Felker dalias
Mon Jul 25 21:33:20 CEST 2005


On Mon, Jul 25, 2005 at 02:52:40PM +0200, Marcus Engene wrote:
> Martin Boehme wrote:
> 
> >>
> >>An utterly silly question, would it solve Kris's problem by doing a 
> >>vhook squeezing 0-255 into 16-234 or am I on snus again?
> >
> >
> >I guess so... but it would require programming.
> >
> >Martin
> >
> Ok, I did some programming :-)
> 
> * Colortrunc "truncates" the color range. If your file contains
> * colors between and including 00-0xff (ie normal 8bit) you can
> * force color 0 to be 16 .. 255 to be 234 by doing...
> *
> * ffmpeg -i infile -vhook '/path/colortrunc.so -r 16-234 -g 16-234 -b 
> 16-234' out.mov
> *
> * Note that the entire vhook argument is encapsulated in ''. This
> * way, arguments to the vhook won't be mixed up with those to ffmpeg.
> *
> * You could even invert the colors by specifying f.ex -r 255-0.

It needs to be done in yuv space, that's the whole point.. No one uses
rgb, for good reason.

Rich





More information about the ffmpeg-devel mailing list