Subj : Re: Audio Encoding To : comp.programming From : Martin Eisenberg Date : Sat Aug 20 2005 04:19 pm brendan wrote: > Does anyone have any ideas on how to write code to turn binary > (pictures, video, etc.) into a sound track (a bit like DAT) that > can be compressed with A-Track losslessly? Or am I being > completely stupid? If you could encode the track into a (very > large) file that had no pitch differences: > > bits:1 0 1 0 1 0 1 > audio:/\/\/\/\/\/\/\ > > Wich is then compressed. As the waveform would be so simple the > A-Track could (?) compress it as lossless. A long sequence of alternating bits isn't going to correspond to a very interesting image under any coding scheme, so you probably didn't mean what you wrote. Anyway, bits are not the right level to look at multimedia coding which exploits spectral properties of the data -- and from that perspective, a signal consisting of high/low transitions like you propose is not that simple. As for your question, something to play with could be to split the image into color planes; concatenate the rows of each plane; and if necessary, promote the subpixels to a word width the audio codec handles. A refinement would be to put pairs of adjacent -- thus probably similar -- rows in the stereo channels at the same time offset. If the approach is worthwile, I can't say. You will want to understand how many audio codecs actually operate. The book available at http://www.dspguide.com/pdfbook.htm has a chapter on data compression. Best ask any questions that come up in comp.dsp. Martin -- Quidquid latine dictum sit, altum viditur. .