[xiph-cvs] cvs commit: w3d bitcoder.h rle.h wavelet_coeff.c
Holger Waechtler
holger at xiph.org
Wed Jul 11 07:25:24 PDT 2001
holger 01/07/11 07:25:24
Modified: . bitcoder.h rle.h wavelet_coeff.c
Log:
#ifdef 0'd the skip_0coeff() code, it was too buggy ...
Revision Changes Path
1.6 +1 -0 w3d/bitcoder.h
Index: bitcoder.h
===================================================================
RCS file: /usr/local/cvsroot/w3d/bitcoder.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- bitcoder.h 2001/07/09 07:27:12 1.5
+++ bitcoder.h 2001/07/11 14:25:23 1.6
@@ -20,6 +20,7 @@
#define ENTROPY_CODER_MPS 1
#define ENTROPY_CODER_RUNLENGTH(coder) 0
+#define ENTROPY_CODER_SKIP(coder,skip)
#endif
1.7 +2 -0 w3d/rle.h
Index: rle.h
===================================================================
RCS file: /usr/local/cvsroot/w3d/rle.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- rle.h 2001/07/09 07:27:12 1.6
+++ rle.h 2001/07/11 14:25:23 1.7
@@ -22,6 +22,8 @@
#define ENTROPY_CODER_MPS(coder) ((coder)->mps)
#define ENTROPY_CODER_RUNLENGTH(coder) ((coder)->count)
+//#define ENTROPY_CODER_SKIP(coder,skip) printf ("coder->count == %u ->", (coder)->count); (coder)->count -= skip; printf ("%u\n", (coder)->count);
+#define ENTROPY_CODER_SKIP(coder,skip) (coder)->count -= skip
#endif
1.2 +17 -4 w3d/wavelet_coeff.c
Index: wavelet_coeff.c
===================================================================
RCS file: /usr/local/cvsroot/w3d/wavelet_coeff.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- wavelet_coeff.c 2001/07/09 08:17:01 1.1
+++ wavelet_coeff.c 2001/07/11 14:25:23 1.2
@@ -178,20 +178,31 @@
static inline
uint32_t skip_0coeffs (Wavelet3DBuf* buf,
ENTROPY_CODER s_stream [],
+ ENTROPY_CODER i_stream [],
uint32_t start)
{
int i;
uint32_t min = ~0;
- for (i=1; i<10; i++) {
- if (ENTROPY_CODER_MPS(&s_stream[i]) == 0) {
+ for (i=0; i<10; i++) {
+ if (ENTROPY_CODER_MPS(&s_stream[i]) != 0) {
+ return 0;
+ } else {
uint32_t runlength = ENTROPY_CODER_RUNLENGTH(&s_stream[i]);
- if (runlength < min)
+ if (min > runlength)
min = runlength;
}
}
+ if (min > 0 && min != ~0) {
+min = 0;
+ for (i=0; i<10; i++) {
+ ENTROPY_CODER_SKIP(&s_stream[i], min);
+ ENTROPY_CODER_SKIP(&i_stream[i], min);
+ }
+ }
+
return min;
}
@@ -204,12 +215,14 @@
uint32_t i;
for (i=0; i<buf->width*buf->height*buf->frames; i++) {
- int skip = skip_0coeffs (buf, s_stream, i);
+#if 0
+ int skip = skip_0coeffs (buf, s_stream, i_stream, i);
if (skip >= buf->width*buf->height*buf->frames - i)
return;
i += skip;
+#endif
buf->data[i] = decode_coeff(s_stream, i_stream);
}
}
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list