[FFmpeg-devel] Some IWMMXT functions for libavcodec

Dmitry Antipov dmantipov
Thu May 15 13:52:22 CEST 2008

Siarhei Siamashka wrote:

> And Intel manual recommends to insert non-memory related instructions
> after 'wldrd', you could quite conveniently insert pointer increment by 
> stride there, or anything else. Back-to back 'wldrd' instructions 
> introduce pipeline stall.

This probably requires an additional investigations from my side. But "Intel Wireless MMX
Technology Developer Guide" says:

"...Currently, there are two 64-bit buffer slots for Load operations and one 64-bit buffer slot
available for Store transactions. If the memory buffer is currently empty, the Memory pipeline
resource availability delay is only one clock. However, if the buffer is currently full due to
a sequence of memory transactions, the next instruction must wait for space in the buffer. The
resource availability delay in this case is two cycles...
...The buffering in the Memory pipeline allows two Load transactions to be issued sequentially
without incurring a penalty (stall). More than two outstanding Load transactions causes a stall
and loss in performance."

I.e. this code is good:

wldrd wr0, [%1]
wldrd wr1, [%2]

But this code:

wldrd wr0, [%1]
wldrd wr1, [%2]
wldrd wr2, [%3]

is not so good since it will work, but will cause memory pipeline stall. As you can see,
I'm not doing more than 2 sequential loads with WLDRx.

> I'm just curious, is video encoding a usable task for XScale processors?

 From the technical point of view, PXA320 might be clocked up to 800MHz (see
http://www.marvell.com/products/cellular/application/pxa320.jsp) and I believe it has good
enough integer performance, so why not?

 From the user's point of view, it's definitely better to download the video from your
gadget and process it on the more powerful PC, but why not doing some simple processing
immediately if we have enough CPU power (and will have a possibility to recharge the batteries
soon :-)) ?


More information about the ffmpeg-devel mailing list