Commit ba9ab917 authored by Monty's avatar Monty

Fix overrange conditions in residue codebooks

svn path=/branches/branch_monty_20020507/vorbis/; revision=3436
parent be929e62
......@@ -11,7 +11,7 @@
********************************************************************
function: simple example encoder
last mod: $Id: encoder_example.c,v 1.40.2.7 2002/06/28 04:19:08 xiphmont Exp $
last mod: $Id: encoder_example.c,v 1.40.2.8 2002/06/28 21:54:36 xiphmont Exp $
********************************************************************/
......@@ -97,8 +97,8 @@ int main(){
/* (quality mode .4: 44kHz stereo coupled, roughly 128kbps VBR) */
vorbis_info_init(&vi);
//vorbis_encode_init(&vi,2,44100,-1,118000,-1);
vorbis_encode_init_vbr(&vi,2,44100,.7);
//vorbis_encode_init(&vi,2,44100,-1,82000,-1);
vorbis_encode_init_vbr(&vi,2,44100,.9);
/* add a comment */
vorbis_comment_init(&vc);
......
......@@ -11,7 +11,7 @@
********************************************************************
function: bitrate tracking and management
last mod: $Id: bitrate.c,v 1.11.4.6 2002/06/28 04:19:08 xiphmont Exp $
last mod: $Id: bitrate.c,v 1.11.4.7 2002/06/28 21:54:37 xiphmont Exp $
********************************************************************/
......@@ -293,7 +293,7 @@ int vorbis_bitrate_addblock(vorbis_block *vb){
/* apply the average floater to new blocks */
bin=rint(bm->avgfloat);
fprintf(stderr,"%d ",bin);
/*fprintf(stderr,"%d ",bin);*/
while(bm->avg_centeracc>desired_center){
......
This diff is collapsed.
......@@ -11,7 +11,7 @@
********************************************************************
function: floor backend 1 implementation
last mod: $Id: floor1.c,v 1.20.4.6 2002/06/28 04:19:09 xiphmont Exp $
last mod: $Id: floor1.c,v 1.20.4.7 2002/06/28 21:54:37 xiphmont Exp $
********************************************************************/
......@@ -76,10 +76,10 @@ static void floor1_free_info(vorbis_info_floor *i){
static void floor1_free_look(vorbis_look_floor *i){
vorbis_look_floor1 *look=(vorbis_look_floor1 *)i;
if(look){
fprintf(stderr,"floor 1 bit usage %f:%f (%f total)\n",
/*fprintf(stderr,"floor 1 bit usage %f:%f (%f total)\n",
(float)look->phrasebits/look->frames,
(float)look->postbits/look->frames,
(float)(look->postbits+look->phrasebits)/look->frames);
(float)(look->postbits+look->phrasebits)/look->frames);*/
memset(look,0,sizeof(*look));
_ogg_free(look);
......
......@@ -11,7 +11,7 @@
********************************************************************
function: channel mapping 0 implementation
last mod: $Id: mapping0.c,v 1.49.2.9 2002/06/28 04:19:09 xiphmont Exp $
last mod: $Id: mapping0.c,v 1.49.2.10 2002/06/28 21:54:37 xiphmont Exp $
********************************************************************/
......
This diff is collapsed.
......@@ -11,7 +11,7 @@
********************************************************************
function: toplevel residue templates for 32/44.1/48kHz
last mod: $Id: residue_44.h,v 1.11.6.11 2002/06/28 04:19:22 xiphmont Exp $
last mod: $Id: residue_44.h,v 1.11.6.12 2002/06/28 21:54:46 xiphmont Exp $
********************************************************************/
......@@ -202,56 +202,56 @@ static vorbis_residue_template _res_44s_3[]={
};
static vorbis_residue_template _res_44s_4[]={
{2,0, &_residue_44_mid,
&_huff_book__44c4_s_short,&_huff_book__44c4_s_short,
&_huff_book__44c4_s_short,&_huff_book__44c4_sm_short,
&_resbook_44s_4,&_resbook_44s_4},
{2,0, &_residue_44_mid,
&_huff_book__44c4_s_long,&_huff_book__44c4_s_long,
&_huff_book__44c4_s_long,&_huff_book__44c4_sm_long,
&_resbook_44s_4,&_resbook_44s_4}
};
static vorbis_residue_template _res_44s_5[]={
{2,0, &_residue_44_mid,
&_huff_book__44c5_s_short,&_huff_book__44c5_s_short,
&_huff_book__44c5_s_short,&_huff_book__44c5_sm_short,
&_resbook_44s_5,&_resbook_44s_5},
{2,0, &_residue_44_mid,
&_huff_book__44c5_s_long,&_huff_book__44c5_s_long,
&_huff_book__44c5_s_long,&_huff_book__44c5_sm_long,
&_resbook_44s_5,&_resbook_44s_5}
};
static vorbis_residue_template _res_44s_6[]={
{2,0, &_residue_44_high,
&_huff_book__44c6_s_short,&_huff_book__44c6_s_short,
&_huff_book__44c6_s_short,&_huff_book__44c6_sm_short,
&_resbook_44s_6,&_resbook_44s_6},
{2,0, &_residue_44_high,
&_huff_book__44c6_s_long,&_huff_book__44c6_s_long,
&_huff_book__44c6_s_long,&_huff_book__44c6_sm_long,
&_resbook_44s_6,&_resbook_44s_6}
};
static vorbis_residue_template _res_44s_7[]={
{2,0, &_residue_44_high,
&_huff_book__44c7_s_short,&_huff_book__44c7_s_short,
&_huff_book__44c7_s_short,&_huff_book__44c7_sm_short,
&_resbook_44s_7,&_resbook_44s_7},
{2,0, &_residue_44_high,
&_huff_book__44c7_s_long,&_huff_book__44c7_s_long,
&_huff_book__44c7_s_long,&_huff_book__44c7_sm_long,
&_resbook_44s_7,&_resbook_44s_7}
};
static vorbis_residue_template _res_44s_8[]={
{2,0, &_residue_44_high,
&_huff_book__44c8_s_short,&_huff_book__44c8_s_short,
&_huff_book__44c8_s_short,&_huff_book__44c8_sm_short,
&_resbook_44s_8,&_resbook_44s_8},
{2,0, &_residue_44_high,
&_huff_book__44c8_s_long,&_huff_book__44c8_s_long,
&_huff_book__44c8_s_long,&_huff_book__44c8_sm_long,
&_resbook_44s_8,&_resbook_44s_8}
};
static vorbis_residue_template _res_44s_9[]={
{2,0, &_residue_44_high,
&_huff_book__44c9_s_short,&_huff_book__44c9_s_short,
&_huff_book__44c9_s_short,&_huff_book__44c9_sm_short,
&_resbook_44s_9,&_resbook_44s_9},
{2,0, &_residue_44_high,
&_huff_book__44c9_s_long,&_huff_book__44c9_s_long,
&_huff_book__44c9_s_long,&_huff_book__44c9_sm_long,
&_resbook_44s_9,&_resbook_44s_9}
};
......
This diff is collapsed.
This diff is collapsed.
......@@ -70,9 +70,9 @@ haux _44c0_sm_long.vqd 0,64,2
:_p8_0 44c0_sm/res_part8_pass0.vqd, 2, nonseq cull, 0 +- 5 10 15 20 25 30
:_p8_1 44c0_sm/res_part8_pass1.vqd, 2, nonseq cull, 0 +- 1 2
:_p9_0 44c0_sm/res_part9_pass0.vqd, 4, nonseq, 0 +- 169 338
:_p9_1 44c0_sm/res_part9_pass1.vqd, 2, nonseq, 0 +- 13 26 39 52 65 78
:_p9_2 44c0_sm/res_part9_pass2.vqd, 2, nonseq, 0 +- 1 2 3 4 5 6
:_p9_0 44c4_sm/res_part9_pass0.vqd, 2, nonseq, 0 +- 221 442 663 884 1105 1326
:_p9_1 44c4_sm/res_part9_pass1.vqd, 2, nonseq, 0 +- 17 34 51 68 85 102
:_p9_2 44c4_sm/res_part9_pass2.vqd, 2, nonseq, 0 +- 1 2 3 4 5 6 7 8
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment