Using color palettes
I have a question concerning the use of palettes. I have a source filter that outputs either MEDIASUBTYPE_RGB8 or MEDIASUBTYPE_RGB555 subtypes depending on the source video file. I have the RGB555 working just fine. The RGB8 video plays back correctly, except it is not displaying with the correct color palette.
In my source filter's GetMediaType() function, I fill in the VIDEOINFO.bmiColors array with the color palette from my source video file and set these settings:
Assume pvi is a VIDEOINFO*.
pvi->bmiHeader.biBitCount = 8;
pvi->bmiHeader.biCompression = BI_RGB;
pvi->bmiHeader.biClrUsed = 256;
memcpy( pvi->bmiColors, myColorPaletteAddress, 256*sizeof(RGBQUAD) );
The source filter's output pin's Preferred Media Types is:
Major Type: Video - Sub Type: RGB8 - Format: RGB 1024x768, 8 bits rcSrc=(0,0,0,0) rcDst=(0,0,0,0)
When I render the output pin, I get a "Color Space Converter" filter followed by a "Video Renderer" filter. The "Color Space Converter" has an output pin that transforms the image to RGB32.
Is the "Color Space Converter" using the color palette to convert the indexed color image into a RGB32 image? If so, I must be setting up the wrong color palette.
Or am I missing something?
Thanks,
Dan Harlin

