I have captured few RAW images using my PiCam v2.0. I want to convert these images to JPEG and analyze the time taken by GPU, which has the Image Signal Processor, for performing this conversion. As of yet, I have been unable to find any library that lets me access the GPU for such a purpose.

Also, the following link (http://hopkinsdev.blogspot.in/2016/07/raspberry-pi-openmax-jpeg-encoder.html) suggests using OpenMAX for RAW to JPEG conversion, but I reckon the word "RAW" doesn't mean direct data from the image sensor.

  • Yes, it's possible. Both MMAL and OpenMAX are capable of performing hardware-accelerated JPEG encoding but I'm afraid I'm only familiar with the former. The picamera docs include some detail on using the GPU JPEG encoder (but read the prior sections in that chapter to understand the context). – Dave Jones Feb 7 '18 at 21:22
  • @DaveJones, I know that they allow conversion from a RAW RGB format to encoded JPEG format. What I am looking for is conversion from RAW data, i.e., the bayer data, to JPEG format. I want to analyze the time required for digital preprocessing, as it happens in the GPU, plus the time required for encoding from RAW RGB to JPEG - something MMAL and OpenMAX are already capable of. – Ekdeep Singh Lubana Feb 8 '18 at 4:11
  • Ah, my apologies for skimming! It may be possible, but I'm not sure off the top of my head. There are several MMAL formats related to bayer data (MMAL_ENCODING_BAYER_SBGGR10P etc.) - try setting those as the input format on an encoder and if it accepts it (on port commit) you may be in business. If it doesn't then my guess would be this isn't exposed outside the firmware. – Dave Jones Feb 8 '18 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.