[MPlayer-dev-eng] [PATCH] vf_eq2 + vf_eq

Hampa Hug hampa at hampa.ch
Fri Jan 31 23:26:49 CET 2003


D Richard Felker III wrote:

> On Fri, Jan 31, 2003 at 10:21:32PM +0100, Hampa Hug wrote:
> > Based on the discussion in the other thread I made a new
> > patch to vf_eq2.c that essentially combines vf_eq.c and
> > vf_eq2.c. It is not well testet yet.
> 
> The idea is good, but I don't think you should be passing around
> vf_eq2_t like that. Instead just pass the individual params that are
> needed. Why? Well, for one thing, adjust_y_*() can also do saturation,
> with no changes, except that you have to pass it the saturation values
> and u plane info. Also adjust_u and adjust_v are identical except for
> which params they use, so it's wasteful (and cache-inefficient) to
> call one then the other instead of calling the same function twice
> with different params.

I thought about that. But then you can't use function pointers
anymore because not all functions (that do the same thing) take
the same parameters (c/b values vs. lut). On the other hand
I'm not happy with the way it is now. How would you define
the three function pointers?

> Also, you should name the functions by what they do. E.g.
> adjust_y_MMX -> affine_1d_MMX or something, rather than just
> "adjust_{plane}".

ACK.

Hampa


More information about the MPlayer-dev-eng mailing list