[xiph-cvs] cvs commit: vorbis/vq Makefile bookutil.c bookutil.h build.c cascade.c latticebuild.c latticehint.c latticepare.c latticetune.c lspdata.c metrics.c residuedata.c residuesplit.c vqgen.c vqsplit.c vqsplit.h
Monty
xiphmont at xiph.org
Tue Nov 7 19:23:26 PST 2000
xiphmont 00/11/07 19:23:26
Modified: vq Makefile bookutil.c bookutil.h build.c cascade.c
latticebuild.c latticehint.c latticepare.c
latticetune.c lspdata.c metrics.c residuedata.c
residuesplit.c vqgen.c vqsplit.c vqsplit.h
Log:
Fixes for codebook geenration (keeping up to date)
Revision Changes Path
1.3 +3 -3 vorbis/vq/Makefile
Index: Makefile
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Makefile 2000/11/06 00:07:25 1.2
+++ Makefile 2000/11/08 03:23:23 1.3
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.2 2000/11/06 00:07:25 xiphmont Exp $
+# $Id: Makefile,v 1.3 2000/11/08 03:23:23 xiphmont Exp $
###############################################################################
# #
@@ -9,7 +9,7 @@
# #
###############################################################################
-FLAGS=-I. -I../include
+FLAGS=-I. -I../lib -I../include
OPT=-O20 $(FLAGS)
DEBUG=-g -Wall $(FLAGS)
PROFILE=-g -pg -O20 $(FLAGS)
@@ -18,7 +18,7 @@
LDFLAGS=$(FLAGS)
LIBS=-lm
-HFILES = ../include/vorbis/codebook.h vqgen.h vqext.h bookutil.h
+HFILES = ../lib/codebook.h vqgen.h vqext.h bookutil.h
OFILES = vqgen.o vqsplit.o bookutil.o ../lib/sharedbook.o
ALLOFILES = $(OFILES) lspdata.o genericdata.o train.o build.o run.o\
1.19 +1 -3 vorbis/vq/bookutil.c
Index: bookutil.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/bookutil.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- bookutil.c 2000/11/06 00:07:25 1.18
+++ bookutil.c 2000/11/08 03:23:23 1.19
@@ -12,7 +12,7 @@
********************************************************************
function: utility functions for loading .vqh and .vqd files
- last mod: $Id: bookutil.c,v 1.18 2000/11/06 00:07:25 xiphmont Exp $
+ last mod: $Id: bookutil.c,v 1.19 2000/11/08 03:23:23 xiphmont Exp $
********************************************************************/
@@ -21,8 +21,6 @@
#include <math.h>
#include <string.h>
#include <errno.h>
-#include "vorbis/codebook.h"
-#include "../lib/sharedbook.h"
#include "bookutil.h"
/* A few little utils for reading files */
1.9 +2 -2 vorbis/vq/bookutil.h
Index: bookutil.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/bookutil.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- bookutil.h 2000/11/06 00:07:25 1.8
+++ bookutil.h 2000/11/08 03:23:23 1.9
@@ -12,7 +12,7 @@
********************************************************************
function: utility functions for loading .vqh and .vqd files
- last mod: $Id: bookutil.h,v 1.8 2000/11/06 00:07:25 xiphmont Exp $
+ last mod: $Id: bookutil.h,v 1.9 2000/11/08 03:23:23 xiphmont Exp $
********************************************************************/
@@ -22,7 +22,7 @@
#include <stdio.h>
#include <sys/time.h>
-#include "vorbis/codebook.h"
+#include "codebook.h"
extern char *get_line(FILE *in);
extern char *setup_line(FILE *in);
1.17 +1 -3 vorbis/vq/build.c
Index: build.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/build.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- build.c 2000/11/06 00:07:25 1.16
+++ build.c 2000/11/08 03:23:23 1.17
@@ -12,7 +12,7 @@
********************************************************************
function: utility main for building codebooks from training sets
- last mod: $Id: build.c,v 1.16 2000/11/06 00:07:25 xiphmont Exp $
+ last mod: $Id: build.c,v 1.17 2000/11/08 03:23:23 xiphmont Exp $
********************************************************************/
@@ -21,8 +21,6 @@
#include <math.h>
#include <string.h>
#include <errno.h>
-#include "vorbis/codebook.h"
-#include "../lib/sharedbook.h"
#include "bookutil.h"
#include "vqgen.h"
1.9 +1 -3 vorbis/vq/cascade.c
Index: cascade.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/cascade.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- cascade.c 2000/11/06 00:07:25 1.8
+++ cascade.c 2000/11/08 03:23:23 1.9
@@ -12,7 +12,7 @@
********************************************************************
function: function call to do simple data cascading
- last mod: $Id: cascade.c,v 1.8 2000/11/06 00:07:25 xiphmont Exp $
+ last mod: $Id: cascade.c,v 1.9 2000/11/08 03:23:23 xiphmont Exp $
********************************************************************/
@@ -21,8 +21,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
-#include "vorbis/codebook.h"
-#include "../lib/sharedbook.h"
#include "bookutil.h"
/* set up metrics */
1.8 +1 -3 vorbis/vq/latticebuild.c
Index: latticebuild.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/latticebuild.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- latticebuild.c 2000/11/06 00:07:25 1.7
+++ latticebuild.c 2000/11/08 03:23:23 1.8
@@ -12,7 +12,7 @@
********************************************************************
function: utility main for building codebooks from lattice descriptions
- last mod: $Id: latticebuild.c,v 1.7 2000/11/06 00:07:25 xiphmont Exp $
+ last mod: $Id: latticebuild.c,v 1.8 2000/11/08 03:23:23 xiphmont Exp $
********************************************************************/
@@ -21,8 +21,6 @@
#include <math.h>
#include <string.h>
#include <errno.h>
-#include "vorbis/codebook.h"
-#include "../lib/sharedbook.h"
#include "bookutil.h"
/* The purpose of this util is just to finish packaging the
1.5 +1 -3 vorbis/vq/latticehint.c
Index: latticehint.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/latticehint.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- latticehint.c 2000/11/06 00:07:26 1.4
+++ latticehint.c 2000/11/08 03:23:23 1.5
@@ -12,7 +12,7 @@
********************************************************************
function: utility main for building thresh/pigeonhole encode hints
- last mod: $Id: latticehint.c,v 1.4 2000/11/06 00:07:26 xiphmont Exp $
+ last mod: $Id: latticehint.c,v 1.5 2000/11/08 03:23:23 xiphmont Exp $
********************************************************************/
@@ -21,8 +21,6 @@
#include <math.h>
#include <string.h>
#include <errno.h>
-#include "vorbis/codebook.h"
-#include "../lib/sharedbook.h"
#include "../lib/scales.h"
#include "bookutil.h"
#include "vqgen.h"
1.7 +1 -3 vorbis/vq/latticepare.c
Index: latticepare.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/latticepare.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- latticepare.c 2000/11/06 00:07:26 1.6
+++ latticepare.c 2000/11/08 03:23:23 1.7
@@ -12,7 +12,7 @@
********************************************************************
function: utility for paring low hit count cells from lattice codebook
- last mod: $Id: latticepare.c,v 1.6 2000/11/06 00:07:26 xiphmont Exp $
+ last mod: $Id: latticepare.c,v 1.7 2000/11/08 03:23:23 xiphmont Exp $
********************************************************************/
@@ -21,8 +21,6 @@
#include <math.h>
#include <string.h>
#include <errno.h>
-#include "vorbis/codebook.h"
-#include "../lib/sharedbook.h"
#include "../lib/scales.h"
#include "bookutil.h"
#include "vqgen.h"
1.5 +7 -5 vorbis/vq/latticetune.c
Index: latticetune.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/latticetune.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- latticetune.c 2000/11/06 00:07:26 1.4
+++ latticetune.c 2000/11/08 03:23:23 1.5
@@ -13,7 +13,7 @@
function: utility main for setting entropy encoding parameters
for lattice codebooks
- last mod: $Id: latticetune.c,v 1.4 2000/11/06 00:07:26 xiphmont Exp $
+ last mod: $Id: latticetune.c,v 1.5 2000/11/08 03:23:23 xiphmont Exp $
********************************************************************/
@@ -22,10 +22,12 @@
#include <math.h>
#include <string.h>
#include <errno.h>
-#include "vorbis/codebook.h"
-#include "../lib/sharedbook.h"
#include "bookutil.h"
+static char *strrcmp_i(char *s,char *cmp){
+ return(strncmp(s+strlen(s)-strlen(cmp),cmp,strlen(cmp)));
+}
+
/* This util takes a training-collected file listing codewords used in
LSP fitting, then generates new codeword lengths for maximally
efficient integer-bits entropy encoding.
@@ -90,7 +92,7 @@
exit(1);
}
- if(!strcmp(argv[0],"latticetune")){
+ if(!strrcmp_i(argv[0],"latticetune")){
long lines=0;
line=setup_line(in);
while(line){
@@ -105,7 +107,7 @@
}
}
- if(!strcmp(argv[0],"restune")){
+ if(!strrcmp_i(argv[0],"restune")){
long step;
long lines=0;
long cols=-1;
1.15 +2 -2 vorbis/vq/lspdata.c
Index: lspdata.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/lspdata.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- lspdata.c 2000/11/06 00:07:26 1.14
+++ lspdata.c 2000/11/08 03:23:23 1.15
@@ -12,7 +12,7 @@
********************************************************************
function: metrics and quantization code for LSP VQ codebooks
- last mod: $Id: lspdata.c,v 1.14 2000/11/06 00:07:26 xiphmont Exp $
+ last mod: $Id: lspdata.c,v 1.15 2000/11/08 03:23:23 xiphmont Exp $
********************************************************************/
@@ -21,7 +21,7 @@
#include <stdio.h>
#include "vqgen.h"
#include "vqext.h"
-#include "../lib/sharedbook.h"
+#include "codebook.h"
char *vqext_booktype="LSPdata";
quant_meta q={0,0,0,1}; /* set sequence data */
1.11 +1 -3 vorbis/vq/metrics.c
Index: metrics.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/metrics.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- metrics.c 2000/11/06 00:07:26 1.10
+++ metrics.c 2000/11/08 03:23:23 1.11
@@ -12,7 +12,7 @@
********************************************************************
function: function calls to collect codebook metrics
- last mod: $Id: metrics.c,v 1.10 2000/11/06 00:07:26 xiphmont Exp $
+ last mod: $Id: metrics.c,v 1.11 2000/11/08 03:23:23 xiphmont Exp $
********************************************************************/
@@ -20,8 +20,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
-#include "vorbis/codebook.h"
-#include "../lib/sharedbook.h"
#include "bookutil.h"
/* collect the following metrics:
1.6 +1 -2 vorbis/vq/residuedata.c
Index: residuedata.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/residuedata.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- residuedata.c 2000/11/06 00:07:26 1.5
+++ residuedata.c 2000/11/08 03:23:23 1.6
@@ -12,7 +12,7 @@
********************************************************************
function: metrics and quantization code for residue VQ codebooks
- last mod: $Id: residuedata.c,v 1.5 2000/11/06 00:07:26 xiphmont Exp $
+ last mod: $Id: residuedata.c,v 1.6 2000/11/08 03:23:23 xiphmont Exp $
********************************************************************/
@@ -22,7 +22,6 @@
#include <string.h>
#include "vqgen.h"
#include "bookutil.h"
-#include "../lib/sharedbook.h"
#include "../lib/scales.h"
#include "vqext.h"
1.7 +2 -3 vorbis/vq/residuesplit.c
Index: residuesplit.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/residuesplit.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- residuesplit.c 2000/11/06 00:07:26 1.6
+++ residuesplit.c 2000/11/08 03:23:23 1.7
@@ -12,7 +12,7 @@
********************************************************************
function: residue backend 0 partitioner/classifier
- last mod: $Id: residuesplit.c,v 1.6 2000/11/06 00:07:26 xiphmont Exp $
+ last mod: $Id: residuesplit.c,v 1.7 2000/11/08 03:23:23 xiphmont Exp $
********************************************************************/
@@ -20,8 +20,7 @@
#include <string.h>
#include <math.h>
#include <stdio.h>
-#include "../vq/bookutil.h"
-#include "../lib/sharedbook.h"
+#include "bookutil.h"
/* does not guard against invalid settings; eg, a subn of 16 and a
subgroup request of 32. Max subn of 128 */
1.36 +1 -2 vorbis/vq/vqgen.c
Index: vqgen.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/vqgen.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- vqgen.c 2000/11/06 00:07:26 1.35
+++ vqgen.c 2000/11/08 03:23:23 1.36
@@ -12,7 +12,7 @@
********************************************************************
function: train a VQ codebook
- last mod: $Id: vqgen.c,v 1.35 2000/11/06 00:07:26 xiphmont Exp $
+ last mod: $Id: vqgen.c,v 1.36 2000/11/08 03:23:23 xiphmont Exp $
********************************************************************/
@@ -32,7 +32,6 @@
#include "vqgen.h"
#include "bookutil.h"
-#include "../lib/sharedbook.h"
/* Codebook generation happens in two steps:
1.22 +1 -2 vorbis/vq/vqsplit.c
Index: vqsplit.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/vqsplit.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- vqsplit.c 2000/11/06 00:07:26 1.21
+++ vqsplit.c 2000/11/08 03:23:24 1.22
@@ -12,7 +12,7 @@
********************************************************************
function: build a VQ codebook and the encoding decision 'tree'
- last mod: $Id: vqsplit.c,v 1.21 2000/11/06 00:07:26 xiphmont Exp $
+ last mod: $Id: vqsplit.c,v 1.22 2000/11/08 03:23:24 xiphmont Exp $
********************************************************************/
@@ -34,7 +34,6 @@
#include "vqgen.h"
#include "vqsplit.h"
#include "bookutil.h"
-#include "../lib/sharedbook.h"
/* Codebook generation happens in two steps:
1.5 +2 -2 vorbis/vq/vqsplit.h
Index: vqsplit.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/vqsplit.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vqsplit.h 2000/11/06 00:07:26 1.4
+++ vqsplit.h 2000/11/08 03:23:24 1.5
@@ -12,14 +12,14 @@
********************************************************************
function: build a VQ codebook decision tree
- last mod: $Id: vqsplit.h,v 1.4 2000/11/06 00:07:26 xiphmont Exp $
+ last mod: $Id: vqsplit.h,v 1.5 2000/11/08 03:23:24 xiphmont Exp $
********************************************************************/
#ifndef _VQSPL_H_
#define _VQSPL_H_
-#include "vorbis/codebook.h"
+#include "codebook.h"
extern void vqsp_book(vqgen *v,codebook *b,long *quantlist);
extern int vqenc_entry(codebook *b,float *val);
--- >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