diff options
author | Monty <xiphmont@xiph.org> | 2001-12-11 08:19:49 +0000 |
---|---|---|
committer | Monty <xiphmont@xiph.org> | 2001-12-11 08:19:49 +0000 |
commit | c102a1e00a99764be5cf8071069d6c444e31aa62 (patch) | |
tree | df47be8ac859bc8dda1b2382133391c1c33313d5 | |
parent | 71e91ab6295b9792d9eb36ee14d72332f6d96374 (diff) | |
download | libvorbis-git-c102a1e00a99764be5cf8071069d6c444e31aa62.tar.gz |
Mode 0 is just about there.
svn path=/branches/branch_monty_20011009/vorbis/; revision=2511
47 files changed, 498 insertions, 665 deletions
diff --git a/lib/block.c b/lib/block.c index e88a7fc3..3d9d7fcd 100644 --- a/lib/block.c +++ b/lib/block.c @@ -11,7 +11,7 @@ ******************************************************************** function: PCM data vector blocking, windowing and dis/reassembly - last mod: $Id: block.c,v 1.50.2.7 2001/12/05 08:03:16 xiphmont Exp $ + last mod: $Id: block.c,v 1.50.2.8 2001/12/11 08:19:39 xiphmont Exp $ Handle windowing, overlap-add, etc of the PCM vectors. This is made more amusing by Vorbis' current two allowed block sizes. @@ -494,6 +494,7 @@ int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb){ vorbis_look_psy_global *g=b->psy_g_look; vorbis_info_psy_global *gi=&ci->psy_g_param; long beginW=v->centerW-ci->blocksizes[v->W]/2,centerNext; + vorbis_block_internal *vbi=(vorbis_block_internal *)vb->internal; /* check to see if we're started... */ if(!v->preextrapolate)return(0); @@ -506,17 +507,7 @@ int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb){ which lets us compute the shape of the current block's window */ if(ci->blocksizes[0]<ci->blocksizes[1]){ - long largebound; - long bp; - - if(v->W) - /* min boundary; nW large, next small */ - largebound=v->centerW+ci->blocksizes[1]*3/4+ci->blocksizes[0]/4; - else - /* min boundary; nW large, next small */ - largebound=v->centerW+ci->blocksizes[1]/2+ci->blocksizes[0]/2; - - bp=_ve_envelope_search(v,largebound); + long bp=_ve_envelope_search(v); if(bp==-1)return(0); /* not enough data currently to search for a full long block */ v->nW=bp; @@ -537,6 +528,8 @@ int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb){ the search is not run if we only use one block size */ + + } /* fill in the block. Note that for a short window, lW and nW are *short* @@ -552,6 +545,19 @@ int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb){ vb->W=v->W; vb->nW=0; } + + if(v->W){ + if(!v->lW || !v->nW) + vbi->blocktype=BLOCKTYPE_TRANSITION; + else + vbi->blocktype=BLOCKTYPE_LONG; + }else{ + if(_ve_envelope_mark(v)) + vbi->blocktype=BLOCKTYPE_IMPULSE; + else + vbi->blocktype=BLOCKTYPE_PADDING; + } + vb->vd=v; vb->sequence=v->sequence; vb->granulepos=v->granulepos; diff --git a/lib/books/coupled/_44c0_long.vqh b/lib/books/coupled/_44c0_long.vqh index 871b42a2..1697ee1f 100644 --- a/lib/books/coupled/_44c0_long.vqh +++ b/lib/books/coupled/_44c0_long.vqh @@ -20,17 +20,14 @@ #include "codebook.h" static long _huff_lengthlist__44c0_long[] = { - 5,10,11,12,15, 5, 8,10,14,16,11, 4, 6, 8,11,16, - 16,16,16,16,10, 5, 6, 7,10,16,16,16,16,16,10, 6, - 7, 8, 9,16,16,16,16,16,11, 8, 7, 5, 5,16,16,16, - 16,13, 4,16,16,16,16, 1, 5, 8,11,16, 8,16,16,16, - 16, 5, 7, 9,12,16,10,16,16,16,16, 8, 9,10,12,16, - 13,16,16,16,16,11,13,12,14,16,16,13,13,10, 5,16, - 16,16,15,11, + 3,10,10,12,14, 4, 8,15, 8, 3, 5, 8,11, 5, 8,15, + 9, 4, 5, 7,10, 7,10,14, 9, 6, 6, 6, 8,10,13,14, + 11, 8, 7, 7, 4,17,17,15, 4,16,16,16,16, 2, 6,14, + 8,16,16,16,16, 6, 8,13,14,13,14,11, 8,13,13,16, }; static static_codebook _huff_book__44c0_long = { - 2, 100, + 2, 64, _huff_lengthlist__44c0_long, 0, 0, 0, 0, 0, NULL, diff --git a/lib/books/coupled/_44c0_s0_p1_0.vqh b/lib/books/coupled/_44c0_s0_p1_0.vqh index 64bf8861..6685d913 100644 --- a/lib/books/coupled/_44c0_s0_p1_0.vqh +++ b/lib/books/coupled/_44c0_s0_p1_0.vqh @@ -29,15 +29,15 @@ static long _vq_quantlist__44c0_s0_p1_0[] = { static long _vq_lengthlist__44c0_s0_p1_0[] = { 1, 6, 6, 0, 0, 0, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 6, 9, 8, 0, 0, 0, 9, - 8, 0, 0, 0, 8, 8, 0, 0, 0,12,11, 0, 0, 0, 0, 0, - 0, 0, 6, 8, 9, 0, 0, 0, 8, 9, 0, 0, 0, 8, 8, 0, - 0, 0,11,11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8, 0, 0, 0, 9, 8, 0, 0, 0,12,11, 0, 0, 0, 0, 0, + 0, 0, 6, 8, 9, 0, 0, 0, 8, 9, 0, 0, 0, 8, 9, 0, + 0, 0,11,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 5, 8, 9, 0, 0, 0, 8, 7, 0, 0, - 0, 7, 8, 0, 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 5, 9, 8, 0, 0, 0, 8, 7, 0, 0, + 0, 7, 8, 0, 0, 0,11, 9, 0, 0, 0, 0, 0, 0, 0, 5, 9, 9, 0, 0, 0, 7, 8, 0, 0, 0, 8, 7, 0, 0, 0,10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -52,9 +52,9 @@ static long _vq_lengthlist__44c0_s0_p1_0[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 8,11,11, 0, 0, 0,10,10, 0, 0, 0,10,11, 0, 0, 0, - 12,11, 0, 0, 0, 0, 0, 0, 0, 9,12,11, 0, 0, 0,10, - 10, 0, 0, 0,11,10, 0, 0, 0,11,12, 0, 0, 0, 0, 0, + 8,11,12, 0, 0, 0,10,10, 0, 0, 0, 9,11, 0, 0, 0, + 12,11, 0, 0, 0, 0, 0, 0, 0, 8,12,11, 0, 0, 0,10, + 10, 0, 0, 0,11, 9, 0, 0, 0,11,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/lib/books/coupled/_44c0_s0_p2_0.vqh b/lib/books/coupled/_44c0_s0_p2_0.vqh index 3662f4e3..ae0a3ef3 100644 --- a/lib/books/coupled/_44c0_s0_p2_0.vqh +++ b/lib/books/coupled/_44c0_s0_p2_0.vqh @@ -31,10 +31,10 @@ static long _vq_quantlist__44c0_s0_p2_0[] = { }; static long _vq_lengthlist__44c0_s0_p2_0[] = { - 1, 4, 4, 7, 7, 0, 0, 0, 0, 0, 4, 4, 7, 6, 0, 0, + 1, 4, 4, 7, 6, 0, 0, 0, 0, 0, 4, 4, 7, 7, 0, 0, 0, 0, 0, 4, 4, 7, 7, 0, 0, 0, 0, 0, 6, 6, 7, 7, 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0, - 9,10, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, + 10, 9, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0,11,11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; diff --git a/lib/books/coupled/_44c0_s0_p3_0.vqh b/lib/books/coupled/_44c0_s0_p3_0.vqh index a8453aad..60d4f393 100644 --- a/lib/books/coupled/_44c0_s0_p3_0.vqh +++ b/lib/books/coupled/_44c0_s0_p3_0.vqh @@ -39,22 +39,22 @@ static long _vq_quantlist__44c0_s0_p3_0[] = { }; static long _vq_lengthlist__44c0_s0_p3_0[] = { - 1, 5, 4, 7, 7, 7, 8, 9, 9, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 5, 4, 7, 7, 7, 7, 9, 9, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 4, 4, 7, 7, 8, 7, 9, 9, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 7, 8, 8, 8, 8, 9,10, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 9,10, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,10,10, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 9, 9,11,10, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,10, 9,10,11,11, + 1, 4, 4, 7, 7, 7, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 5, 7, 7, 7, 8, 9, 9, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 4, 4, 7, 7, 8, 8, 9,10, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 7, 8, 7, 8, 8,10,10, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 8, 7, 8, 8,10,10, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 9, 8, 9, 9,10,10, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,11,10, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,10,10,10,11,11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,10,11, - 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11,11, - 11,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11, + 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,10, + 12,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 11,12,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 12,11,12,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 11,11,12,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,14,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,14,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,12,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0,12,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/lib/books/coupled/_44c0_s0_p4_0.vqh b/lib/books/coupled/_44c0_s0_p4_0.vqh index 3c716a9f..35fbafac 100644 --- a/lib/books/coupled/_44c0_s0_p4_0.vqh +++ b/lib/books/coupled/_44c0_s0_p4_0.vqh @@ -37,21 +37,21 @@ static long _vq_quantlist__44c0_s0_p4_0[] = { }; static long _vq_lengthlist__44c0_s0_p4_0[] = { - 1, 3, 3, 6, 6, 8, 8,11,11,18,18,18,18,18,18, 6, - 5, 5, 8, 8, 9, 9,12,13,18,18,18,18,17,17, 7, 5, - 5, 8, 8, 9,10,12,13,17,17,17,17,17,17,17, 8, 8, - 9, 9,10,11,14,14,17,17,17,17,17,17,17, 8, 8, 9, - 9,11,10,13,14,17,17,17,17,17,17,17,12,12,10,10, - 12,11,14,14,17,17,17,17,17,17,17,13,13,10,10,11, - 11,14,14,17,17,17,17,17,17,17,17,17,12,12,12,12, - 14,15,17,17,17,17,17,17,17,17,17,12,12,11,11,16, - 15,17,17,17,17,17,17,17,17,17,14,15,13,12,14,15, - 17,17,17,17,17,17,17,17,17,16,16,13,13,15,15,17, - 17,17,17,17,17,17,17,17,17,17,13,14,15,16,17,17, - 17,17,17,17,17,17,17,17,17,13,14,16,15,17,17,17, - 17,17,17,17,17,17,17,17,16,17,14,15,17,17,17,17, - 17,17,17,17,17,17,17,17,17,15,14,17,17,17,17,17, - 17, + 1, 3, 3, 6, 6, 9, 9,13,12,17,17,17,17,17,17, 5, + 5, 5, 8, 8,12,11,15,15,17,17,17,17,17,17, 6, 5, + 5, 8, 8,11,11,14,14,17,17,17,17,17,17,17, 8, 8, + 9, 9,14,13,15,16,17,17,17,17,17,17,17, 9, 9,10, + 10,15,14,17,17,17,17,17,17,17,17,17,13,13,11,11, + 14,14,15,17,17,17,17,17,17,17,17,13,13,11,11,14, + 15,17,16,17,17,17,17,17,17,17,17,17,11,14,13,15, + 17,17,17,17,17,17,17,17,17,17,17,14,13,15,16,17, + 17,17,17,17,17,17,17,17,17,17,13,17,10,17,13,17, + 17,17,17,17,17,17,17,17,17,17,15,17,13,17,17,17, + 17,17,17,17,17,17,17,17,17,17,13,17,11,17,17,17, + 17,17,17,17,17,17,17,17,17,17,13,17,16,17,17,17, + 17,17,16,16,16,16,16,16,16,16,15,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,15,16,16,16,16,16, + 16, }; static float _vq_quantthresh__44c0_s0_p4_0[] = { diff --git a/lib/books/coupled/_44c0_s0_p4_1.vqh b/lib/books/coupled/_44c0_s0_p4_1.vqh index 85789987..77a5bf51 100644 --- a/lib/books/coupled/_44c0_s0_p4_1.vqh +++ b/lib/books/coupled/_44c0_s0_p4_1.vqh @@ -29,10 +29,10 @@ static long _vq_quantlist__44c0_s0_p4_1[] = { }; static long _vq_lengthlist__44c0_s0_p4_1[] = { - 3, 4, 4, 5, 5, 6, 6, 7, 5, 5, 6, 6, 6, 6, 7, 5, - 5, 5, 5, 6, 6, 7, 6, 6, 6, 6, 6, 6, 7, 7, 7, 6, - 6, 6, 6, 7, 7, 7, 6, 6, 6, 6, 7, 7, 7, 6, 6, 6, - 6, + 2, 4, 4, 5, 5, 6, 6, 8, 5, 5, 6, 6, 6, 6, 8, 5, + 5, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 6, 8, 8, 8, 6, + 6, 6, 6, 8, 8, 8, 7, 7, 7, 7, 8, 8, 8, 6, 6, 7, + 7, }; static float _vq_quantthresh__44c0_s0_p4_1[] = { diff --git a/lib/books/coupled/_44c0_s1_p5_0.vqh b/lib/books/coupled/_44c0_s1_p5_0.vqh index 81a1731d..37961b9e 100644 --- a/lib/books/coupled/_44c0_s1_p5_0.vqh +++ b/lib/books/coupled/_44c0_s1_p5_0.vqh @@ -25,8 +25,8 @@ static long _vq_quantlist__44c0_s1_p5_0[] = { }; static long _vq_lengthlist__44c0_s1_p5_0[] = { - 1, 3, 3, 0, 0, 0, 0, 0, 0, 3, 6, 6, 0, 0, 0, 0, - 0, 0, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 3, 3, 0, 0, 0, 0, 0, 0, 4, 6, 6, 0, 0, 0, 0, + 0, 0, 3, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/lib/books/coupled/_44c0_s4_p8_0.vqh b/lib/books/coupled/_44c0_s4_p8_0.vqh deleted file mode 100644 index c11adb0c..00000000 --- a/lib/books/coupled/_44c0_s4_p8_0.vqh +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************** - * * - * 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 XIPHOPHORUS Company http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V__44c0_s4_p8_0_VQH_ -#define _V__44c0_s4_p8_0_VQH_ -#include "codebook.h" - -static long _vq_quantlist__44c0_s4_p8_0[] = { - 7, - 6, - 8, - 5, - 9, - 4, - 10, - 3, - 11, - 2, - 12, - 1, - 13, - 0, - 14, -}; - -static long _vq_lengthlist__44c0_s4_p8_0[] = { - 1, 4, 4,10,10,10,10,10,10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, -}; - -static float _vq_quantthresh__44c0_s4_p8_0[] = { - -45.5, -38.5, -31.5, -24.5, -17.5, -10.5, -3.5, 3.5, - 10.5, 17.5, 24.5, 31.5, 38.5, 45.5, -}; - -static long _vq_quantmap__44c0_s4_p8_0[] = { - 13, 11, 9, 7, 5, 3, 1, 0, - 2, 4, 6, 8, 10, 12, 14, -}; - -static encode_aux_threshmatch _vq_auxt__44c0_s4_p8_0 = { - _vq_quantthresh__44c0_s4_p8_0, - _vq_quantmap__44c0_s4_p8_0, - 15, - 15 -}; - -static static_codebook _44c0_s4_p8_0 = { - 2, 225, - _vq_lengthlist__44c0_s4_p8_0, - 1, -524779520, 1616642048, 4, 0, - _vq_quantlist__44c0_s4_p8_0, - NULL, - &_vq_auxt__44c0_s4_p8_0, - NULL, - 0 -}; - - -#endif diff --git a/lib/books/coupled/_44c0_s4_p8_1.vqh b/lib/books/coupled/_44c0_s4_p8_1.vqh deleted file mode 100644 index ace42185..00000000 --- a/lib/books/coupled/_44c0_s4_p8_1.vqh +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************** - * * - * 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 XIPHOPHORUS Company http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V__44c0_s4_p8_1_VQH_ -#define _V__44c0_s4_p8_1_VQH_ -#include "codebook.h" - -static long _vq_quantlist__44c0_s4_p8_1[] = { - 3, - 2, - 4, - 1, - 5, - 0, - 6, -}; - -static long _vq_lengthlist__44c0_s4_p8_1[] = { - 1, 3, 3, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -}; - -static float _vq_quantthresh__44c0_s4_p8_1[] = { - -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, -}; - -static long _vq_quantmap__44c0_s4_p8_1[] = { - 5, 3, 1, 0, 2, 4, 6, -}; - -static encode_aux_threshmatch _vq_auxt__44c0_s4_p8_1 = { - _vq_quantthresh__44c0_s4_p8_1, - _vq_quantmap__44c0_s4_p8_1, - 7, - 7 -}; - -static static_codebook _44c0_s4_p8_1 = { - 2, 49, - _vq_lengthlist__44c0_s4_p8_1, - 1, -533200896, 1611661312, 3, 0, - _vq_quantlist__44c0_s4_p8_1, - NULL, - &_vq_auxt__44c0_s4_p8_1, - NULL, - 0 -}; - - -#endif diff --git a/lib/books/coupled/_44c0_s4_p9_0.vqh b/lib/books/coupled/_44c0_s4_p9_0.vqh deleted file mode 100644 index 66d57bc1..00000000 --- a/lib/books/coupled/_44c0_s4_p9_0.vqh +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************** - * * - * 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 XIPHOPHORUS Company http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V__44c0_s4_p9_0_VQH_ -#define _V__44c0_s4_p9_0_VQH_ -#include "codebook.h" - -static long _vq_quantlist__44c0_s4_p9_0[] = { - 3, - 2, - 4, - 1, - 5, - 0, - 6, -}; - -static long _vq_lengthlist__44c0_s4_p9_0[] = { - 1, 3, 3, 9, 8,12,11, 4, 4, 8,12,10,12,12, 5, 7, - 4,12,10,11,12,12,10,12,12,12,12,12,12,12,12,12, - 12,12,12,12,12,12,12,12,12,12,11,11,11,11,11,11, - 11, -}; - -static float _vq_quantthresh__44c0_s4_p9_0[] = { - -167.5, -100.5, -33.5, 33.5, 100.5, 167.5, -}; - -static long _vq_quantmap__44c0_s4_p9_0[] = { - 5, 3, 1, 0, 2, 4, 6, -}; - -static encode_aux_threshmatch _vq_auxt__44c0_s4_p9_0 = { - _vq_quantthresh__44c0_s4_p9_0, - _vq_quantmap__44c0_s4_p9_0, - 7, - 7 -}; - -static static_codebook _44c0_s4_p9_0 = { - 2, 49, - _vq_lengthlist__44c0_s4_p9_0, - 1, -520544256, 1624293376, 3, 0, - _vq_quantlist__44c0_s4_p9_0, - NULL, - &_vq_auxt__44c0_s4_p9_0, - NULL, - 0 -}; - - -#endif diff --git a/lib/books/coupled/_44c0_s4_p9_1.vqh b/lib/books/coupled/_44c0_s4_p9_1.vqh deleted file mode 100644 index 35d33c96..00000000 --- a/lib/books/coupled/_44c0_s4_p9_1.vqh +++ /dev/null @@ -1,115 +0,0 @@ -/******************************************************************** - * * - * 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 XIPHOPHORUS Company http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V__44c0_s4_p9_1_VQH_ -#define _V__44c0_s4_p9_1_VQH_ -#include "codebook.h" - -static long _vq_quantlist__44c0_s4_p9_1[] = { - 11, - 10, - 12, - 9, - 13, - 8, - 14, - 7, - 15, - 6, - 16, - 5, - 17, - 4, - 18, - 3, - 19, - 2, - 20, - 1, - 21, - 0, - 22, -}; - -static long _vq_lengthlist__44c0_s4_p9_1[] = { - 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 7, 8, 8, 8, 9, 9, - 9, 8, 9, 8, 9, 9, 9, 7, 6, 6, 7, 7, 7, 7, 8, 8, - 8, 8, 8, 9, 9, 9,10,10,10, 9,10, 9,10,10,12, 5, - 5, 7, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9,10,10, 9, - 9, 9, 9,10,10,15, 7, 8, 7, 8, 8, 8, 9, 9, 9,10, - 10,10,10,10,10,11,10,10,10, 9,11,10,14, 8, 6, 7, - 6, 8, 8, 9, 9, 9, 9,10,10,11,10,11,11,10,11, 9, - 11,11,11,13,10,11, 8, 8, 9, 9, 9, 9,10,10,10,10, - 11,11,11,11,11,11,11,10,11,12,15,15,14, 7, 7, 8, - 8, 9, 9,10,10,10,10,11,11,11,11,11,10,10,10,11, - 12,15,14,15, 9, 8, 9, 9, 9, 9,10,10,11,10,11,11, - 12,11,11,12,11,12,12,11,15,15,15, 8, 9, 8, 8, 9, - 9,10, 9,10,10,12,12,12,12,11,11,11,11,11,12,13, - 15,13,12,11, 9, 8,10, 9,10,11,10,11,12,11,12,11, - 12,12,12,12,13,12,15,15,15,14,15, 8, 8, 9, 8,10, - 9,11,10,11,11,12,12,11,11,11,11,12,12,15,15,15, - 15,15,11, 9,10, 9,10,10,11,11,11,11,11,12,12,11, - 12,12,12,12,15,15,15,15,15,10,10,10, 7,10, 9,11, - 10,11,11,12,12,12,12,12,12,13,12,15,15,15,15,14, - 12,12,10,10,11,11,11,11,12,12,12,12,13,11,12,12, - 12,13,15,15,15,14,15,15,15,11, 8, 9,10,10,11,12, - 11,11,12,12,12,12,12,13,15,15,14,15,14,13,15,15, - 11,11,10,12,11,11,12,12,12,12,13,12,12,11,12,12, - 15,15,15,14,15,15,15,12,10,10,11,11,11,11,11,12, - 12,12,11,12,12,13,13,15,15,15,13,15,15,14,14,14, - 10,11,11,11,11,12,12,12,12,12,12,12,13,13,14,14, - 15,15,15,14,15,15,15,11,11,11,11,11,10,12,11,13, - 12,12,12,12,13,15,15,15,15,14,15,15,15,15,12,12, - 12,11,12,12,12,12,11,12,12,12,12,13,15,15,15,15, - 15,15,15,14,15,12,12,11,11,12,12,12,12,11,13,12, - 12,12,12,15,15,14,15,15,15,15,15,15,13,15,11,11, - 13,12,12,13,13,12,12,12,14,14,15,15,15,15,15,15, - 15,15,15,15,15,12,12,12,12,13,13,12,13,12,13,15, - 12, -}; - -static float _vq_quantthresh__44c0_s4_p9_1[] = { - -31.5, -28.5, -25.5, -22.5, -19.5, -16.5, -13.5, -10.5, - -7.5, -4.5, -1.5, 1.5, 4.5, 7.5, 10.5, 13.5, - 16.5, 19.5, 22.5, 25.5, 28.5, 31.5, -}; - -static long _vq_quantmap__44c0_s4_p9_1[] = { - 21, 19, 17, 15, 13, 11, 9, 7, - 5, 3, 1, 0, 2, 4, 6, 8, - 10, 12, 14, 16, 18, 20, 22, -}; - -static encode_aux_threshmatch _vq_auxt__44c0_s4_p9_1 = { - _vq_quantthresh__44c0_s4_p9_1, - _vq_quantmap__44c0_s4_p9_1, - 23, - 23 -}; - -static static_codebook _44c0_s4_p9_1 = { - 2, 529, - _vq_lengthlist__44c0_s4_p9_1, - 1, -525303808, 1614282752, 5, 0, - _vq_quantlist__44c0_s4_p9_1, - NULL, - &_vq_auxt__44c0_s4_p9_1, - NULL, - 0 -}; - - -#endif diff --git a/lib/books/coupled/_44c0_s4_p9_2.vqh b/lib/books/coupled/_44c0_s4_p9_2.vqh deleted file mode 100644 index d8531504..00000000 --- a/lib/books/coupled/_44c0_s4_p9_2.vqh +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************** - * * - * 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 XIPHOPHORUS Company http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V__44c0_s4_p9_2_VQH_ -#define _V__44c0_s4_p9_2_VQH_ -#include "codebook.h" - -static long _vq_quantlist__44c0_s4_p9_2[] = { - 1, - 0, - 2, -}; - -static long _vq_lengthlist__44c0_s4_p9_2[] = { - 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 7, 6, - 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, - 7, 7, 7, 7, 6, 6, 7, 7, 7, 7, 7, 6, 7, 6, 6, 6, - 7, 7, 7, 7, 7, 7, 7, 6, 7, 7, 7, 7, 7, 7, 7, 6, - 6, 6, 7, 7, 6, 7, 7, 6, 6, 6, 6, 7, 7, 7, 6, 6, - 6, -}; - -static float _vq_quantthresh__44c0_s4_p9_2[] = { - -0.5, 0.5, -}; - -static long _vq_quantmap__44c0_s4_p9_2[] = { - 1, 0, 2, -}; - -static encode_aux_threshmatch _vq_auxt__44c0_s4_p9_2 = { - _vq_quantthresh__44c0_s4_p9_2, - _vq_quantmap__44c0_s4_p9_2, - 3, - 3 -}; - -static static_codebook _44c0_s4_p9_2 = { - 4, 81, - _vq_lengthlist__44c0_s4_p9_2, - 1, -535822336, 1611661312, 2, 0, - _vq_quantlist__44c0_s4_p9_2, - NULL, - &_vq_auxt__44c0_s4_p9_2, - NULL, - 0 -}; - - -#endif diff --git a/lib/books/coupled/_44c0_short.vqh b/lib/books/coupled/_44c0_short.vqh index e527f7c2..9ee5a65c 100644 --- a/lib/books/coupled/_44c0_short.vqh +++ b/lib/books/coupled/_44c0_short.vqh @@ -20,17 +20,14 @@ #include "codebook.h" static long _huff_lengthlist__44c0_short[] = { - 10,14,14,14,14, 8,10,11,14,14,11,14,13,14,14, 4, - 4, 7,10,14,10,13,14,14,14, 4, 5, 8,11,14,11,14, - 14,14,14, 6, 7, 9,11,14,10, 5, 4, 4, 7, 9,11,11, - 12,14, 8,14,14,14,14, 2, 5,10,12,14,11,14,14,14, - 14, 3, 6,10,13,14,11,14,14,14,14, 5, 9,10,12,14, - 13,14,14,14,14, 8,11,11,12,14,14, 6, 5, 5, 6,14, - 14,14,13,13, + 4,15,15,15,15, 6,11,15,15,15,14,15,15, 6, 5,10, + 12,14,15,15,15, 5, 5,10,12,15,15,15,15, 7, 6,11, + 11, 6, 4, 4, 6, 8, 9,11, 3,15,15,15,15, 2, 5,11, + 6,15,15,15,15, 3, 4,10,11,12,10,12,13, 8, 8,10, }; static static_codebook _huff_book__44c0_short = { - 2, 100, + 2, 64, _huff_lengthlist__44c0_short, 0, 0, 0, 0, 0, NULL, diff --git a/lib/books/floor/line_1024x31_0sub0.vqh b/lib/books/floor/line_1024x31_0sub0.vqh index ca15fc42..f33441f2 100644 --- a/lib/books/floor/line_1024x31_0sub0.vqh +++ b/lib/books/floor/line_1024x31_0sub0.vqh @@ -20,11 +20,12 @@ #include "codebook.h" static long _huff_lengthlist_line_1024x31_0sub0[] = { - 3, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, + 4, 5, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 5, 5, 5, + 6, 5, 5, 5, 6, 5, 6, 5, 7, 5, 7, 6, 7, 6, 7, 6, }; static static_codebook _huff_book_line_1024x31_0sub0 = { - 1, 16, + 1, 32, _huff_lengthlist_line_1024x31_0sub0, 0, 0, 0, 0, 0, NULL, diff --git a/lib/books/floor/line_1024x31_0sub1.vqh b/lib/books/floor/line_1024x31_0sub1.vqh index b6d7b73f..86f1e65f 100644 --- a/lib/books/floor/line_1024x31_0sub1.vqh +++ b/lib/books/floor/line_1024x31_0sub1.vqh @@ -21,13 +21,17 @@ static long _huff_lengthlist_line_1024x31_0sub1[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, - 6, 6, 6, 7, 8, 7, 6, 6, 8, 9, 9, 9, 9, 9, 5, 6, - 8,10,10, 9, 9,12,10,11,12,10, 8, 8,12,12,12,12, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 4, 5, 4, 5, 4, 5, 4, 6, 4, 6, 4, 6, 4, 6, 4, + 6, 5, 6, 5, 7, 5, 7, 5, 8, 6, 8, 6, 8, 6, 8, 6, + 9, 7,10, 7, 9, 7,10, 8,10, 9,12,11,12,11,11,11, + 10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, }; static static_codebook _huff_book_line_1024x31_0sub1 = { - 1, 64, + 1, 128, _huff_lengthlist_line_1024x31_0sub1, 0, 0, 0, 0, 0, NULL, diff --git a/lib/books/floor/line_1024x31_1sub0.vqh b/lib/books/floor/line_1024x31_1sub0.vqh index bebc344d..bd756d11 100644 --- a/lib/books/floor/line_1024x31_1sub0.vqh +++ b/lib/books/floor/line_1024x31_1sub0.vqh @@ -20,11 +20,12 @@ #include "codebook.h" static long _huff_lengthlist_line_1024x31_1sub0[] = { - 2, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, + 2, 4, 5, 4, 5, 4, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, + 6, 6, 6, 6, 7, 6, 7, 6, 7, 7, 8, 7, 8, 7, 8, 8, }; static static_codebook _huff_book_line_1024x31_1sub0 = { - 1, 16, + 1, 32, _huff_lengthlist_line_1024x31_1sub0, 0, 0, 0, 0, 0, NULL, diff --git a/lib/books/floor/line_1024x31_1sub1.vqh b/lib/books/floor/line_1024x31_1sub1.vqh index 3295378b..8d759793 100644 --- a/lib/books/floor/line_1024x31_1sub1.vqh +++ b/lib/books/floor/line_1024x31_1sub1.vqh @@ -21,13 +21,17 @@ static long _huff_lengthlist_line_1024x31_1sub1[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3, 3, 3, 3, 4, 3, 5, 4, 5, 4, 6, 6, 7, 7, 7, 9, - 7,10, 8,11, 8,10, 9, 9, 9,11, 8, 8, 8, 8, 8, 9, - 7, 8, 8, 9,11, 9,12,12,12,12,12,12,12,12,12,12, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 3, 4, 3, 5, 4, 5, 5, 6, 5, 6, 6, + 6, 6, 7, 6, 9, 6, 7, 7, 8, 8,10,10,10,11,11,11, + 11,11,10,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, }; static static_codebook _huff_book_line_1024x31_1sub1 = { - 1, 64, + 1, 128, _huff_lengthlist_line_1024x31_1sub1, 0, 0, 0, 0, 0, NULL, diff --git a/lib/books/floor/line_1024x31_2sub1.vqh b/lib/books/floor/line_1024x31_2sub1.vqh index 0d0eba71..4753c767 100644 --- a/lib/books/floor/line_1024x31_2sub1.vqh +++ b/lib/books/floor/line_1024x31_2sub1.vqh @@ -20,11 +20,12 @@ #include "codebook.h" static long _huff_lengthlist_line_1024x31_2sub1[] = { - 0, 3, 3, 2, 3, 3, 4, 3, 4, + 0, 4, 4, 4, 4, 3, 5, 3, 5, 3, 5, 4, 5, 4, 5, 5, + 5, 5, }; static static_codebook _huff_book_line_1024x31_2sub1 = { - 1, 9, + 1, 18, _huff_lengthlist_line_1024x31_2sub1, 0, 0, 0, 0, 0, NULL, diff --git a/lib/books/floor/line_1024x31_2sub2.vqh b/lib/books/floor/line_1024x31_2sub2.vqh index 5dfb2d43..150f2647 100644 --- a/lib/books/floor/line_1024x31_2sub2.vqh +++ b/lib/books/floor/line_1024x31_2sub2.vqh @@ -20,12 +20,14 @@ #include "codebook.h" static long _huff_lengthlist_line_1024x31_2sub2[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3, 3, 4, 4, 5, - 4, 6, 5, 6, 5, 7, 5, 7, 6, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 5, 7, 5, 8, + 5,10, 4,10, 4,10, 4,12, 4,13, 5,13, 5,13, 5,13, + 6,12, }; static static_codebook _huff_book_line_1024x31_2sub2 = { - 1, 25, + 1, 50, _huff_lengthlist_line_1024x31_2sub2, 0, 0, 0, 0, 0, NULL, diff --git a/lib/books/floor/line_1024x31_2sub3.vqh b/lib/books/floor/line_1024x31_2sub3.vqh index 7aefb1d9..a1f86f88 100644 --- a/lib/books/floor/line_1024x31_2sub3.vqh +++ b/lib/books/floor/line_1024x31_2sub3.vqh @@ -21,13 +21,17 @@ static long _huff_lengthlist_line_1024x31_2sub3[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 5, 2, 7, 4, 7, - 4, 9, 4, 9, 5, 8, 6, 6, 6, 9, 6, 6, 6, 6, 7, 9, - 8, 9, 7, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 9, 4, 9, 3, 9, 4, 9, 5, 8, 5, 8, 4, 8, + 6, 8, 5, 8, 5, 8, 6, 8, 5, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, }; static static_codebook _huff_book_line_1024x31_2sub3 = { - 1, 64, + 1, 128, _huff_lengthlist_line_1024x31_2sub3, 0, 0, 0, 0, 0, NULL, diff --git a/lib/books/floor/line_1024x31_3sub1.vqh b/lib/books/floor/line_1024x31_3sub1.vqh index 304002a4..ef7db9d5 100644 --- a/lib/books/floor/line_1024x31_3sub1.vqh +++ b/lib/books/floor/line_1024x31_3sub1.vqh @@ -20,11 +20,12 @@ #include "codebook.h" static long _huff_lengthlist_line_1024x31_3sub1[] = { - 0, 3, 3, 2, 3, 3, 4, 3, 4, + 0, 3, 3, 4, 4, 4, 4, 4, 5, 4, 5, 4, 5, 4, 5, 4, + 5, 5, }; static static_codebook _huff_book_line_1024x31_3sub1 = { - 1, 9, + 1, 18, _huff_lengthlist_line_1024x31_3sub1, 0, 0, 0, 0, 0, NULL, diff --git a/lib/books/floor/line_1024x31_3sub2.vqh b/lib/books/floor/line_1024x31_3sub2.vqh index d354dc19..ef9ad63f 100644 --- a/lib/books/floor/line_1024x31_3sub2.vqh +++ b/lib/books/floor/line_1024x31_3sub2.vqh @@ -20,12 +20,14 @@ #include "codebook.h" static long _huff_lengthlist_line_1024x31_3sub2[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 2, 5, 3, 7, 3, - 7, 4, 8, 5, 8, 6, 8, 6, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 4, 3, 4, 4, 5, 4, 6, 4, 6, 5, 7, 5, + 7, 5, 7, 6, 9, 6, 8, 6,10, 6, 8, 6,10, 6, 9, 6, + 9, 7, }; static static_codebook _huff_book_line_1024x31_3sub2 = { - 1, 25, + 1, 50, _huff_lengthlist_line_1024x31_3sub2, 0, 0, 0, 0, 0, NULL, diff --git a/lib/books/floor/line_1024x31_3sub3.vqh b/lib/books/floor/line_1024x31_3sub3.vqh index 1f911384..31919a1b 100644 --- a/lib/books/floor/line_1024x31_3sub3.vqh +++ b/lib/books/floor/line_1024x31_3sub3.vqh @@ -21,13 +21,17 @@ static long _huff_lengthlist_line_1024x31_3sub3[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3, 4, 5, 6, 5, - 4, 6, 5, 6, 6, 8, 5, 8, 5, 8, 5, 8, 7, 8, 5, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 6, 3, 7, 3, 6, 3, 7, 3, 7, 4, 8, 4, 8, 5, + 6, 6, 7, 8, 8, 8, 8, 8, 8, 8, 7, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, }; static static_codebook _huff_book_line_1024x31_3sub3 = { - 1, 64, + 1, 128, _huff_lengthlist_line_1024x31_3sub3, 0, 0, 0, 0, 0, NULL, diff --git a/lib/books/floor/line_1024x31_class0.vqh b/lib/books/floor/line_1024x31_class0.vqh index 774a165e..bc8cb7d8 100644 --- a/lib/books/floor/line_1024x31_class0.vqh +++ b/lib/books/floor/line_1024x31_class0.vqh @@ -20,7 +20,7 @@ #include "codebook.h" static long _huff_lengthlist_line_1024x31_class0[] = { - 1, 3, 4, 3, 3, 5, 6, 6, + 1, 3, 4, 5, 2, 6, 7, 7, }; static static_codebook _huff_book_line_1024x31_class0 = { diff --git a/lib/books/floor/line_1024x31_class1.vqh b/lib/books/floor/line_1024x31_class1.vqh index 6f120eed..84243c97 100644 --- a/lib/books/floor/line_1024x31_class1.vqh +++ b/lib/books/floor/line_1024x31_class1.vqh @@ -20,7 +20,7 @@ #include "codebook.h" static long _huff_lengthlist_line_1024x31_class1[] = { - 1, 3, 4, 7, 7, 8, 7,11, 3, 4, 4, 5,10,11,10,10, + 1, 3, 3, 4, 7, 9,11,11, 3, 5, 7, 7,10, 9,10,10, }; static static_codebook _huff_book_line_1024x31_class1 = { diff --git a/lib/books/floor/line_1024x31_class2.vqh b/lib/books/floor/line_1024x31_class2.vqh index f577f2e4..76cb7aec 100644 --- a/lib/books/floor/line_1024x31_class2.vqh +++ b/lib/books/floor/line_1024x31_class2.vqh @@ -20,10 +20,10 @@ #include "codebook.h" static long _huff_lengthlist_line_1024x31_class2[] = { - 2, 3, 4,10, 6, 4, 5,10, 8, 6, 6,11,14,12,15,11, - 5, 3, 5, 9, 6, 4, 6, 9, 8, 5, 7,13,16,16,13,16, - 8, 6, 6, 9, 9, 6, 6, 9,10, 7, 8,11,16,15,15,15, - 15,15,15,15,14,14,15,15,15,13,13,15,15,15,15,15, + 1, 3, 5,10, 8, 4, 6, 9,12, 8,10,14,15,15,15,15, + 7, 3, 5,10, 8, 4, 7,10,12, 9,10,13,15,15,15,15, + 12, 9, 9,14,11, 9, 9,14,15,12,12,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, }; static static_codebook _huff_book_line_1024x31_class2 = { diff --git a/lib/books/floor/line_1024x31_class3.vqh b/lib/books/floor/line_1024x31_class3.vqh index ff6da706..52d01611 100644 --- a/lib/books/floor/line_1024x31_class3.vqh +++ b/lib/books/floor/line_1024x31_class3.vqh @@ -20,10 +20,10 @@ #include "codebook.h" static long _huff_lengthlist_line_1024x31_class3[] = { - 1, 4, 3,10, 7, 4, 5,11,10, 7,10,10,12,12,11,12, - 7, 4, 5,10, 7, 5, 6,12,11, 8,11,14,14,14,14,14, - 11, 8, 6, 9,11, 9, 8,11,12,10,12,14,14,14,14,14, - 14,10,10,10,14,13,12,13,14,12,14,13,14,14,14,14, + 1, 3, 6,10, 7, 3, 6,12,10, 7,10,15,15,15,15,15, + 7, 4, 6, 8, 8, 4, 6,10,13, 7, 9,13,15,14,14,14, + 13,10, 9, 9,12, 8, 8,11,14,10,11,12,14,14,14,14, + 14,14,14,12,14,14,14,14,14,14,14,14,14,14,14,14, }; static static_codebook _huff_book_line_1024x31_class3 = { diff --git a/lib/books/floor/line_128x7_0sub0.vqh b/lib/books/floor/line_128x7_0sub0.vqh index 9c5f98b5..d6ae2c9b 100644 --- a/lib/books/floor/line_128x7_0sub0.vqh +++ b/lib/books/floor/line_128x7_0sub0.vqh @@ -20,10 +20,10 @@ #include "codebook.h" static long _huff_lengthlist_line_128x7_0sub0[] = { - 5, 5, 5, 6, 4, 6, 4, 7, 4, 7, 4, 8, 4, 9, 4,11, - 4,12, 4,13, 5,13, 5,13, 5,13, 5,13, 5,13, 5,13, - 5,13, 6,13, 6,13, 6,13, 5,13, 6,13, 6,12, 7,12, - 7,12, 9,11, 9,11,11,12,12,13,13,13,13,13,13,13, + 4, 4, 4, 4, 5, 4, 4, 4, 5, 5, 5, 4, 5, 5, 5, 5, + 5, 5, 6, 5, 6, 6, 6, 7, 6, 8, 6, 9, 7,10, 7,10, + 7,13, 7,13, 8,13, 9,13, 9,13, 9,12,11,13,11,13, + 12,13,12,12,12,12,12,12,12,12,12,12,12,12,12,12, }; static static_codebook _huff_book_line_128x7_0sub0 = { diff --git a/lib/books/floor/line_128x7_1sub1.vqh b/lib/books/floor/line_128x7_1sub1.vqh index fc63d2fe..d388f564 100644 --- a/lib/books/floor/line_128x7_1sub1.vqh +++ b/lib/books/floor/line_128x7_1sub1.vqh @@ -20,7 +20,7 @@ #include "codebook.h" static long _huff_lengthlist_line_128x7_1sub1[] = { - 0, 4, 2, 5, 2, 5, 3, 3, 3, + 0, 3, 4, 3, 4, 2, 4, 2, 4, }; static static_codebook _huff_book_line_128x7_1sub1 = { diff --git a/lib/books/floor/line_128x7_1sub2.vqh b/lib/books/floor/line_128x7_1sub2.vqh index e3d56c4a..7210e3f6 100644 --- a/lib/books/floor/line_128x7_1sub2.vqh +++ b/lib/books/floor/line_128x7_1sub2.vqh @@ -20,8 +20,8 @@ #include "codebook.h" static long _huff_lengthlist_line_128x7_1sub2[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 6, 2, 9, 3,11, - 5,12, 7,12, 9,12, 9,12,11, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3, 3, 3, 4, 5, + 4, 6, 5, 7, 6, 9, 6, 9, 8, }; static static_codebook _huff_book_line_128x7_1sub2 = { diff --git a/lib/books/floor/line_128x7_1sub3.vqh b/lib/books/floor/line_128x7_1sub3.vqh index 5c8a9379..ad602002 100644 --- a/lib/books/floor/line_128x7_1sub3.vqh +++ b/lib/books/floor/line_128x7_1sub3.vqh @@ -21,9 +21,9 @@ static long _huff_lengthlist_line_128x7_1sub3[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 6, 5, 6, 6, 6, - 4, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 4, 6, 4, 6, 5, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, }; static static_codebook _huff_book_line_128x7_1sub3 = { diff --git a/lib/books/floor/line_128x7_2sub1.vqh b/lib/books/floor/line_128x7_2sub1.vqh index c0395a85..6be0ce85 100644 --- a/lib/books/floor/line_128x7_2sub1.vqh +++ b/lib/books/floor/line_128x7_2sub1.vqh @@ -20,7 +20,7 @@ #include "codebook.h" static long _huff_lengthlist_line_128x7_2sub1[] = { - 0, 3, 3, 2, 4, 2, 5, 3, 5, + 0, 3, 3, 3, 3, 3, 3, 3, 3, }; static static_codebook _huff_book_line_128x7_2sub1 = { diff --git a/lib/books/floor/line_128x7_2sub2.vqh b/lib/books/floor/line_128x7_2sub2.vqh index 345edb0c..fad7a643 100644 --- a/lib/books/floor/line_128x7_2sub2.vqh +++ b/lib/books/floor/line_128x7_2sub2.vqh @@ -20,8 +20,8 @@ #include "codebook.h" static long _huff_lengthlist_line_128x7_2sub2[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 2, 6, 3, 7, 3, - 8, 4, 9, 4,11, 5,10, 5,11, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 4, 3, 4, 4, + 5, 4, 5, 4, 6, 4, 7, 5, 7, }; static static_codebook _huff_book_line_128x7_2sub2 = { diff --git a/lib/books/floor/line_128x7_2sub3.vqh b/lib/books/floor/line_128x7_2sub3.vqh index d5feb59a..5787f190 100644 --- a/lib/books/floor/line_128x7_2sub3.vqh +++ b/lib/books/floor/line_128x7_2sub3.vqh @@ -21,9 +21,9 @@ static long _huff_lengthlist_line_128x7_2sub3[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 9, 2, 9, 3, 9, 5, - 9, 6, 8, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 2, 4, 3, 6, 5, + 6, 4, 6, 5, 8, 6, 8, 8, 9, 9, 9, 9, 8, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, }; static static_codebook _huff_book_line_128x7_2sub3 = { diff --git a/lib/books/floor/line_128x7_class1.vqh b/lib/books/floor/line_128x7_class1.vqh index 5feb4284..aaaa764c 100644 --- a/lib/books/floor/line_128x7_class1.vqh +++ b/lib/books/floor/line_128x7_class1.vqh @@ -20,10 +20,10 @@ #include "codebook.h" static long _huff_lengthlist_line_128x7_class1[] = { - 1, 3,10,13,13, 5, 6,13,12, 6, 6,13,13,13,13,13, - 6, 4,10,13,12, 7,12,13,13,12,13,13,13,13,13,13, - 4, 3,12,13, 9, 7,10,13,12, 8,11,13,13,13,13,13, - 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 2, 3, 4,14,11, 9,11,14,13,10,12,13,13,13,13,13, + 5, 2, 4,13,11, 8,13,13,12, 9,12,13,13,13,13,13, + 7, 3, 4,13,10, 8,10,13,12,10,12,13,13,13,13,13, + 13,12,11,13,13,13,13,13,13,13,13,13,13,13,13,13, }; static static_codebook _huff_book_line_128x7_class1 = { diff --git a/lib/books/floor/line_128x7_class2.vqh b/lib/books/floor/line_128x7_class2.vqh index 85018d24..3fffe472 100644 --- a/lib/books/floor/line_128x7_class2.vqh +++ b/lib/books/floor/line_128x7_class2.vqh @@ -20,10 +20,10 @@ #include "codebook.h" static long _huff_lengthlist_line_128x7_class2[] = { - 5, 4, 4,10, 7, 4, 5,13,13, 8, 8,13,13,13,13,13, - 6, 3, 3, 7, 7, 4, 4, 9,11, 8, 8,13,13,13,13,13, - 9, 5, 3, 5, 8, 5, 4, 7,10, 7, 7,11,13,13,13,13, - 13,13,12,13,13,12,13,13,13,13,12,12,12,12,12,12, + 9, 7, 8,10, 7, 5, 6, 9, 9, 7, 8, 9,13,13,13,12, + 7, 5, 6, 8, 5, 2, 3, 6, 7, 4, 5, 8,13,10,10,13, + 11, 7, 6, 9, 7, 4, 3, 6, 8, 5, 5, 8,11, 8, 8,13, + 13,10,12,13,11, 9,11,13,10, 9,11,13,13,13,12,12, }; static static_codebook _huff_book_line_128x7_class2 = { diff --git a/lib/codec_internal.h b/lib/codec_internal.h index 71b297cd..e0de8c7e 100644 --- a/lib/codec_internal.h +++ b/lib/codec_internal.h @@ -10,7 +10,7 @@ ******************************************************************** function: libvorbis codec headers - last mod: $Id: codec_internal.h,v 1.9.4.7 2001/12/04 11:16:19 xiphmont Exp $ + last mod: $Id: codec_internal.h,v 1.9.4.8 2001/12/11 08:19:39 xiphmont Exp $ ********************************************************************/ @@ -20,9 +20,15 @@ #include "envelope.h" #include "codebook.h" +#define BLOCKTYPE_IMPULSE 0 +#define BLOCKTYPE_PADDING 1 +#define BLOCKTYPE_TRANSITION 0 +#define BLOCKTYPE_LONG 1 + typedef struct vorbis_block_internal{ float **pcmdelay; /* this is a pointer into local storage */ float ampmax; + int blocktype; ogg_uint32_t *packet_markers; } vorbis_block_internal; diff --git a/lib/envelope.c b/lib/envelope.c index 0c666f89..21f612a5 100644 --- a/lib/envelope.c +++ b/lib/envelope.c @@ -11,7 +11,7 @@ ******************************************************************** function: PCM data envelope analysis and manipulation - last mod: $Id: envelope.c,v 1.38.2.1 2001/12/05 08:03:17 xiphmont Exp $ + last mod: $Id: envelope.c,v 1.38.2.2 2001/12/11 08:19:39 xiphmont Exp $ Preecho calculation. @@ -84,9 +84,8 @@ void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi){ codec_setup_info *ci=vi->codec_setup; vorbis_info_psy_global *gi=&ci->psy_g_param; int ch=vi->channels; - int window=gi->envelopesa; + int window=e->winlength=ci->blocksizes[0]/2; /* not random */ int i; - e->winlength=window; e->minenergy=fromdB(gi->preecho_minenergy); e->iir=_ogg_calloc(ch*4,sizeof(*e->iir)); e->filtered=_ogg_calloc(ch*4,sizeof(*e->filtered)); @@ -148,7 +147,7 @@ static float _ve_deltai(envelope_lookup *ve,float *pre,float *post){ return(B-A); } -long _ve_envelope_search(vorbis_dsp_state *v,long searchpoint){ +long _ve_envelope_search(vorbis_dsp_state *v){ vorbis_info *vi=v->vi; codec_setup_info *ci=vi->codec_setup; vorbis_info_psy_global *gi=&ci->psy_g_param; @@ -192,45 +191,96 @@ long _ve_envelope_search(vorbis_dsp_state *v,long searchpoint){ ve->current=v->pcm_current; - /* Now search through our cached highpass data for breaking points */ - /* starting point */ - if(v->W) - j=v->centerW+ci->blocksizes[1]/4-ci->blocksizes[0]/4; - else - j=v->centerW; - - if(j<ve->lastmark)j=ve->lastmark; - - while(j+ve->winlength<=v->pcm_current){ - if(j>=searchpoint)return(1); - - ve->lastmark=j; - for(i=0;i<ve->ch;i++){ - for(k=0;k<4;k++){ - float *filtered=ve->filtered[i*4+k]+j; - float m=_ve_deltai(ve,filtered-ve->winlength,filtered); + { + int flag=-1; + long centerW=v->centerW; + long beginW=centerW-ci->blocksizes[v->W]/4; + //long endW=centerW+ci->blocksizes[v->W]/4+ci->blocksizes[0]/4; + long testW=centerW+ci->blocksizes[v->W]/4+ci->blocksizes[1]/2+ci->blocksizes[0]/4; + if(v->W) + beginW-=ci->blocksizes[v->lW]/4; + else + beginW-=ci->blocksizes[0]/4; + + if(ve->mark>=centerW && ve->mark<testW)return(0); + if(ve->mark>=testW)return(1); + + if(v->W) + j=ve->cursor; + else + j=centerW-ci->blocksizes[0]/4; + + while(j+ve->winlength*3/2<=v->pcm_current){ + if(j>=testW)return(1); + ve->cursor=j; + + for(i=0;i<ve->ch;i++){ + for(k=0;k<4;k++){ + float *filtered=ve->filtered[i*4+k]+j; + float *filtered2=ve->filtered[i*4+k]+j+ve->winlength/2; + float m=_ve_deltai(ve,filtered-ve->winlength,filtered); + float mm=_ve_deltai(ve,filtered2-ve->winlength,filtered2); + + if(m>gi->preecho_thresh[k] || m<gi->postecho_thresh[k]){ + if(j<=centerW){ + ve->prevmark=ve->mark=j; + }else{ + /* if a quarter-short-block advance is an even stronger + reading, set *that* as the impulse point. */ + if((m>0. && mm>m) || (m<0. && mm<m)) + flag=j+ve->winlength/2; + else + if(flag<0)flag=j; + } + } + } + } - if(m>gi->preecho_thresh[k])return(0); - if(m<gi->postecho_thresh[k])return(0); - + if(flag>=0){ + ve->prevmark=ve->mark; + ve->mark=flag; + if(flag>=testW)return(1); + return(0); } + + j+=ve->winlength/2; } - - j+=min(ci->blocksizes[0],ve->winlength)/2; - } - if(j>=searchpoint)return(1); return(-1); } +int _ve_envelope_mark(vorbis_dsp_state *v){ + envelope_lookup *ve=((backend_lookup_state *)(v->backend_state))->ve; + vorbis_info *vi=v->vi; + codec_setup_info *ci=vi->codec_setup; + long centerW=v->centerW; + long beginW=centerW-ci->blocksizes[v->W]/4; + long endW=centerW+ci->blocksizes[v->W]/4; + if(v->W){ + beginW-=ci->blocksizes[v->lW]/4; + endW+=ci->blocksizes[v->nW]/4; + }else{ + beginW-=ci->blocksizes[0]/4; + endW+=ci->blocksizes[0]/4; + } + + if(ve->prevmark>=beginW && ve->prevmark<endW)return(1); + if(ve->mark>=beginW && ve->mark<endW)return(1); + return(0); +} + void _ve_envelope_shift(envelope_lookup *e,long shift){ int i; for(i=0;i<e->ch*4;i++) memmove(e->filtered[i],e->filtered[i]+shift,(e->current-shift)* sizeof(*e->filtered[i])); e->current-=shift; - e->lastmark-=shift; + if(e->prevmark>=0) + e->prevmark-=shift; + if(e->mark>=0) + e->mark-=shift; + e->cursor-=shift; } diff --git a/lib/envelope.h b/lib/envelope.h new file mode 100644 index 00000000..28678732 --- /dev/null +++ b/lib/envelope.h @@ -0,0 +1,48 @@ +/******************************************************************** + * * + * 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 XIPHOPHORUS Company http://www.xiph.org/ * + + ******************************************************************** + + function: PCM data envelope analysis and manipulation + last mod: $Id: envelope.h,v 1.16.10.1 2001/12/11 08:19:39 xiphmont Exp $ + + ********************************************************************/ + +#ifndef _V_ENVELOPE_ +#define _V_ENVELOPE_ + +#include "iir.h" +#include "smallft.h" + +typedef struct { + int ch; + int winlength; + int searchstep; + float minenergy; + + IIR_state *iir; + float **filtered; + + long storage; + long current; + long mark; + long prevmark; + long cursor; +} envelope_lookup; + +extern void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi); +extern void _ve_envelope_clear(envelope_lookup *e); +extern long _ve_envelope_search(vorbis_dsp_state *v); +extern void _ve_envelope_shift(envelope_lookup *e,long shift); +extern int _ve_envelope_mark(vorbis_dsp_state *v); + + +#endif + diff --git a/lib/mapping0.c b/lib/mapping0.c index 15298460..da605392 100644 --- a/lib/mapping0.c +++ b/lib/mapping0.c @@ -11,7 +11,7 @@ ******************************************************************** function: channel mapping 0 implementation - last mod: $Id: mapping0.c,v 1.37.2.12 2001/12/07 08:38:26 xiphmont Exp $ + last mod: $Id: mapping0.c,v 1.37.2.13 2001/12/11 08:19:39 xiphmont Exp $ ********************************************************************/ @@ -302,7 +302,7 @@ static int mapping0_forward(vorbis_block *vb,vorbis_look_mapping *l){ float global_ampmax=vbi->ampmax; float *local_ampmax=alloca(sizeof(*local_ampmax)*vi->channels); - int blocktype; + int blocktype=vbi->blocktype; /* we differentiate between short and long block types to help the masking engine; the window shapes also matter. @@ -315,15 +315,17 @@ static int mapping0_forward(vorbis_block *vb,vorbis_look_mapping *l){ long block (run of the mill long block) */ - if(vb->W){ - if(!vb->lW || !vb->nW) - blocktype=BLOCKTYPE_TRANSITION; + if(seq%10==0)fprintf(stderr,"%d",seq); + if(!vb->W){ + if(blocktype==BLOCKTYPE_IMPULSE) + fprintf(stderr,"|"); else - blocktype=BLOCKTYPE_LONG; + fprintf(stderr,"."); }else{ - /* right now we're missing the infrastructure to distingush the - two short types */ - blocktype=BLOCKTYPE_IMPULSE; + if(blocktype==BLOCKTYPE_TRANSITION) + fprintf(stderr,"-"); + else + fprintf(stderr,"_"); } for(i=0;i<vi->channels;i++){ @@ -340,10 +342,14 @@ static int mapping0_forward(vorbis_block *vb,vorbis_look_mapping *l){ float *logmax =work; float *logmask =work+n/2;*/ + _analysis_output("pcm",seq+i,pcm,n,0,0); + /* window the PCM data */ for(j=0;j<n;j++) fft[j]=pcm[j]*=window[j]; + _analysis_output("windowed",seq+i,pcm,n,0,0); + /* transform the PCM data */ /* only MDCT right now.... */ mdct_forward(b->transform[vb->W][0],pcm,pcm); diff --git a/lib/modes/floor_44.h b/lib/modes/floor_44.h index b26ea7e9..d2d4e4b1 100644 --- a/lib/modes/floor_44.h +++ b/lib/modes/floor_44.h @@ -11,7 +11,7 @@ ******************************************************************** function: key floor settings for 44.1/48kHz - last mod: $Id: floor_44.h,v 1.1.2.3 2001/12/07 08:36:59 xiphmont Exp $ + last mod: $Id: floor_44.h,v 1.1.2.4 2001/12/11 08:19:47 xiphmont Exp $ ********************************************************************/ @@ -122,7 +122,7 @@ static vorbis_info_floor1 _floor_44_128[2]={ { 6,{0,1,1,1,2,2},{4,3,3},{0,2,2},{-1,0,1}, {{2},{-1,3,4,5},{-1,6,7,8}}, - 4,{0,128, 6,17,30,58, 2,1,4, 11,8,14, 23,20,26, 41,35,48, 84,69,103}, + 2,{0,128, 6,17,30,58, 2,1,4, 11,8,14, 23,20,26, 41,35,48, 84,69,103}, 60,30,500, 999,999,1,18., @@ -135,7 +135,7 @@ static vorbis_info_floor1 _floor_44_1024[1]={ { 10,{0,1,2,2,2,2,2, 3,3,3},{3,4,3,3},{1,1,2,2},{0,1,2,3}, {{4,5},{6,7},{-1,8,9,10},{-1,11,12,13}}, - 4,{0,1024, 88,31,243, 14,54,143,460, 6,3,10, 22,18,26, 41,36,47, + 2,{0,1024, 88,31,243, 14,54,143,460, 6,3,10, 22,18,26, 41,36,47, 69,61,78, 112,99,126, 185,162,211, 329,282,387, 672,553,825}, 60,30,400, diff --git a/lib/modes/psych_44.h b/lib/modes/psych_44.h index 6473b2c7..60f62a8b 100644 --- a/lib/modes/psych_44.h +++ b/lib/modes/psych_44.h @@ -11,28 +11,35 @@ ******************************************************************** function: key psychoacoustic settings for 44.1/48kHz - last mod: $Id: psych_44.h,v 1.1.2.2 2001/12/05 08:03:20 xiphmont Exp $ + last mod: $Id: psych_44.h,v 1.1.2.3 2001/12/11 08:19:47 xiphmont Exp $ ********************************************************************/ /* preecho trigger settings *****************************************/ -static vorbis_info_psy_global _psy_global_44[2]={ +static vorbis_info_psy_global _psy_global_44[3]={ {8, /* lines per eighth octave */ - 256, {26.f,26.f,26.f,30.f}, {-90.f,-90.f,-90.f,-90.f}, -90.f, + //{990.f,990.f,990.f,990.f}, {-990.f,-990.f,-990.f,-990.f}, -90.f, + //{0.f,0.f,0.f,0.f}, {-0.f,-0.f,-0.f,-0.f}, -90.f, + {30.f,30.f,30.f,34.f}, {-990.f,-990.f,-990.f,-990.f}, -90.f, -6.f, 0, }, {8, /* lines per eighth octave */ - 256, {26.f,26.f,26.f,30.f}, {-26.f,-26.f,-26.f,-30.f}, -90.f, + // {990.f,990.f,990.f,990.f}, {-990.f,-990.f,-990.f,-990.f}, -90.f, + {26.f,26.f,26.f,30.f}, {-90.f,-90.f,-90.f,-90.f}, -90.f, + -6.f, 0, + }, + {8, /* lines per eighth octave */ + {26.f,26.f,26.f,30.f}, {-26.f,-26.f,-26.f,-30.f}, -90.f, -6.f, 0, } }; /* noise compander lookups * low, mid, high quality ****************/ -static float _psy_compand_44[3][NOISE_COMPAND_LEVELS]={ +static float _psy_compand_44_short[3][NOISE_COMPAND_LEVELS]={ /* sub-mode Z */ { 0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, /* 7dB */ @@ -43,8 +50,8 @@ static float _psy_compand_44[3][NOISE_COMPAND_LEVELS]={ }, /* mode_Z nominal */ { - 0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, /* 7dB */ - 8.f, 9.f, 9.f,10.f,10.f,10.f,11.f, 11.f, /* 15dB */ + 0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 6.f, /* 7dB */ + 7.f, 7.f, 8.f, 8.f, 9.f, 9.f,10.f, 11.f, /* 15dB */ 12.f,12.f,13.f,13.f,14.f,14.f,15.f, 15.f, /* 23dB */ 16.f,16.f,17.f,17.f,17.f,18.f,18.f, 19.f, /* 31dB */ 19.f,19.f,20.f,21.f,22.f,23.f,24.f, 25.f, /* 39dB */ @@ -59,6 +66,33 @@ static float _psy_compand_44[3][NOISE_COMPAND_LEVELS]={ } }; +static float _psy_compand_44[3][NOISE_COMPAND_LEVELS]={ + /* sub-mode Z */ + { + 0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, /* 7dB */ + 8.f, 9.f,10.f,11.f,12.f,13.f,14.f, 15.f, /* 15dB */ + 16.f,17.f,18.f,19.f,20.f,21.f,22.f, 23.f, /* 23dB */ + 24.f,25.f,26.f,27.f,28.f,29.f,30.f, 31.f, /* 31dB */ + 32.f,33.f,34.f,35.f,36.f,37.f,38.f, 39.f, /* 39dB */ + }, + /* mode_Z nominal */ + { + 0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, /* 7dB */ + 8.f, 9.f,10.f,11.f,12.f,12.f,13.f, 13.f, /* 15dB */ + 13.f,14.f,14.f,14.f,15.f,15.f,15.f, 15.f, /* 23dB */ + 16.f,16.f,17.f,17.f,17.f,18.f,18.f, 19.f, /* 31dB */ + 19.f,19.f,20.f,21.f,22.f,23.f,24.f, 25.f, /* 39dB */ + }, + /* mode A */ + { + 0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, /* 7dB */ + 8.f, 8.f, 7.f, 6.f, 5.f, 4.f, 4.f, 4.f, /* 15dB */ + 4.f, 4.f, 5.f, 5.f, 5.f, 6.f, 6.f, 6.f, /* 23dB */ + 7.f, 7.f, 7.f, 8.f, 8.f, 8.f, 9.f, 10.f, /* 31dB */ + 11.f,12.f,13.f,14.f,15.f,16.f,17.f, 18.f, /* 39dB */ + } +}; + /* tonal masking curve level adjustments *************************/ static vp_adjblock _vp_tonemask_adj_longblock[6]={ /* adjust for mode zero */ @@ -456,8 +490,8 @@ static vp_adjblock _vp_peakguard[6]={ static int _psy_noisebias_long[11][17]={ /*63 125 250 500 1k 2k 4k 8k 16k*/ - {-20,-20,-16,-16,-16,-16,-14, -8, -4, 0, 2, 2, 3, 3, 3, 3, 10}, - {-20,-20,-20,-20,-20,-20,-20,-10, -6, -2, 1, 2, 3, 3, 3, 3, 10}, + {-20,-20,-18,-18,-18,-16,-14, -8, -6, -2, 0, 2, 3, 3, 4, 4, 10}, + {-20,-20,-20,-20,-20,-20,-20,-10, -6, -2, 0, 2, 3, 3, 3, 3, 8}, {-20,-20,-20,-20,-20,-20,-20,-10, -6, -2, 0, 0, 0, 1, 2, 3, 8}, {-20,-20,-20,-20,-20,-20,-20,-10, -6, -2, -1, -1, 0, 0, 2, 3, 6}, {-20,-20,-20,-20,-20,-20,-20,-10, -6, -2, -3, -3, 0, 0, 1, 1, 4}, @@ -469,10 +503,25 @@ static int _psy_noisebias_long[11][17]={ {-50,-50,-50,-50,-50,-50,-50,-48,-44,-40,-40,-40,-40,-40,-40,-40,-40}, }; +static int _psy_noisebias_impulse[11][17]={ + /*63 125 250 500 1k 2k 4k 8k 16k*/ + {-20,-20,-20,-20,-20,-18,-14,-10,-10, -2, 0, 0, 0, 0, 0, 3, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -2, 1, 2, 3, 3, 3, 3, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -2, 0, 0, 0, 1, 2, 3, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -2, -1, -1, 0, 0, 2, 3, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -2, -3, -3, 0, 0, 1, 1, 4}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -3, 0, 0, 1, 2}, + {-34,-34,-34,-34,-30,-26,-24,-18,-14, -8, -8, -6, -3, -2, -2, 0, 1}, + {-34,-34,-34,-34,-30,-26,-24,-18,-14, -8, -8, -6, -3, -2, -2, -1, 0}, + {-34,-34,-34,-34,-30,-26,-24,-18,-14, -8, -8, -8, -4, -3, -3, -2, -2}, + {-34,-34,-34,-34,-30,-26,-24,-18,-14,-10,-10,-10, -8, -7, -7, -6, -6}, + {-50,-50,-50,-50,-50,-50,-50,-48,-44,-40,-40,-40,-40,-40,-40,-40,-40}, +}; + static int _psy_noisebias_other[11][17]={ /*63 125 250 500 1k 2k 4k 8k 16k*/ - {-26,-26,-26,-26,-26,-22,-20,-14,-10, 0, 2, 2, 3, 3, 3, 3, 10}, - {-30,-30,-30,-30,-26,-22,-20,-14,-10, -2, 1, 2, 3, 3, 3, 3, 10}, + {-20,-20,-20,-20,-20,-18,-14,-10, -6, -2, 2, 2, 3, 3, 4, 4, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -2, 1, 2, 3, 3, 3, 3, 8}, {-30,-30,-30,-30,-26,-22,-20,-14,-10, -2, 0, 0, 0, 1, 2, 3, 8}, {-30,-30,-30,-30,-26,-22,-20,-14,-10, -2, -1, -1, 0, 0, 2, 3, 6}, {-30,-30,-30,-30,-26,-22,-20,-14,-10, -2, -3, -3, 0, 0, 1, 1, 4}, @@ -484,13 +533,40 @@ static int _psy_noisebias_other[11][17]={ {-50,-50,-50,-50,-50,-50,-50,-48,-44,-40,-40,-40,-40,-40,-40,-40,-40}, }; +static int _psy_noiseguards_short[33]={ + 2,2,-1, + 2,2,-1, + 2,2,15, + 2,2,15, + 2,2,15, + 2,2,15, + 2,2,15, + 2,2,15, + 2,2,15, + 2,2,15, + 2,2,15, +}; +static int _psy_noiseguards_long[33]={ + 10,10,100, + 10,10,100, + 6,6,100, + 4,4,100, + 4,4,100, + 4,4,100, + 4,4,100, + 4,4,100, + 4,4,100, + 4,4,100, + 4,4,100, +}; + static vorbis_info_psy _psy_settings[11]={ /* zero */ { /* ATH style ,float,min */ {-1},-100.,-110., /* tonemask att,guard,suppr,curves peakattp,curvelimitp,peaksettings*/ - 3.f, -18.f,-10.f, {{{0.}}}, 1, 0, {{{0.}}}, + 0.f, -18.f,-10.f, {{{0.}}}, 1, 0, {{{0.}}}, /*noisemaskp,supp, low/high window, low/hi guard, minimum */ 1, -0.f, .5f, .5f, 0,0,0, diff --git a/lib/modes/residue_44.h b/lib/modes/residue_44.h index 1b507335..904ae50d 100644 --- a/lib/modes/residue_44.h +++ b/lib/modes/residue_44.h @@ -11,7 +11,7 @@ ******************************************************************** function: toplevel residue templates for 32/44.1/48kHz - last mod: $Id: residue_44.h,v 1.1.2.5 2001/12/07 08:36:59 xiphmont Exp $ + last mod: $Id: residue_44.h,v 1.1.2.6 2001/12/11 08:19:47 xiphmont Exp $ ********************************************************************/ @@ -48,13 +48,13 @@ static bitrate_manager_info _bm_44_default={ 0 4 4 4 3 4 4 4 3 7 */ static vorbis_info_residue0 _residue_44_low={ - 0,-1, -1, 10,-1, + 0,-1, -1, 8,-1, {0}, {-1}, - {9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999}, - { .5, 1.5, 2.5, 4.5, 26.5, 1.5, 2.5, 4.5, 26.5}, + {9999, 9999, 9999, 9999, 9999, 9999, 9999}, + { .5, 1.5, 2.5, 4.5, 26.5, 1.5, 4.5}, {0}, - { 99, -1, -1, -1, -1, 99, 99, 99, 99} + { 99, -1, -1, -1, -1, 99, 99} }; /* 0 1 2 4 1 2 4 16 42 + @@ -107,28 +107,25 @@ static vorbis_info_residue0 _residue_44_high={ #include "books/coupled/_44c0_s0_p4_0.vqh" #include "books/coupled/_44c0_s0_p4_1.vqh" #include "books/coupled/_44c0_s1_p5_0.vqh" -#include "books/coupled/_44c0_s1_p6_0.vqh" -#include "books/coupled/_44c0_s2_p7_0.vqh" -#include "books/coupled/_44c0_s4_p8_0.vqh" -#include "books/coupled/_44c0_s4_p8_1.vqh" -#include "books/coupled/_44c0_s4_p9_0.vqh" -#include "books/coupled/_44c0_s4_p9_1.vqh" -#include "books/coupled/_44c0_s4_p9_2.vqh" +#include "books/coupled/_44c0_s2_p6_0.vqh" +#include "books/coupled/_44c0_s4_p7_0.vqh" +#include "books/coupled/_44c0_s4_p7_1.vqh" +#include "books/coupled/_44c0_s4_p7_2.vqh" /* residue backfill is entered in the template array as if stereo backfill is not in use. It's up to vorbisenc to make the appropriate index adjustment */ static vorbis_residue_template _residue_template_44_stereo[11]={ /* mode 0; 64-ish */ - {&_residue_44_low, {&_huff_book__44c0_short,&_huff_book__44c0_long}, + {{&_residue_44_low, &_residue_44_low}, + {&_huff_book__44c0_short,&_huff_book__44c0_long}, { {{0}}, /* lossless stereo */ {{0}}, /* 6dB (2.5) stereo */ {{0}}, /* 12dB (4.5) stereo */ {{0}}, /* 18dB (8.5) stereo */ {{0},{0,0,&_44c0_s0_p1_0},{0,0,&_44c0_s0_p2_0},{0,0,&_44c0_s0_p3_0}, - {&_44c0_s0_p4_0,&_44c0_s0_p4_1},{0,0,&_44c0_s1_p5_0},{0,0,&_44c0_s1_p6_0}, - {0,0,&_44c0_s2_p7_0},{&_44c0_s4_p8_0,&_44c0_s4_p8_1}, - {&_44c0_s4_p9_0,&_44c0_s4_p9_1,&_44c0_s4_p9_2}}, /* 24dB (16.5) stereo */ + {&_44c0_s0_p4_0,&_44c0_s0_p4_1},{0,0,&_44c0_s1_p5_0},{0,0,&_44c0_s2_p6_0}, + {&_44c0_s4_p7_0,&_44c0_s4_p7_1,&_44c0_s4_p7_2}}, /* 24dB (16.5) stereo */ }, { {0}, /* lossless stereo */ {0}, /* 6dB (2.5) stereo */ @@ -153,3 +150,4 @@ static vorbis_residue_template _residue_template_44_stereo[11]={ /* mode 1; 80-ish */ }; + @@ -11,7 +11,7 @@ ******************************************************************** function: random psychoacoustics (not including preecho) - last mod: $Id: psy.h,v 1.24.2.5 2001/12/04 11:16:19 xiphmont Exp $ + last mod: $Id: psy.h,v 1.24.2.6 2001/12/11 08:19:39 xiphmont Exp $ ********************************************************************/ @@ -21,12 +21,6 @@ #include "backends.h" -#define BLOCKTYPE_IMPULSE 0 -#define BLOCKTYPE_PADDING 1 -#define BLOCKTYPE_TRANSITION 0 -#define BLOCKTYPE_LONG 1 - - #ifndef EHMER_MAX #define EHMER_MAX 56 #endif @@ -93,7 +87,6 @@ typedef struct{ int eighth_octave_lines; /* for block long/short tuning; encode only */ - int envelopesa; float preecho_thresh[4]; float postecho_thresh[4]; float preecho_minenergy; diff --git a/lib/vorbisenc.c b/lib/vorbisenc.c index 2b27aa35..969a98bb 100644 --- a/lib/vorbisenc.c +++ b/lib/vorbisenc.c @@ -11,7 +11,7 @@ ******************************************************************** function: simple programmatic interface for encoder mode setup - last mod: $Id: vorbisenc.c,v 1.17.2.7 2001/12/07 08:38:27 xiphmont Exp $ + last mod: $Id: vorbisenc.c,v 1.17.2.8 2001/12/11 08:19:39 xiphmont Exp $ ********************************************************************/ @@ -34,7 +34,7 @@ with > 10 partition types, or a different division of iteration, this needs to be updated. */ typedef struct { - vorbis_info_residue0 *res; + vorbis_info_residue0 *res[2]; static_codebook *book_aux[2]; static_codebook *books_base[5][10][3]; static_codebook *books_stereo_backfill[5][10]; @@ -58,12 +58,11 @@ static vorbis_info_mode _mode_set_long={1,0,0,1}; /* mapping conventions: only one submap (this would change for efficient 5.1 support for example)*/ -/* three psychoacoustic profiles are used: One for - short blocks, and two for long blocks (transition and regular) */ +/* Four psychoacoustic profiles are used, one for each blocktype */ static vorbis_info_mapping0 _mapping_set_short={ - 1, {0,0}, {0}, {0}, {0}, {0,0}, 0,{0},{0}}; + 1, {0,0}, {0}, {0}, {0}, {0,1}, 0,{0},{0}}; static vorbis_info_mapping0 _mapping_set_long={ - 1, {0,0}, {0}, {1}, {1}, {1,2}, 0,{0},{0}}; + 1, {0,0}, {0}, {1}, {1}, {2,3}, 0,{0},{0}}; static int vorbis_encode_toplevel_init(vorbis_info *vi,int small,int large,int ch,long rate){ if(vi && vi->codec_setup){ @@ -222,19 +221,6 @@ static int vorbis_encode_psyset_init(vorbis_info *vi,double q,int block, p->noisemaxsupp=in[iq].noisemaxsupp*(1.-dq)+in[iq+1].noisemaxsupp*dq; - switch(block){ - case 0: - p->noisewindowlomin=2; - p->noisewindowhimin=2; - p->noisewindowfixed=15; - break; - default: - p->noisewindowlomin=4; - p->noisewindowhimin=4; - p->noisewindowfixed=100; - break; - } - return(0); } @@ -315,7 +301,7 @@ static int vorbis_encode_peak_init(vorbis_info *vi,double q,int block, } static int vorbis_encode_noisebias_init(vorbis_info *vi,double q,int block, - int in[][17]){ + int in[][17],int guard[33]){ int i,iq=q*10; double dq; codec_setup_info *ci=vi->codec_setup; @@ -328,6 +314,10 @@ static int vorbis_encode_noisebias_init(vorbis_info *vi,double q,int block, dq=q*10.-iq; } + p->noisewindowlomin=guard[iq*3]; + p->noisewindowhimin=guard[iq*3+1]; + p->noisewindowfixed=guard[iq*3+2]; + for(i=0;i<P_BANDS;i++) p->noiseoff[i]=in[iq][i]*(1.-dq)+in[iq+1][i]*dq; return(0); @@ -361,7 +351,7 @@ static int vorbis_encode_ath_init(vorbis_info *vi,double q,int block, dq=1.; } - for(i=0;i<P_BANDS;i++) + for(i=0;i<27;i++) p->ath[i]=in[iq][i]*(1.-dq)+in[iq+1][i]*dq; return(0); } @@ -383,7 +373,7 @@ static int vorbis_encode_residue_init(vorbis_info *vi,double q,int block, codec_setup_info *ci=vi->codec_setup; vorbis_info_residue0 *r; - vorbis_info_psy *psy=ci->psy_param[block]; + vorbis_info_psy *psy=ci->psy_param[block*2]; va_list ap; va_start(ap,in); @@ -399,7 +389,7 @@ static int vorbis_encode_residue_init(vorbis_info *vi,double q,int block, residue_free_info(ci->residue_param[block],ci->residue_type[block]); r=ci->residue_param[block]=malloc(sizeof(*r)); - memcpy(r,in[iq].res,sizeof(*r)); + memcpy(r,in[iq].res[block],sizeof(*r)); if(ci->residues<=block)ci->residues=block+1; if(block){ @@ -494,9 +484,6 @@ static int vorbis_encode_residue_init(vorbis_info *vi,double q,int block, } ci->coupling_passes=iterations; - if(block) - memcpy(ci->psy_param[block+1],psy,sizeof(*psy)); - }else{ ci->passlimit[0]=3; @@ -513,6 +500,10 @@ static int vorbis_encode_residue_init(vorbis_info *vi,double q,int block, }else ci->coupling_passes=1; } + + memcpy(&ci->psy_param[block*2+1]->couple_pass, + &ci->psy_param[block*2]->couple_pass, + sizeof(psy->couple_pass[0])); /* fill in all the books */ { @@ -581,10 +572,10 @@ static int vorbis_encode_lowpass_init(vorbis_info *vi,double q,int block,...){ here to next boundary, or the vorbis spec will round it *down* to previous boundary in encode/decode */ if(ci->residue_type[block]==2) - r->end=((freq/nyq*blocksize*2)/r->grouping+.9)* /* round up only if we're well past */ + r->end=rint((freq/nyq*blocksize*2)/r->grouping+.9)* /* round up only if we're well past */ r->grouping; else - r->end=((freq/nyq*blocksize)/r->grouping+.9)* /* round up only if we're well past */ + r->end=rint((freq/nyq*blocksize)/r->grouping+.9)* /* round up only if we're well past */ r->grouping; return(0); } @@ -610,30 +601,40 @@ int vorbis_encode_init_vbr(vorbis_info *vi, 0,0,0,0,0,0,0,0,0,0,0); ret|=vorbis_encode_global_psych_init(vi,base_quality,_psy_global_44, - 0., 0., .5, 1., 1., 1., 1., 1., 1., 1., 1.); + 0., 1., 1.5, 2., 2., 2., 2., 2., 2., 2., 2.); ret|=vorbis_encode_psyset_init(vi,base_quality,0,_psy_settings); ret|=vorbis_encode_psyset_init(vi,base_quality,1,_psy_settings); ret|=vorbis_encode_psyset_init(vi,base_quality,2,_psy_settings); + ret|=vorbis_encode_psyset_init(vi,base_quality,3,_psy_settings); ret|=vorbis_encode_tonemask_init(vi,base_quality,0,_vp_tonemask_adj_otherblock); ret|=vorbis_encode_tonemask_init(vi,base_quality,1,_vp_tonemask_adj_otherblock); - ret|=vorbis_encode_tonemask_init(vi,base_quality,2,_vp_tonemask_adj_longblock); + ret|=vorbis_encode_tonemask_init(vi,base_quality,2,_vp_tonemask_adj_otherblock); + ret|=vorbis_encode_tonemask_init(vi,base_quality,3,_vp_tonemask_adj_longblock); - ret|=vorbis_encode_compand_init(vi,base_quality,0,_psy_compand_44, + ret|=vorbis_encode_compand_init(vi,base_quality,0,_psy_compand_44_short, 1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2.); - ret|=vorbis_encode_compand_init(vi,base_quality,1,_psy_compand_44, + ret|=vorbis_encode_compand_init(vi,base_quality,1,_psy_compand_44_short, 1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2.); ret|=vorbis_encode_compand_init(vi,base_quality,2,_psy_compand_44, 1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2.); + ret|=vorbis_encode_compand_init(vi,base_quality,3,_psy_compand_44, + 1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2.); ret|=vorbis_encode_peak_init(vi,base_quality,0,_vp_peakguard); ret|=vorbis_encode_peak_init(vi,base_quality,1,_vp_peakguard); ret|=vorbis_encode_peak_init(vi,base_quality,2,_vp_peakguard); + ret|=vorbis_encode_peak_init(vi,base_quality,3,_vp_peakguard); - ret|=vorbis_encode_noisebias_init(vi,base_quality,0,_psy_noisebias_other); - ret|=vorbis_encode_noisebias_init(vi,base_quality,1,_psy_noisebias_other); - ret|=vorbis_encode_noisebias_init(vi,base_quality,2,_psy_noisebias_long); + ret|=vorbis_encode_noisebias_init(vi,base_quality,0,_psy_noisebias_impulse, + _psy_noiseguards_short); + ret|=vorbis_encode_noisebias_init(vi,base_quality,1,_psy_noisebias_other, + _psy_noiseguards_short); + ret|=vorbis_encode_noisebias_init(vi,base_quality,2,_psy_noisebias_other, + _psy_noiseguards_long); + ret|=vorbis_encode_noisebias_init(vi,base_quality,3,_psy_noisebias_long, + _psy_noiseguards_long); ret|=vorbis_encode_ath_init(vi,base_quality,0,ATH_Bark_dB, 0., 0., 0., 0., 0., .5, 1., 1., 1.5, 2., 2.); @@ -641,7 +642,9 @@ int vorbis_encode_init_vbr(vorbis_info *vi, 0., 0., 0., 0., 0., .5, 1., 1., 1.5, 2., 2.); ret|=vorbis_encode_ath_init(vi,base_quality,2,ATH_Bark_dB, 0., 0., 0., 0., 0., .5, 1., 1., 1.5, 2., 2.); - + ret|=vorbis_encode_ath_init(vi,base_quality,3,ATH_Bark_dB, + 0., 0., 0., 0., 0., .5, 1., 1., 1.5, 2., 2.); + if(ret){ vorbis_info_clear(vi); return ret; @@ -658,7 +661,7 @@ int vorbis_encode_init_vbr(vorbis_info *vi, 0, /* no residue backfill */ _residue_template_44_stereo, 4, 3, 3, 2, 1, 0, 0, 0, 0, 0, 0, - 4., 4., 6., 6., 10., 4., 4., 4., 4., 4., 4.); + 4., 6., 6., 6., 10., 6., 6., 6., 6., 6., 6.); ret|=vorbis_encode_residue_init(vi,base_quality,1, 1, /* coupled */ @@ -666,10 +669,10 @@ int vorbis_encode_init_vbr(vorbis_info *vi, 0, /* no residue backfill */ _residue_template_44_stereo, 4, 3, 3, 2, 1, 0, 0, 0, 0, 0, 0, - 4., 6., 6., 10., 10., 4., 4., 4., 4., 4., 4.); + 6., 6., 6., 10., 10., 6., 6., 6., 6., 6., 6.); ret|=vorbis_encode_lowpass_init(vi,base_quality,0, - 12.1,14.9,16.9,17.9,19.9, + 15.1,15.9,16.9,17.9,19.9, 999.,999.,999.,999.,999.,999.); ret|=vorbis_encode_lowpass_init(vi,base_quality,1, 15.1,15.9,16.9,17.9,19.9, diff --git a/vq/44c0_s4.vqs b/vq/44c0_s4.vqs index 97c49a33..48bb7510 100644 --- a/vq/44c0_s4.vqs +++ b/vq/44c0_s4.vqs @@ -1,25 +1,52 @@ +huffbuild line_128x7_class1.vqd 0-64 +huffbuild line_128x7_class2.vqd 0-64 + +huffbuild line_128x7_0sub0.vqd 0-64 +huffbuild line_128x7_1sub1.vqd 1-9 +huffbuild line_128x7_1sub2.vqd 9-25 +huffbuild line_128x7_1sub3.vqd 25-64 +huffbuild line_128x7_2sub1.vqd 1-9 +huffbuild line_128x7_2sub2.vqd 9-25 +huffbuild line_128x7_2sub3.vqd 25-64 + +huffbuild line_1024x31_class0.vqd 0-8 +huffbuild line_1024x31_class1.vqd 0-16 +huffbuild line_1024x31_class2.vqd 0-64 +huffbuild line_1024x31_class3.vqd 0-64 + +huffbuild line_1024x31_0sub0.vqd 0-32 +huffbuild line_1024x31_0sub1.vqd 32-128 + +huffbuild line_1024x31_1sub0.vqd 0-32 +huffbuild line_1024x31_1sub1.vqd 32-128 + +huffbuild line_1024x31_2sub1.vqd 1-18 +huffbuild line_1024x31_2sub2.vqd 18-50 +huffbuild line_1024x31_2sub3.vqd 50-128 +huffbuild line_1024x31_3sub1.vqd 1-18 +huffbuild line_1024x31_3sub2.vqd 18-50 +huffbuild line_1024x31_3sub3.vqd 50-128 + cp resaux_short.vqd _44c0_short.vqd cp resaux_long.vqd _44c0_long.vqd GO ->_44c0_dummy noninterleaved -haux _44c0_short.vqd 0,14,2 +>_44c0s noninterleaved +haux _44c0_short.vqd 0,12,2 >_44c0 noninterleaved -haux _44c0_long.vqd 0,56,2 +haux _44c0_long.vqd 0,44,2 #iter 0 -# 0 1 2 4 26 1 2 4 26 + -# 0 0 0 0 +# 0 1 2 4 26 1 4 + +# 0 0 0 0 # -# 0 1 2 3 4 5 6 7 8 9 -# 1 . . . -# 2 . . . -# 4 . . . . . . . -# -# 0 4 4 4 3 4 4 4 3 7 +# 0 1 2 3 4 5 6 7 +# 1 . . +# 2 . . +# 4 . . . . . . :_s0_p1_0 res_long_part1_it0.vqd, 4, nonseq cull, 0 +- 1 2 :_s0_p2_0 res_long_part2_it0.vqd, 2, nonseq cull, 0 +- 1 2 3 4 @@ -27,13 +54,9 @@ haux _44c0_long.vqd 0,56,2 :_s0_p4_0 res_long_part4_it0.vqd, 2, nonseq , 0 +- 7 14 21 28 35 42 49 +_s0_p4_1, 2, nonseq cull, 0 +- 1 2 3 :_s1_p5_0 res_long_part5_it0.vqd, 4, nonseq cull, 0 +- 1 -:_s1_p6_0 res_long_part6_it0.vqd, 4, nonseq cull, 0 +- 1 2 -:_s2_p7_0 res_long_part7_it0.vqd, 2, nonseq cull, 0 +- 1 2 3 4 - -:_s4_p8_0 res_long_part8_it0.vqd, 2, nonseq , 0 +- 7 14 21 28 35 42 49 -+_s4_p8_1, 2, nonseq cull, 0 +- 1 2 3 +:_s2_p6_0 res_long_part6_it0.vqd, 2, nonseq cull, 0 +- 1 2 3 4 -:_s4_p9_0 res_long_part9_it0.vqd, 2, nonseq, 0 +- 67 134 201 -+_s4_p9_1, 2, nonseq, 0 +- 3 6 9 12 15 18 21 24 27 30 33 -+_s4_p9_2, 4, nonseq, 0 +- 1 +:_s4_p7_0 res_long_part7_it0.vqd, 2, nonseq, 0 +- 67 134 201 ++_s4_p7_1, 2, nonseq, 0 +- 3 6 9 12 15 18 21 24 27 30 33 ++_s4_p7_2, 4, nonseq, 0 +- 1 |