Yup, set them to zero. When you start encoding, the difference between the previous sample and the predicted value is just assumed to be zero. For the reference values, why not use the code in the application note for the PC side of the encoder? On Sat, 2003-07-19 at 16:35, Ishaan Dalal wrote: > And oh, does anyone know what the initial values (i.e. before beginning to > encode the very first sample) of PREVIOUS_16BIT_SAMPLE (that's > "state->valprev" from the reference code) and INDEX ("state->index") should > be? I'm just setting > both to 0. > > Cheers, > Ishaan > > ----- Original Message ----- > From: "Ishaan Dalal" > To: > Sent: Saturday, July 19, 2003 19:21 > Subject: [EE] ADPCM encoding/test stream > > > > I'm adapting the IMA ADPCM algorithm (as in > > file://ftp.cwi.nl/pub/adpcm.shar) to 18F optimized ASM code [Yes, I know > of > > the uChip appnote, as well as Rodger Richey's 1999 Circuit Cellar article, > > but would prefer to do this myself as a learning exercise]. > > > > What I'd like to know is if anybody is aware of a "test" stream (list) > > (i.e., an array of say, 256 input values and an array of the correctly > > encoded 128 output values) that I could use to test my encoder/decoder? > I've > > been trying to make do by writing 16-bit raw PCM values to file and then > > using SOX to convert them to IMA ADPCM, but I'd really prefer a more solid > > test stream. > > > > Cheers, > > Ishaan > > > > -- > > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- Alex Harford http://www.alexharford.com alex-spam@alexharford.com Tel: (604) 937-7601 -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body