[xiph-cvs] cvs commit: w3d Makefile pnm.c tarkin.c wavelet.c

Holger Waechtler holger at xiph.org
Sun Jul 8 23:59:57 PDT 2001



holger      01/07/08 23:59:57

  Modified:    .        Makefile pnm.c tarkin.c wavelet.c
  Log:
   - forgot to remove some hacks I used fr profiling
   - give grayscale pnm's suffix pgm
   - fixed two typos in write_pnm()

Revision  Changes    Path
1.9       +4 -3      w3d/Makefile

Index: Makefile
===================================================================
RCS file: /usr/local/cvsroot/w3d/Makefile,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Makefile	2001/07/09 06:03:09	1.8
+++ Makefile	2001/07/09 06:59:56	1.9
@@ -1,8 +1,8 @@
 CC = gcc
 RM = rm -rf
 
-CFLAGS = -pg -O0 -Wall -DTYPE=int16_t -DRLECODER -DDBG_XFORM -DDBG_MEMLEAKS
-LFLAGS = -pg -lefence
+CFLAGS = -g -O0 -Wall -DTYPE=int16_t -DRLECODER -DDBG_XFORM -DDBG_MEMLEAKS
+LFLAGS = -g -lefence
 
 OBJS = mem.o pnm.o wavelet.o wavelet_xform.o yuv.o tarkin.o tarkin-io.o
 
@@ -25,7 +25,8 @@
         $(CC) $(CFLAGS) -c $<
 
 clean:
-	$(RM) $(OBJS) $(TARGET) gmon.out core .depend .depend.bak rle.histogram *.ppm
+	$(RM) $(OBJS) $(TARGET) gmon.out core .depend .depend.bak rle.histogram
+	$(RM) *.ppm *.pgm
         $(RM) $(TEST_TARGETS) $(TEST_OBJS)
         $(RM) tarkin_enc tarkin_dec tarkin_enc.o tarkin_dec.o
 

1.2       +2 -2      w3d/pnm.c

Index: pnm.c
===================================================================
RCS file: /usr/local/cvsroot/w3d/pnm.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pnm.c	2001/07/09 06:03:09	1.1
+++ pnm.c	2001/07/09 06:59:56	1.2
@@ -135,10 +135,10 @@
    }
 
 
-   if (strstr(fname, ".ppm") != fname + strlen(fname)-4) {
+   if (strstr(fname, ".ppm") == fname + strlen(fname)-4) {
       fprintf (outfile, "P6\n%d %d\n%d\n", w, h, 255);
       fwrite (rgb, 3, w*h, outfile);
-   } else if (strstr(fname, ".pgm") != fname + strlen(fname)-4) {
+   } else if (strstr(fname, ".pgm") == fname + strlen(fname)-4) {
       fprintf (outfile, "P5\n%d %d\n%d\n", w, h, 255);
       fwrite (rgb, 1, w*h, outfile);
    } else {

1.7       +4 -4      w3d/tarkin.c

Index: tarkin.c
===================================================================
RCS file: /usr/local/cvsroot/w3d/tarkin.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- tarkin.c	2001/07/09 06:03:09	1.6
+++ tarkin.c	2001/07/09 06:59:56	1.7
@@ -132,13 +132,13 @@
       for (j=0; j<layer->n_comp; j++) {
          uint32_t bitstream_len;
 
-         wavelet_3d_buf_dump ("color-%d-%03d.ppm",
+         wavelet_3d_buf_dump ("color-%d-%03d.pgm",
                               s->current_frame - s->current_frame_in_buf, j,
                               layer->waveletbuf[j]);
 
          wavelet_3d_buf_fwd_xform (layer->waveletbuf[j], 2, 2);
 
-         wavelet_3d_buf_dump ("coeff-%d-%03d.ppm",
+         wavelet_3d_buf_dump ("coeff-%d-%03d.pgm",
                               s->current_frame - s->current_frame_in_buf, j,
                               layer->waveletbuf[j]);
 
@@ -279,12 +279,12 @@
             wavelet_3d_buf_decode_coeff (layer->waveletbuf[j], s->bitstream,
                                          bitstream_len);
 
-            wavelet_3d_buf_dump ("rcoeff-%d-%03d.ppm",
+            wavelet_3d_buf_dump ("rcoeff-%d-%03d.pgm",
                                  s->current_frame, j, layer->waveletbuf[j]);
 
             wavelet_3d_buf_inv_xform (layer->waveletbuf[j], 2, 2);
 
-            wavelet_3d_buf_dump ("rcolor-%d-%03d.ppm",
+            wavelet_3d_buf_dump ("rcolor-%d-%03d.pgm",
                                  s->current_frame - s->current_frame_in_buf, j,
                                  layer->waveletbuf[j]);
          }

1.9       +3 -3      w3d/wavelet.c

Index: wavelet.c
===================================================================
RCS file: /usr/local/cvsroot/w3d/wavelet.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- wavelet.c	2001/07/09 06:03:09	1.8
+++ wavelet.c	2001/07/09 06:59:56	1.9
@@ -134,13 +134,13 @@
 
    do {
       i--;
-      significance = 0; //INPUT_BIT(&significand_bitstream[i]) << i;
+      significance = INPUT_BIT(&significand_bitstream[i]) << i;
    } while (!significance && i > 0);
 
-   sign = 0; //INPUT_BIT(&significand_bitstream[i]);
+   sign = INPUT_BIT(&significand_bitstream[i]);
 
    while (--i >= 0) {
-      significance |= 0; //INPUT_BIT(&insignificand_bitstream[i]) << i;
+      significance |= INPUT_BIT(&insignificand_bitstream[i]) << i;
    };
 
    return (significance ^ mask[sign]);

--- >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