Hello, I am new to the list, to FLAC and to FLAC development but I am having a problem in trying to make FLAC work with MediaMVP based the mvpmc project (ref. http://www.wvpmc.org) that hopefully someone can help me with. This device is possibly minimum spec. for a FLAC decoder. In any case, I have had some success cross-compiling libFLAC (without the ogg or metadata modules).for the embedded environment upon which mvpmc is based. In fact according to top the CPU utilization for FLAC decoding and playing is only 10%. I was very please and was going to release a beta release to our developers when I noticed that the code I use (based on the test_libFLAC encoders.c program and flac123.c) would not play "type =INDEPENDENT" files. The way the MediaMVP device works is there is an onboard audio processor which can decode PCM (in either OggVorbis or MS WAV formats) , various MPEG, and AC3. Basically for the LPC type I just write() the date to the hardware file descriptor and it seems to play fine. When the INDEPENDENT data is written this way, I can just make out the song through the noise and static and the speed is reduced. Right now I've spent a lot of time trying to playing with blocksize, samples, and channels but I can't seem to get these files to work. Can anyone point me to sample code (no floating point on this device) which would explain how to transform the INDEPENDENT sample frames to LPC. Obviously preserving lossless is important for this logic too. Thanks in advance. Martin
--- MVallevand <mvallevand@gmail.com> wrote:> Hello, I am new to the list, to FLAC and to FLAC development but I am > having a problem in trying to make FLAC work with MediaMVP based the > mvpmc project (ref. http://www.wvpmc.org) that hopefully someone can > help me with. This device is possibly minimum spec. for a FLAC > decoder. > > In any case, I have had some success cross-compiling libFLAC > (without > the ogg or metadata modules).for the embedded environment upon which > mvpmc is based. In fact according to top the CPU utilization for FLAC > decoding and playing is only 10%. I was very please and was going to > release a beta release to our developers when I noticed that the code > I use (based on the test_libFLAC encoders.c program and flac123.c) > would not play "type =INDEPENDENT" files. > > The way the MediaMVP device works is there is an onboard audio > processor which can decode PCM (in either OggVorbis or MS WAV > formats) > , various MPEG, and AC3. Basically for the LPC type I just write() > the date to the hardware file descriptor and it seems to play fine. > When the INDEPENDENT data is written this way, I can just make out > the song through the noise and static and the speed is reduced. > > Right now I've spent a lot of time trying to playing with blocksize, > samples, and channels but I can't seem to get these files to work. > Can anyone point me to sample code (no floating point on this device) > which would explain how to transform the INDEPENDENT sample frames > to LPC. Obviously preserving lossless is important for this logictoo.> > Thanks in advance.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. for stereo data, the encoder chooses whether to encoder the L R channels as is, or to compute mid (M) and side (S) channels and send M/S L/S or R/S. after that, each of the 2 channels can be encoded with LPC or other methods. e.g. 1st channel LPC, 2nd channel verbatim I'm not sure why "independent" frames would not decode correctly though. more info on exactly how it is not working would help. Josh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
On 1/2/07, Josh Coalson <xflac@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