Case Study 4: Graphics Object Rotation - Intel PXA270 Optimization Manual

Pxa27x processor family
Table of Contents

Advertisement

Intel XScale® Microarchitecture & Intel® Wireless MMX™ Technology Optimization
Schedule around the load-to-use-latency
This example code is for the dot product:
; r0 points to source vector 1
; r1 points to source vector 2
WLDRD wR0, [r0], #8
WZERO wR15
WLDRD wR1, [r1], #8
MOV r10, #Eighth_Vector_len
Loop:
WLDRD wR2, [r0], #8
SUBS r10, #1
WLDRD wR3, [r1], #8
WMACS wR15, wR0, wR1
WLDRDNE wR0, [r0], #8
WMACS wR15, wR3, wR2
WLDRDNE wR1, [r1], #8
BNE Loop
4.6.4

Case Study 4: Graphics Object Rotation

Many handheld devices use native landscape orientation for internal graphics application
processing. However, if the end user views the output in portrait mode, a portrait-to-landscape
conversion needs to occur each time the frame buffer writes to the display.
The display driver usually implements a landscape to portrait conversion when the frame is copied
from the off-screen buffer to the display buffer. The following C code example shows a landscape
to portrait rotation.
In the following example, row indicates the current row of the off-screen buffer. pDst and pSrc are
single-byte pointers to the display and off-screen buffer respectively.
for (row=Top; row < Bottom; row++) {
}
This is an optimized version of the previous example in assembly:
;Set up for loop goes here
;This shows only the critical loop in the implementation
LOOP:
4-32
for (j=0;j<2;j++) {
*pDst++=*(pSrc+j);
}
pSrc-=bytesPerRow; // bytesPerRow = Stride
Intel® PXA27x Processor Family Optimization Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pxa271Pxa272Pxa273

Table of Contents