Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

OpenMAX MJPEG decoder

$
0
0


I have been trying to use the DM8168 MJPEG decoder via OpenMAX in EZSDK 5.04.

As shown in the decode_display example, it works fine for decoding a small number of frames.  However, I am having a problem with it keeping going after the first few frames.

It appears that it does not do anything with additional output buffers which are passed to it after the initial setup.  For example, in my program I pass it two output buffers via EmptyThisBuffer before starting to decode anything and then pass more as it gives me those buffers back again.  When I send an input stream into the decoder it returns those two initial buffers filled (with the correct output) but then does not return any more.

It is also possible to replicate this in the decode_display example program by changing the two lines
#define IL_CLIENT_DECODER_INPUT_BUFFER_COUNT   (4)
#define IL_CLIENT_DECODER_OUTPUT_BUFFER_COUNT  (8)
to
#define IL_CLIENT_DECODER_INPUT_BUFFER_COUNT   (8)
#define IL_CLIENT_DECODER_OUTPUT_BUFFER_COUNT  (4)
at the top of ilclient_utils.h.  This change makes it send eight buffers into the decoder with only four total buffers of output (which are passed back in when finished with by the scaler, so the decoder is not running out of buffers).  Only four output frames are produced by the decoder, and the program then hangs waiting for the other four.

Is there some additional setup needed for the MJPEG decoder to work repeatedly which is not present in decode_display?

- Mark


Aside:  DHT blocks (Huffman tables) are required in the JPEG data.  I had to splice the default ones into the stream manually in order to make it work at all with webcam-type output which does not include them.  This should probably be documented somewhere (all the documentation says currently on the matter is "Supports decoding of custom Huffman tables", which to my mind does not imply that custom Huffman tables are in fact mandatory).


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>