[Flac-dev] Decoding Type=Independent

MVallevand mvallevand at gmail.com
Tue Jan 2 12:55:13 PST 2007


On 1/2/07, Josh Coalson <xflac at yahoo.com> wrote:
> I'm not sure I understand... I think the INDEPENDENT you are referring
> to means the interchannel decorrelation method.  this stage is before
> and independent of LPC analysis.

Correct.

> I'm not sure why "independent" frames would not decode correctly
> though.  more info on exactly how it is not working would help.

Ignoring the fact that I am not doing anything special with the MID
channel samples, (for now they hit the same code), I am using the
following pseudo logic to write to the hardware PCM buffer. (I don't
have the actual code with me but I've tried so many things this is
close)

for (sample= i =0;sample < blocksize; sample++ )
   for (channel = 0; channel < channels; channel++, i++)
       aobuf[i]= flac_decoded_data[channel][sample];

int offset = 0;

while ( i >0 && len >=0 ) {
   len = write(pcm_fd,aobuf+offset, i );
   if (len<=0)  continue;  // device busy or error
   i -= len;
   offset+= len;
};

With LPC correlation it plays quite well, with Independent it is unlistenable.

Martin


More information about the Flac-dev mailing list