[xiph-commits] r14343 - trunk/theora-exp/tools
tterribe at svn.xiph.org
tterribe at svn.xiph.org
Fri Jan 4 09:45:15 PST 2008
Author: tterribe
Date: 2008-01-04 09:45:14 -0800 (Fri, 04 Jan 2008)
New Revision: 14343
Modified:
trunk/theora-exp/tools/dumpstats.c
trunk/theora-exp/tools/extgen.c
trunk/theora-exp/tools/filec.c
trunk/theora-exp/tools/huffgen.c
trunk/theora-exp/tools/quantgen.c
Log:
Warning clean-up on theora-exp tools.
Modified: trunk/theora-exp/tools/dumpstats.c
===================================================================
--- trunk/theora-exp/tools/dumpstats.c 2008-01-04 17:38:40 UTC (rev 14342)
+++ trunk/theora-exp/tools/dumpstats.c 2008-01-04 17:45:14 UTC (rev 14343)
@@ -29,7 +29,7 @@
int modei;
int erri;
in=fopen("modedec.stats","rb");
- if(in==NULL)return;
+ if(in==NULL)return -1;
fread(OC_RES_BITRATE_ACCUM,sizeof(OC_RES_BITRATE_ACCUM),1,in);
fread(OC_RES_BITRATE_SAMPLES,sizeof(OC_RES_BITRATE_SAMPLES),1,in);
/*Update the current bitrate statistics in use.*/
@@ -66,4 +66,5 @@
else printf(" }\n");
}
printf("};\n");
+ return 0;
}
Modified: trunk/theora-exp/tools/extgen.c
===================================================================
--- trunk/theora-exp/tools/extgen.c 2008-01-04 17:38:40 UTC (rev 14342)
+++ trunk/theora-exp/tools/extgen.c 2008-01-04 17:45:14 UTC (rev 14343)
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <float.h>
+#include <math.h>
#include <string.h>
Modified: trunk/theora-exp/tools/filec.c
===================================================================
--- trunk/theora-exp/tools/filec.c 2008-01-04 17:38:40 UTC (rev 14342)
+++ trunk/theora-exp/tools/filec.c 2008-01-04 17:45:14 UTC (rev 14343)
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <stdlib.h>
int main(int _argc,char **_argv){
FILE *f1;
Modified: trunk/theora-exp/tools/huffgen.c
===================================================================
--- trunk/theora-exp/tools/huffgen.c 2008-01-04 17:38:40 UTC (rev 14342)
+++ trunk/theora-exp/tools/huffgen.c 2008-01-04 17:45:14 UTC (rev 14343)
@@ -627,9 +627,7 @@
int i;
root=NULL;
for(i=0;i<32;i++){
- OCHuffEntry **pnext;
- OCHuffEntry *entry;
- OCHuffEntry *search;
+ OCHuffEntry *entry;
/*Create a new entry for this value.*/
entry=(OCHuffEntry *)calloc(1,sizeof(*root));
entry->children[0]=entry->children[1]=NULL;
Modified: trunk/theora-exp/tools/quantgen.c
===================================================================
--- trunk/theora-exp/tools/quantgen.c 2008-01-04 17:38:40 UTC (rev 14342)
+++ trunk/theora-exp/tools/quantgen.c 2008-01-04 17:45:14 UTC (rev 14343)
@@ -56,30 +56,6 @@
-/*Allocates a 2-dimesional array of the given size.
- _height: The number of columns.
- _row: The number of rows.
- _sz: The size of each element.*/
-static void **alloc_2d(size_t _height,size_t _width,size_t _sz){
- size_t colsz;
- size_t datsz;
- char *ret;
- colsz=_height*sizeof(void *);
- datsz=_sz*_width*_height;
- ret=(char *)malloc(datsz+colsz);
- if(ret!=NULL){
- size_t rowsz;
- size_t i;
- void **p;
- char *datptr;
- p=(void **)ret;
- i=_height;
- rowsz=_sz*_width;
- for(datptr=ret+colsz;i-->0;p++,datptr+=rowsz)*p=(void *)datptr;
- }
- return (void **)ret;
-}
-
/*cos(n*pi/2) (resp. sin(m*pi/2)) accurate to 16 bits.*/
#define OC_C1S7D (64277.0/65536)
#define OC_C2S6D (60547.0/65536)
More information about the commits
mailing list