Cypress DCT-1D Uživatelská příručka Strana 37

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 82
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 36
3.4. A BENCHMARK PROGRAM
37
Sofar we have presented three ways of computing the 2-D DCT. We compare the
computation complexity of the algorithms:
Algorithm MUL ADD
Eq (3.1) 4096 4032
Eq (3.2) 1024 892
Loeffler original 224 416
The post multiplication with c[u] has been left out of the table.
The OR1200 CPU has no floating point arithmetic, so the sin/cosine factors and
2
in Figure 3.7 must be mapped to integers. We have chosen to multiply with 2
13
and
rounding to the nearest integer. We have the following correspondences:
Real number Integer
2 11585
cos π/16 8035
sin π/16 1598
cos 3π/16 6811
sin 3π/16 4551
2 cos 6π/16 4433
2 sin 6π/16 10703
The scheme in Figure 3.7 has a serious drawback. The outputs 3 and 5 pass through
two multipliers. There is, however, a modified version where this flaw has been re-
moved at the price of 1 extra multiplier and 3 extra adders. The last 3 stages on the
lower part of Figure 3.7 is replaced with the computation scheme in Figure 3.8. This
modification is not, in our opinion, so easy to figure out. The interested reader is
therefore directed to the original article, [4].
X
X
X
X
X
X
X
X
X
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
7
3
1
5
a
b
c
d
e
f
g
h
i
Figure 3.8: Loeffler’s modified algorithm. Computation of the odd part with parallel
multiplications.
We conclude that Loeffler’s modified algorithm can be used with integer arith-
metic. After each run all outputs, except 0 and 4, must be arithmetic right shifted 13
steps. The 2-D DCT will be 8 · A[u, v] compared to (3.2), which can be compensated
for in later stages in the JPEG compression algorithm.
Zobrazit stránku 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 81 82

Komentáře k této Příručce

Žádné komentáře