Other Parts Discussed in Thread: DLPC900
Hi, I am working with a custom application interfacing to a DLP6500 using the USB interface, and am running into some issues that I believe are related to my implementation of the enhanced run length compression. When I am uploading a single image to the dmd using pattern on the fly mode things work fine, but I have issues when I try uploading multiple images - specifically the individual images seem to have been merged together to some degree. Because the code is working as expected with 1 image but not multiple images, I am thinking the problem may be related to how I am handling the 2nd and 3rd bytes in the 24 bit pixel. Looking at the example code, I don't fully understand a few aspects of the compression. Specifically, see the example function below, taken from compress.c - can someone explain to me why the byte order is being loaded 2,0,1? I saw a note in the programmers guide that the bytes are supposed to be loaded in reverse order, but wouldn't that be 2,1,0?
static uint08 *AddPixel(uint08 const *Pix, uint08 *Out)
{
*Out++ = Pix[2];
*Out++ = Pix[0];
*Out++ = Pix[1];
return Out;
On a similar note regarding image ordering, with multiple 1 bit images, I am taking the relevant image bit and placing it into the appropriate bit in each 24 bit/pixel, then compressing that image. Is that the correct approach? In other words, if I have 3 images to upload, I construct an empty output image data array, I take image 1 pixel 1 1 bit value and set to the output image pixel 1 bit 0, then image 2 pixel 1 and set it to output image pixel 1 bit 1, and so on, then compress that. Is that correct? Or should the image bits be starting at bit 23, going down towards bit 0? And should these bits be reversed? So that the last of my images gets put into bit 0 then goes up so that my first image bit goes to bit n? (where n is the number of images?)