[XviD-devel] improving data flow during interpolation

Michael Militzer xvid-devel@xvid.org
Wed, 14 Aug 2002 21:15:05 +0200


Hi Pascal,

welcome on our dev list, it's good to have you here...

> here is a suggestion for B-frame interpolation in the decoder:
> in decoder.c, around line 1017, two buffers (cur and refn[2])
> are predicted and then subsequently mixed together with help
> of interpolate8x8_c(). From what I measured, there is a somewhat
> big gain in combining the hp-interpolate and final mixing
> together, inside some functions that would for instance be
> called interpolate8x8_halfpel_add_v/hv/etc...

yes, this seems a good idea

> As far as I-SSE is concerned (my preferred target), it's just
> a matter of inserting a 'pavgb dst, val' before the final
> 'movq dst, val' storage. One instr only. It would save a
> refn[2] memory consumption, as well as one final averaging
> pass. The con is that it requires writing one additional
> full round of interpolate8x8_halfpel_add_XXX functions.
> Fortunately, I've already got'em written, so it's just a
> matter of copy-pasting if you're interested. I attach
> the code so you can have a look (I can do the integration
> in xvid afterward). Note: don't be surprised the code
> resembles a lot what's currently in xvid, it's almost
> the one I sent Michael in replacement from the previous one
> (straight from my own 'lab' toy codec).

great as always. As a sidenote: I haven't tried out the code yet but there
seems to be a header file ("skl_nasm.h") needed which is not included. A
propos header files: it might be a good idea to use header files (including
macros etc) if the core loop is the same for mmx, isse or 3dnow code (like
it's the case for the normal interpolate8x8 code)...

> There are also
> 16x8 block motion version (I *think* it improves
> cache coherency for luma blocks, althought I didn't
> measured it...)

hm, 16xX functions might give some improvement if SSE2ed as well, right?

> What do you think of it?
>
> I'll be on holidays (yes Michael, again:) next

hey, I want that too: what kind of a job do you have? ;-)

> week, but after I really like to volonteer
> for working on this coupled trans/quant
> funcs and prediction...

I think everyone here would appreciate that.

And once again: I wish you some nice holidays! ;-)

bye
Michael