That should be pretty easy.
You didn't mention which DSP you want to use. As far as I know, the
Davinci JPEG codecs usually only take variants of YUV (interleaved, non
interleaved, 4:2:2 etc).
So to fix that you need to convert your gray scale to YUV format - and
thats simple since gray scale is just the Y component, and you would
just fill zeros into the UV. Then you feed that transformed image to the
codec and your output is all compressed for you.
For examples on the code to run the JPEG codec check the SDK for
jpegenc, in my distribution it is at:
dvsdk_1_30_00_40/examples/dm355/jpegenc
Ed wrote:
I have an application running on the ARM which has a raw image (8-bit
greyscale, tripled to RGB24 if necessary) in memory, and I'm looking
for the simplest way to encode into a JPEG using a DSP codec. I don't
want to pull anything out of video, or display anything on a screen,
or do anything else fancy. Ideally I'd feed the DSP the raw image and
a buffer it would write the encoded JPEG data to, since I need to wrap
a few things around the image before I write it out to the filesystem.
Any thoughts/good starting points?
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source