This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DLP6500FYE: Enhanced Run Length Encoding Example Questions

Part Number: DLP6500FYE
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?)

  • Hello Paul,

    This may take a little analysis to understand better.  I will try to have an initial answer tomorrow.

    Fizix

  • Hi Paul,

    I've looked into the DLPC900 GUI, and looked at the source code for compress.c and common.h. I have found a C macro called PARSE_WORD24_LE that gets a 3-byte word from another macro called MAKE_WORD32. The former macro returns the 3-byte word in little endian, as you expect, and it is used in the FindRepeat function in compress.c.

    Please let us know if this information helps any just to start off.

    Regards,

    Michael Ly