From 736df4b43bac64e64607efd427543e7678acfed1 Mon Sep 17 00:00:00 2001 From: Dave Bryant Date: Sat, 22 Apr 2006 21:32:16 +0000 Subject: Revert the previous commit because it seemed to break the 4G Gray Sim, although I can't figure out why or how, and I can't reproduce problem here... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9766 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libwavpack/words.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'apps/codecs/libwavpack/words.c') diff --git a/apps/codecs/libwavpack/words.c b/apps/codecs/libwavpack/words.c index c7a8047d03..ccbd77f8f9 100644 --- a/apps/codecs/libwavpack/words.c +++ b/apps/codecs/libwavpack/words.c @@ -151,14 +151,14 @@ int read_entropy_vars (WavpackStream *wps, WavpackMetadata *wpmd) { uchar *byteptr = wpmd->data; - if (wpmd->byte_length != ((wps->wphdr.flags & MONO_DATA) ? 6 : 12)) + if (wpmd->byte_length != ((wps->wphdr.flags & MONO_FLAG) ? 6 : 12)) return FALSE; wps->w.c [0].median [0] = exp2s (byteptr [0] + (byteptr [1] << 8)); wps->w.c [0].median [1] = exp2s (byteptr [2] + (byteptr [3] << 8)); wps->w.c [0].median [2] = exp2s (byteptr [4] + (byteptr [5] << 8)); - if (!(wps->wphdr.flags & MONO_DATA)) { + if (!(wps->wphdr.flags & MONO_FLAG)) { wps->w.c [1].median [0] = exp2s (byteptr [6] + (byteptr [7] << 8)); wps->w.c [1].median [1] = exp2s (byteptr [8] + (byteptr [9] << 8)); wps->w.c [1].median [2] = exp2s (byteptr [10] + (byteptr [11] << 8)); @@ -215,7 +215,7 @@ int read_hybrid_profile (WavpackStream *wps, WavpackMetadata *wpmd) wps->w.c [0].slow_level = exp2s (byteptr [0] + (byteptr [1] << 8)); byteptr += 2; - if (!(wps->wphdr.flags & MONO_DATA)) { + if (!(wps->wphdr.flags & MONO_FLAG)) { wps->w.c [1].slow_level = exp2s (byteptr [0] + (byteptr [1] << 8)); byteptr += 2; } @@ -224,7 +224,7 @@ int read_hybrid_profile (WavpackStream *wps, WavpackMetadata *wpmd) wps->w.bitrate_acc [0] = (int32_t)(byteptr [0] + (byteptr [1] << 8)) << 16; byteptr += 2; - if (!(wps->wphdr.flags & MONO_DATA)) { + if (!(wps->wphdr.flags & MONO_FLAG)) { wps->w.bitrate_acc [1] = (int32_t)(byteptr [0] + (byteptr [1] << 8)) << 16; byteptr += 2; } @@ -233,7 +233,7 @@ int read_hybrid_profile (WavpackStream *wps, WavpackMetadata *wpmd) wps->w.bitrate_delta [0] = exp2s ((short)(byteptr [0] + (byteptr [1] << 8))); byteptr += 2; - if (!(wps->wphdr.flags & MONO_DATA)) { + if (!(wps->wphdr.flags & MONO_FLAG)) { wps->w.bitrate_delta [1] = exp2s ((short)(byteptr [0] + (byteptr [1] << 8))); byteptr += 2; } @@ -257,7 +257,7 @@ void update_error_limit (struct words_data *w, uint32_t flags) { int bitrate_0 = (w->bitrate_acc [0] += w->bitrate_delta [0]) >> 16; - if (flags & MONO_DATA) { + if (flags & MONO_FLAG) { if (flags & HYBRID_BITRATE) { int slow_log_0 = (w->c [0].slow_level + SLO) >> SLS; @@ -326,13 +326,13 @@ int32_t get_words (int32_t *buffer, int nsamples, uint32_t flags, register struct entropy_data *c = w->c; int csamples; - if (!(flags & MONO_DATA)) + if (!(flags & MONO_FLAG)) nsamples *= 2; for (csamples = 0; csamples < nsamples; ++csamples) { uint32_t ones_count, low, mid, high; - if (!(flags & MONO_DATA)) + if (!(flags & MONO_FLAG)) c = w->c + (csamples & 1); if (!(w->c [0].median [0] & ~1) && !w->holding_zero && !w->holding_one && !(w->c [1].median [0] & ~1)) { @@ -435,7 +435,7 @@ int32_t get_words (int32_t *buffer, int nsamples, uint32_t flags, w->holding_zero = ~w->holding_one & 1; } - if ((flags & HYBRID_FLAG) && ((flags & MONO_DATA) || !(csamples & 1))) + if ((flags & HYBRID_FLAG) && ((flags & MONO_FLAG) || !(csamples & 1))) update_error_limit (w, flags); if (ones_count == 0) { @@ -484,7 +484,7 @@ int32_t get_words (int32_t *buffer, int nsamples, uint32_t flags, c->slow_level = c->slow_level - ((c->slow_level + SLO) >> SLS) + mylog2 (mid); } - return (flags & MONO_DATA) ? csamples : (csamples / 2); + return (flags & MONO_FLAG) ? csamples : (csamples / 2); } // Read a single unsigned value from the specified bitstream with a value -- cgit v1.2.3