summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vq/Makefile6
-rw-r--r--vq/bookutil.c4
-rw-r--r--vq/bookutil.h4
-rw-r--r--vq/build.c4
-rw-r--r--vq/cascade.c4
-rw-r--r--vq/latticebuild.c4
-rw-r--r--vq/latticehint.c4
-rw-r--r--vq/latticepare.c4
-rw-r--r--vq/latticetune.c12
-rw-r--r--vq/lspdata.c4
-rw-r--r--vq/metrics.c4
-rw-r--r--vq/residuedata.c3
-rw-r--r--vq/residuesplit.c5
-rw-r--r--vq/vqgen.c3
-rw-r--r--vq/vqsplit.c3
-rw-r--r--vq/vqsplit.h4
16 files changed, 28 insertions, 44 deletions
diff --git a/vq/Makefile b/vq/Makefile
index 8e401ef9..2c8e285e 100644
--- a/vq/Makefile
+++ b/vq/Makefile
@@ -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 @@ LD=gcc
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\
diff --git a/vq/bookutil.c b/vq/bookutil.c
index 8eee3157..344f84eb 100644
--- a/vq/bookutil.c
+++ b/vq/bookutil.c
@@ -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 */
diff --git a/vq/bookutil.h b/vq/bookutil.h
index be9a9835..4f84cf07 100644
--- a/vq/bookutil.h
+++ b/vq/bookutil.h
@@ -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);
diff --git a/vq/build.c b/vq/build.c
index 11e3e901..baaf8bc1 100644
--- a/vq/build.c
+++ b/vq/build.c
@@ -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"
diff --git a/vq/cascade.c b/vq/cascade.c
index cae75802..91d019c3 100644
--- a/vq/cascade.c
+++ b/vq/cascade.c
@@ -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 */
diff --git a/vq/latticebuild.c b/vq/latticebuild.c
index ef1e5777..dc9befc4 100644
--- a/vq/latticebuild.c
+++ b/vq/latticebuild.c
@@ -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
diff --git a/vq/latticehint.c b/vq/latticehint.c
index 50bf3f67..1eecabce 100644
--- a/vq/latticehint.c
+++ b/vq/latticehint.c
@@ -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"
diff --git a/vq/latticepare.c b/vq/latticepare.c
index 3e3b41e0..fbfc9b29 100644
--- a/vq/latticepare.c
+++ b/vq/latticepare.c
@@ -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"
diff --git a/vq/latticetune.c b/vq/latticetune.c
index 0c67835d..f7563b4b 100644
--- a/vq/latticetune.c
+++ b/vq/latticetune.c
@@ -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 @@ int main(int argc,char *argv[]){
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 @@ int main(int argc,char *argv[]){
}
}
- if(!strcmp(argv[0],"restune")){
+ if(!strrcmp_i(argv[0],"restune")){
long step;
long lines=0;
long cols=-1;
diff --git a/vq/lspdata.c b/vq/lspdata.c
index 76c94ac1..4d972e32 100644
--- a/vq/lspdata.c
+++ b/vq/lspdata.c
@@ -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 */
diff --git a/vq/metrics.c b/vq/metrics.c
index 964ce1ad..013ad760 100644
--- a/vq/metrics.c
+++ b/vq/metrics.c
@@ -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:
diff --git a/vq/residuedata.c b/vq/residuedata.c
index b9203a47..3de4f168 100644
--- a/vq/residuedata.c
+++ b/vq/residuedata.c
@@ -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"
diff --git a/vq/residuesplit.c b/vq/residuesplit.c
index 9beab804..1711395c 100644
--- a/vq/residuesplit.c
+++ b/vq/residuesplit.c
@@ -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 */
diff --git a/vq/vqgen.c b/vq/vqgen.c
index df2ebd76..e3bcea01 100644
--- a/vq/vqgen.c
+++ b/vq/vqgen.c
@@ -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:
diff --git a/vq/vqsplit.c b/vq/vqsplit.c
index d6ca6bd7..6f5beac6 100644
--- a/vq/vqsplit.c
+++ b/vq/vqsplit.c
@@ -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:
diff --git a/vq/vqsplit.h b/vq/vqsplit.h
index 8da7fd9e..481c7120 100644
--- a/vq/vqsplit.h
+++ b/vq/vqsplit.h
@@ -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);