[MPlayer-dev-eng] Chroma roll-off filter

Stanley stanleyhuangyc at yahoo.com.cn
Thu Jun 28 17:06:03 CEST 2007


Thanks Reimar for your suggestions.
I rewrote the filter, putting optimization into consideration. ;-)

Stanley

Reimar Doeffinger wrote:
> This is horribly inefficient, you are doing two floating point
> multiplications and one division per pixel.
> You should do something like this IMO:
> unsigned delta = (level_hi - level_low)/(pos2 - pos1) * (1 << 24);
> unsigned level_low_int = level_low * (1 << 24);
> in config, then in the loop:
> unsigned level = level_low_int;
> *dest = (level * *src) >> 24;
> level += delta;
>   

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vf_rolloff.c
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070628/7e984fa5/attachment.txt>


More information about the MPlayer-dev-eng mailing list