[MPlayer-dev-eng] [PATCH] altivec unscaled planar YV12 to packed YUY2 conversion.

Michael Niedermayer michaelni at gmx.at
Sun Jun 26 11:27:09 CEST 2005


Hi

On Sunday 26 June 2005 10:42, Romain Dolbeau wrote:
> Nicolas Plourde <nicolas.plourde at gmail.com> wrote:
[...]
> > Since you are the expert here can you suggest a fix? I would really like
> > to do it but its beyond my knowledge.
>
> To test the workaround suggested by others (calling the C function if
> (width % 16 != 0) ) should be enough ; on the long-term, finishing the
> lines with pure C is probably a better solution.

well, if noone writes a clean fix then ill apply that patch after cleaning it 
up


>
> Dunno if it's preferable to finish each line with a test inside the
> for(y) loop, or to duplicate the for(y) loop. Better locality in the
> first case but many control flow checks, single control flow check but
> bad locality in the second case. Opinions ?

lets see, on a old 100mhz system 1024x768 at 30fps would require 23040 checks 
per second for the 1 check at every line case, if we further assume these 
checks to require 2 cpu cycles each then that would be 0.05% of the available 
cpu cycles
and as all numbers are pushed toward unrealistic worstcase ones i think that a 
check per line would be ok, i also dont think that locality would be a 
problem so both should be fine
its just a question about binary size vs. speed, the source could be written 
with an inline function to avoid code duplication in the 2 for(y) loop case

[...]
-- 
Michael




More information about the MPlayer-dev-eng mailing list