Re[2]: [XviD-devel] Quality optimization

Radek Czyz xvid-devel@xvid.org
Thu, 23 Jan 2003 23:17:59 +1030


Hi,

> [...] or by adding better
> prefetch. We're not doing streaming dot product, we know in advance
> what memory locations we'll most likely need for the next block.

I'm only guessing what prefetch is.
Would it be possible to write a macro, in inline assembler (defined in
portab.h as needed) looking like this

PREFETCH(void *);

which would perform the prefetch?
Compiler cannnot know in advance that, for example, a SAD will use the
memory locations it's using. By doing some prefetch's before calling
SAD, the time spent for calling the function could be used to catch
the function's data.
Sometimes it would be possible to do that in a big advance. For
example, we could prefetch chroma data when ChromaME is on, before the
luma SAD is called... correct me if Im talking nonsense...

Nice tool for experiments.

What do you think? Is it possible at all?