[Flac-dev] Re: Reg. FLAC decoding
--- Joe Steeve [EMAIL PROTECTED] wrote: Is it possible for the frame-header.bits_per_sample, frame-header.sample_rate to differ from frame to frame?? no, not in file storage. that would be invalid. but you should guard against it anyway, e.g. aborting playback if it changes. Josh __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com ___ Flac-dev mailing list Flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
[Flac-dev] Re: Reg. FLAC decoding
Sorry for the delay in getting back to you., I was working on something else and just now got FLAC to work. Ok., FLAC files are playing now :) Cheers. There is a slight noise happening in the background., which i'm figuring out. I hope that it'll be solved soon. However, i wanted to know if there are any ARM specific optimizations that can be done. The processor is a 166MHz processor. Do you think it is ok? -- Joe Steeve (http://www.joesteeve.org/) Z500 Development team (http://www.z500series.com/) Terminus Graphics Studios http://www.terminus.in/ ___ Flac-dev mailing list Flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
[Flac-dev] Re: Reg. FLAC decoding
--- Joe Steeve [EMAIL PROTECTED] wrote: Sorry for the delay in getting back to you., I was working on something else and just now got FLAC to work. Ok., FLAC files are playing now :) Cheers. There is a slight noise happening in the background., which i'm figuring out. I hope that it'll be solved soon. However, i wanted to know if there are any ARM specific optimizations that can be done. The processor is a 166MHz processor. Do you think it is ok? we don't have any ARM optimizations yet, just x86 and ppc. but yes, FLAC__lpc_restore_signal() will give the most bang for the buck and is the easiest (it's just a multiply-accumulate-shift loop). unsigned i, j; FLAC__int32 sum; for(i = 0; i data_len; i++) { sum = 0; for(j = 0; j order; j++) sum += qlp_coeff[j] * data[i-j-1]; data[i] = residual[i] + (sum lp_quantization); } the next would probably be FLAC__fixed_restore_signal(), which is also easy, and FLAC__bitbuffer_read_rice_signed_block(), which is unfortunately complicated. Josh __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com ___ Flac-dev mailing list Flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
[Flac-dev] Re: Reg. FLAC decoding
On Fri, 2005-09-30 at 23:14, Josh Coalson wrote: but all samples in buffer[] are 32-bit signed integers in host order, regardless of the bits-per-sample of the frame. so to get them down to shorts (assuming they'll fit), do like: FLAC__int32 * LChannel = buffer[0]; short TempSource = (short)LChannel[LPos]; instead of LChannel = (unsigned char *)buffer[0]; short * TempSource = (short *)LChannel[LPos]; let me know if this works or if you have other questions. I tried this., but still i dont get the proper output. I'm still debugging with the decoder. I'll get back when I get doubts. -- Joe Steeve (http://www.joesteeve.org/) Z500 Development team (http://www.z500series.com/) Terminus Graphics Studios http://www.terminus.in/ ___ Flac-dev mailing list Flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
[Flac-dev] Re: Reg. FLAC decoding
--- Joe Steeve [EMAIL PROTECTED] wrote: On Fri, 2005-09-30 at 23:14, Josh Coalson wrote: but all samples in buffer[] are 32-bit signed integers in host order, regardless of the bits-per-sample of the frame. so to get them down to shorts (assuming they'll fit), do like: FLAC__int32 * LChannel = buffer[0]; short TempSource = (short)LChannel[LPos]; instead of LChannel = (unsigned char *)buffer[0]; short * TempSource = (short *)LChannel[LPos]; let me know if this works or if you have other questions. I tried this., but still i dont get the proper output. I'm still debugging with the decoder. I'll get back when I get doubts. one thing that can help: create a stereo WAVE file with one sample in each channel with a specific bit pattern like 0x55aa 0x5aa5, compress to FLAC, and decode that. then it is easy in a debugger to see how the samples are stored. Josh __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com ___ Flac-dev mailing list Flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev