>
> > the ficticious previous granule that doesn't really exisit, except
> > that the output of the decoder for granule 2 is going to be combined with
> > the data in the buffer which would have held the decoded output of
> > granule 1. I will assume the decoder initializes this buffer with
> > zeros.
> >
> > Lets ignore quantization. The lapped MDCT followed
> > by the IMDCT is lossless. That means that the IMDCT output
> > from granule 2 when added to the IMDCT output from granule 1
> > is indentical to the input.
> >
>
> Ok. But, unfortunately, we _can't_ ignore quantization, because we have a
> _terribly_ bad granule-pair to encode: granule 2 contains sound which is
> not just fading in, granule 1 is zeroed, so our encoding will be decoded
> quite badly if there is _any_ quantization. And in the 1st block you output,
> you don't have any bitreservoir to save you, either, I'm afraid.
>
Good point. So this does not get us any closer to allowing to smoothly
join mp3's. But it does allow us to set the encoder delay in LAME to
as low as 96.
The problem you mention effect all encodings, no matter
what the delay/padding, since at some point, the music will have to
start so we always have one granule of data following a granule of all
0's. But I guess with a large encoder delay, the is time to
build up the bitreservoir.
> > In our case, the decoder just sets the granule 1 IMDCT output to all
> > 0's because it never actually computes this and is just initializing a
> > buffer. But the output of granule 2 IMDCT is computed correctly.
> >
> > output = granule_1_ouput + granule_2_output
> >
> > granule_1_output: encoder uses all 0's, which is incorrect since
> > the MDCT (if it was performed) would have seen
> > some of the data in granule 2.
> >
> > granule_2_outptu: correct
> >
> > Therefor, the output will be correct *except* where it uses data from
> > granule 1, but this can effect at most the first 96 samples.
>
> I don't understand this. I would think it would affect 0 samples?
>
the first 96 samples of the output from granule 2 will be combined
with the last 96 samples of granule 1. But these last 96 samples
are all zeros, instead of what they should have been if granule 1
has been computed properly.
Mark
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )