From 82c3a0d056a42ac0863ad2067a40b534450dd9f8 Mon Sep 17 00:00:00 2001 From: Monty Date: Fri, 19 Feb 2010 02:49:25 +0000 Subject: [PATCH] Correct a setup 'bug' that doesn't affect anything in current encoder, but could certainly be annoying when surround lands. svn path=/trunk/vorbis/; revision=16921 --- lib/vorbisenc.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/vorbisenc.c b/lib/vorbisenc.c index db44128..eff40ed 100644 --- a/lib/vorbisenc.c +++ b/lib/vorbisenc.c @@ -486,11 +486,6 @@ static void vorbis_encode_residue_setup(vorbis_info *vi, } ci->residue_type[number]=res->res_type; - /* to be adjusted by lowpass/pointlimit later */ - n=r->end=ci->blocksizes[block]>>1; - if(res->res_type==2) - n=r->end*=vi->channels; - /* fill in all the books */ { int booklist=0,k; @@ -572,7 +567,7 @@ static void vorbis_encode_residue_setup(vorbis_info *vi, boundaries. We still lowpass 'wherever', but we have to round up here to next boundary, or the vorbis spec will round it *down* to previous boundary in encode/decode */ - if(ci->residue_type[block]==2) + if(ci->residue_type[number]==2) r->end=(int)((freq/nyq*blocksize*2)/r->grouping+.9)* /* round up only if we're well past */ r->grouping; else -- 2.7.4