From 7ea4abeb652e6787e57a938e1ca028d25fd249ce Mon Sep 17 00:00:00 2001 From: harlekin Date: Fri, 19 Apr 2002 16:08:55 +0000 Subject: new libmad version, less cpu usage --- (limited to 'core/multimedia/opieplayer/libmad/huffman.c') 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 @@ /* - * mad - MPEG audio decoder + * libmad - MPEG audio decoder library * Copyright (C) 2000-2001 Robert Leslie * * This program is free software; you can redistribute it and/or modify @@ -34,8 +34,14 @@ * These tables support decoding up to 4 Huffman code bits at a time. */ -# define V(v, w, x, y, hlen) { { 1, hlen, v, w, x, y } } -# define PTR(offs, bits) { ptr: { 0, bits, offs } } +# if defined(__GNUC__) +# define PTR(offs, bits) { ptr: { 0, bits, offs } } +# define V(v, w, x, y, hlen) { value: { 1, hlen, v, w, x, y } } +# else +# define PTR(offs, bits) { { 0, bits, offs } } +# define V(v, w, x, y, hlen) { { 1, hlen, (v << 0) | (w << 1) | \ + (x << 2) | (y << 3) } } +# endif static union huffquad const hufftabA[] = { @@ -100,8 +106,13 @@ union huffquad const hufftabB[] = { # undef V # undef PTR -# define V(x, y, hlen) { { 1, hlen, x, y } } -# define PTR(offs, bits) { ptr: { 0, bits, offs } } +# if defined(__GNUC__) +# define PTR(offs, bits) { ptr: { 0, bits, offs } } +# define V(x, y, hlen) { value: { 1, hlen, x, y } } +# else +# define PTR(offs, bits) { { 0, bits, offs } } +# define V(x, y, hlen) { { 1, hlen, (x << 0) | (y << 4) } } +# endif static union huffpair const hufftab0[] = { -- cgit v0.9.0.2