1 /********************************************************************
3 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
5 * THE GNU LESSER/LIBRARY PUBLIC LICENSE, WHICH IS INCLUDED WITH *
6 * THIS SOURCE. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
8 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2000 *
9 * by Monty <monty@xiph.org> and the XIPHOPHORUS Company *
10 * http://www.xiph.org/ *
12 ********************************************************************
14 function: function call to do simple data cascading
15 last mod: $Id: cascade.c,v 1.10 2000/12/21 21:04:49 xiphmont Exp $
17 ********************************************************************/
19 /* this one outputs residue to stdout. */
31 void process_preprocess(codebook **bs,char *basename){
34 void process_postprocess(codebook **b,char *basename){
35 fprintf(stderr,"Done. \n");
38 float process_one(codebook *b,float *a,int dim,int step,int addmul,
42 if(b->c->q_sequencep){
51 vorbis_book_besterror(b,a,step,addmul);
56 void process_vector(codebook **bs,int *addmul,int inter,float *a,int n){
67 base=process_one(b,a+i,dim,n/dim,addmul[bi],base);
69 for(i=0;i<=n-dim;i+=dim)
70 base=process_one(b,a+i,dim,1,addmul[bi],base);
79 fprintf(stdout,"%f, ",a[i]);
82 if((long)(count++)%100)spinnit("working.... lines: ",count);
85 void process_usage(void){
87 "usage: vqcascade [-i] +|*<codebook>.vqh [ +|*<codebook.vqh> ]... \n"
88 " datafile.vqd [datafile.vqd]...\n\n"
89 " data can be taken on stdin. residual error data sent to\n"