mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-24 06:10:09 +01:00
.github
autotools
cmake-proxies
dox2-src
help
images
include
lib-src
FileDialog
expat
ffmpeg
header-substitutes
lame
lib-widget-extra
libflac
libid3tag
libmad
libmp3lame
libnyquist
libogg
libscorealign
libsndfile
libsoxr
libvamp
libvorbis
doc
examples
include
lib
m4
macos
macosx
symbian
test
vq
16.vqs
16u.vqs
44c-1.vqs
44c0.vqs
44c1.vqs
44c2.vqs
44c3.vqs
44c4.vqs
44c5.vqs
44c6.vqs
44c7.vqs
44c8.vqs
44c9.vqs
44p-1.vqs
44p0.vqs
44p1.vqs
44p2.vqs
44p3.vqs
44p4.vqs
44p5.vqs
44p6.vqs
44p7.vqs
44p8.vqs
44p9.vqs
44u0.vqs
44u1.vqs
44u2.vqs
44u3.vqs
44u4.vqs
44u5.vqs
44u6.vqs
44u7.vqs
44u8.vqs
44u9.vqs
8.vqs
8u.vqs
Makefile.am
Makefile.in
auxpartition.pl
bookutil.c
bookutil.h
build.c
cascade.c
distribution.c
floor_11.vqs
floor_22.vqs
floor_44.vqs
genericdata.c
huffbuild.c
latticebuild.c
latticehint.c
latticepare.c
latticetune.c
localcodebook.h
lspdata.c
make_floor_books.pl
make_residue_books.pl
metrics.c
residue_entropy
residuedata.c
residuesplit.c
run.c
train.c
vqext.h
vqgen.c
vqgen.h
vqsplit.c
vqsplit.h
win32
AUTHORS
CHANGES
COPYING
Makefile.am
Makefile.in
README
autogen.sh
autotools.patch
compile
config.guess
config.h.in
config.sub
configure
configure.ac
depcomp
install-sh
libvorbis.spec.in
local-libogg.patch
ltmain.sh
missing
no-docs-examples.patch
todo.txt
vorbis-uninstalled.pc.in
vorbis.m4
vorbis.pc.in
vorbisenc-uninstalled.pc.in
vorbisenc.pc.in
vorbisfile-uninstalled.pc.in
vorbisfile.pc.in
lv2
mod-null
mod-nyq-bench
mod-script-pipe
mod-track-panel
mpglib
portaudio-v19
portburn
portmidi
portmixer
portsmf
sbsms
soundtouch
twolame
CMakeLists.txt
Makefile.am
Makefile.in
audacity-patches.txt
dist-libsoxr.mk
dist-libvamp.mk
dist-portaudio.mk
linux
locale
m4
mac
nyq-po
nyquist
plug-ins
presets
qa
scripts
src
tests
win
.gitattributes
.gitignore
.travis.yml
ABOUT-NLS
CHANGELOG.txt
CMakeLists.txt
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Directory.Build.props
INSTALL
LICENSE.txt
Makefile.am
Makefile.in
PULL_REQUEST_TEMPLATE.md
README.txt
appveyor.yml
audacity.dox
configure
configure.ac
po
todo.txt
86 lines
2.4 KiB
C
86 lines
2.4 KiB
C
/********************************************************************
|
|
* *
|
|
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
|
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
|
* *
|
|
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
|
|
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
|
* *
|
|
********************************************************************
|
|
|
|
function: build a VQ codebook
|
|
last mod: $Id: vqgen.h 16037 2009-05-26 21:10:58Z xiphmont $
|
|
|
|
********************************************************************/
|
|
|
|
#ifndef _VQGEN_H_
|
|
#define _VQGEN_H_
|
|
|
|
typedef struct vqgen{
|
|
int seeded;
|
|
int sorted;
|
|
|
|
int it;
|
|
int elements;
|
|
|
|
int aux;
|
|
float mindist;
|
|
int centroid;
|
|
|
|
/* point cache */
|
|
float *pointlist;
|
|
long points;
|
|
long allocated;
|
|
|
|
/* entries */
|
|
float *entrylist;
|
|
long *assigned;
|
|
float *bias;
|
|
long entries;
|
|
float *max;
|
|
|
|
float (*metric_func) (struct vqgen *v,float *entry,float *point);
|
|
float *(*weight_func) (struct vqgen *v,float *point);
|
|
|
|
FILE *asciipoints;
|
|
} vqgen;
|
|
|
|
typedef struct {
|
|
long min; /* packed 24 bit float */
|
|
long delta; /* packed 24 bit float */
|
|
int quant; /* 0 < quant <= 16 */
|
|
int sequencep; /* bitflag */
|
|
} quant_meta;
|
|
|
|
static inline float *_point(vqgen *v,long ptr){
|
|
return v->pointlist+((v->elements+v->aux)*ptr);
|
|
}
|
|
|
|
static inline float *_aux(vqgen *v,long ptr){
|
|
return _point(v,ptr)+v->aux;
|
|
}
|
|
|
|
static inline float *_now(vqgen *v,long ptr){
|
|
return v->entrylist+(v->elements*ptr);
|
|
}
|
|
|
|
extern void vqgen_init(vqgen *v,
|
|
int elements,int aux,int entries,float mindist,
|
|
float (*metric)(vqgen *,float *, float *),
|
|
float *(*weight)(vqgen *,float *),int centroid);
|
|
extern void vqgen_addpoint(vqgen *v, float *p,float *aux);
|
|
|
|
extern float vqgen_iterate(vqgen *v,int biasp);
|
|
extern void vqgen_unquantize(vqgen *v,quant_meta *q);
|
|
extern void vqgen_quantize(vqgen *v,quant_meta *q);
|
|
extern void vqgen_cellmetric(vqgen *v);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|