Cypress DCT-1D Betriebsanweisung Seite 36

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 82
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 35
36
CHAPTER 3. LAB TASK 1 - INTERFACING TO THE WISHBONE BUS
3.4 A Benchmark Program
3.4.1 JPEG Compression
We will use the first part, DCT, of the JPEG compression algorithm to test our com-
puter. This section is inspired by [3]. We begin with a short discussion of how DCT
works.
3.4.2 Integer DCT
The two dimensional discrete cosine transform (DCT) for an 8 × 8 array a[x, y] is
defined as
A[u, v] = c[u]c[v] ·
7
X
x=0
7
X
y=0
a[x, y] cos
πu
8
(x +
1
2
) cos
πv
8
(y +
1
2
) (3.1)
where c[0] = 1/
8 and c[u] = 1/2 when u 6= 0.
The transform in (3.1) can be separated. First compute a one-dimensional DCT on
each row and then a one-dimensional DCT on each column.
A[u, v] = c[v] ·
7
X
y=0
(
c[u]
7
X
x=0
a[x, y] cos
2π
32
(2x + 1)u
)
cos
2π
32
(2v + 1)y (3.2)
The innermost part of (3.1) is the 1-D DCT, which we repeat with slightly different
notation:
A[u] = c[u] ·
7
X
x=0
a[x] cos
2π
32
(2x + 1)u
(3.3)
By using all possible symmetries of the cosine function it is not so difficult to figure
out a fast DCT, see Figure 3.7. This computation scheme is usually referr ed to as
Loeffler’s algorithm. It computes the 1-D DCT as defined in (3.2) multiplied with
8.
0
4
2
6
7
3
5
1
0
1
2
3
4
5
6
7
stage 1 stage 2 stage 3 stage 4
2c6
c3
c1
Figure 3.7: Loeffler’s original algorithm for fast DCT. Black circles means addition,
dashed lines multiplication with -1 and white circles multiplication with
2. White
boxes marked cn denote rotation with /16.
The white boxes in Figure 3.7 denote rotation with /16 :
x
out
= x
in
· cos /16 + y
in
· sin /16
y
out
= x
in
· sin /16 + y
in
· cos /16
(3.4)
Seitenansicht 35
1 2 ... 31 32 33 34 35 36 37 38 39 40 41 ... 81 82

Kommentare zu diesen Handbüchern

Keine Kommentare