author | harlekin <harlekin> | 2002-04-19 16:08:55 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-04-19 16:08:55 (UTC) |
commit | 7ea4abeb652e6787e57a938e1ca028d25fd249ce (patch) (unidiff) | |
tree | ee08f2d9d6aaa8adb1c5f07f4124da8a61eb8cd5 /core/multimedia/opieplayer/libmad/huffman.c | |
parent | caa7ced77b9014526607f9f65c58aabe7e0ba631 (diff) | |
download | opie-7ea4abeb652e6787e57a938e1ca028d25fd249ce.zip opie-7ea4abeb652e6787e57a938e1ca028d25fd249ce.tar.gz opie-7ea4abeb652e6787e57a938e1ca028d25fd249ce.tar.bz2 |
new libmad version, less cpu usage
Diffstat (limited to 'core/multimedia/opieplayer/libmad/huffman.c') (more/less context) (show whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/libmad/huffman.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/core/multimedia/opieplayer/libmad/huffman.c b/core/multimedia/opieplayer/libmad/huffman.c index 8ec9499..5ea6547 100644 --- a/core/multimedia/opieplayer/libmad/huffman.c +++ b/core/multimedia/opieplayer/libmad/huffman.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * mad - MPEG audio decoder | 2 | * libmad - MPEG audio decoder library |
3 | * Copyright (C) 2000-2001 Robert Leslie | 3 | * Copyright (C) 2000-2001 Robert Leslie |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
@@ -34,8 +34,14 @@ | |||
34 | * These tables support decoding up to 4 Huffman code bits at a time. | 34 | * These tables support decoding up to 4 Huffman code bits at a time. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | # define V(v, w, x, y, hlen){ { 1, hlen, v, w, x, y } } | 37 | # if defined(__GNUC__) |
38 | # define PTR(offs, bits){ ptr: { 0, bits, offs } } | 38 | # define PTR(offs, bits){ ptr: { 0, bits, offs } } |
39 | # define V(v, w, x, y, hlen){ value: { 1, hlen, v, w, x, y } } | ||
40 | # else | ||
41 | # define PTR(offs, bits){ { 0, bits, offs } } | ||
42 | # define V(v, w, x, y, hlen){ { 1, hlen, (v << 0) | (w << 1) | \ | ||
43 | (x << 2) | (y << 3) } } | ||
44 | # endif | ||
39 | 45 | ||
40 | static | 46 | static |
41 | union huffquad const hufftabA[] = { | 47 | union huffquad const hufftabA[] = { |
@@ -100,8 +106,13 @@ union huffquad const hufftabB[] = { | |||
100 | # undef V | 106 | # undef V |
101 | # undef PTR | 107 | # undef PTR |
102 | 108 | ||
103 | # define V(x, y, hlen) { { 1, hlen, x, y } } | 109 | # if defined(__GNUC__) |
104 | # define PTR(offs, bits){ ptr: { 0, bits, offs } } | 110 | # define PTR(offs, bits){ ptr: { 0, bits, offs } } |
111 | # define V(x, y, hlen) { value: { 1, hlen, x, y } } | ||
112 | # else | ||
113 | # define PTR(offs, bits){ { 0, bits, offs } } | ||
114 | # define V(x, y, hlen) { { 1, hlen, (x << 0) | (y << 4) } } | ||
115 | # endif | ||
105 | 116 | ||
106 | static | 117 | static |
107 | union huffpair const hufftab0[] = { | 118 | union huffpair const hufftab0[] = { |