I'm trying to use the DVSDK to do jpeg conversions. The output of Ienc1_process(...) is always the same and mostly junk. There are a couple jpeg flags in the data array (ie. the array starts with 0xFF 0xC4; this is a jpeg marker, but not the one for start of image), but mostly the data are junk (ie. end with a dozen 0x32s). The resulting data can't be read by any image viewer.
I'm using a dm3730 rev D torpedo and linux. I've written my own C++ app that's just a slight re-factoring of the example app found in:
dvsdk_4_03_00_06/dmai_2_20_00_15/packages/tio/sdo/dmai/apps/image_encode_io1.c
I also found similar use of the API in:
gst-ti-plugin-trunk919/gst-ti-plugin-minimal-trunk919/src/gsttiimgenc1.c
My investigation so far:
- I believe I'm linking all the DSP libraries correctly. My app compiles and runs without errors. There's a lot of mysterious black box Makefile steps that I just copied from the above examples, so I'm not 100% sure I'm doing that right. Most significantly, all the configurations refer to using the omap3530 DSP target even though I'm on a dm3730. According to both timesys and gstreamer examples, they have identical configurations for both. So I'm guessing it's OK, but I'm not sure.
- I know the DSP is doing something! The first example shows how to time the process and run the DSP jpeg conversion with and without caching. Time required to run the jpeg conversion always varies a little. Without caching, it typically takes ~22ms. With caching, about 11ms. I'm not sure exactly what this caching is, but I think this at least demonstrates some sort of interaction with the DSP.
- The uncompressed image used for Ienc1_process() doesn't matter. I started with images from a camera. But even with input frames of all 0x00, the output is always the same.
- I have not yet confirmed that the DSP jpeg conversion even works. I'll be trying to get a basic test working with gstreamer later today.
- I thought that perhaps the output was getting truncated somehow. I read past the end of the stated output length and it's all 0x00. No end of frame marker in sight.
Does anyone have any idea what's going on? Am I using the API wrong? Is the DSP codec compiled wrong? Am I linking wrong somehow? Is it buried in some errata somewhere that this actually doesn't work?
I'm happy to provide the code here (it's not very different from the above examples), or the bizarre output, or my Makefile/.cfg/.bld files, or whatever info anyone wants if they've got any ideas.
Thanks,
Aaron
PS. Sorry if this post belongs in the linux BSP discussion section. I'm having problems with the DSP and that's a bit of a gray area.