This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Does JPEG Encoder on DM365 supports Gray JPEG Encoding?

As describing in jpeg encoder manual, it doesn't suppot Gray input.  A special usage is I need to encode gray image with 1024x1024@50fps, if encoder supports Gray input , there is at least two times of encoding speed boost.

My question is ... can JPEG encoder on DM365 supports Gray input undocumented?

  • Specifically speaking about JPEG codec, if you want JPEG codec to convert a color image into a grayscale image and then compress it, I do not believe JPEG support this.  If you already have a gray image and you want JPEG encoder to compress it, then this should certainly be possible.  One scenerio that comes to mind is chossing YCbCr input where only the Y values are input (e.g. temporarily disconnect Cb and Cr Cables from input source); this will produce a gray image (Y-Luma component only) wich can be captured into DDR2 and encoded via JPEG encoder..

  • Kenzo said:
    can JPEG encoder on DM365 supports Gray input undocumented?

    If the manual says it cannot than I am afraid it cannot, the JPEG encoder on this and other devices was designed to handle color formatted data from the ground up, and in this case it is using a JPEG hardware accelerator that is not very flexible. If you wanted a JPEG encoder that supported gray input natively than you would probably have to use a software based solution on the ARM (which would probably be slower than using the accelerator with a color image). I think you may also run into compatibility issues with decoding the JPEG at the other end if you were encoding it in pure gray, my understanding is that a standard JPEG decoder will be expecting the contents to be in a YCbCr 4:2:2 format, so I suspect some decoders might get confused if the image was a contiguous gray image. On the other hand I suppose an encoder that supported gray input could encode in a YCbCr 4:2:2 format and just fill in the Cb/Cr data with a blank (average) value as Juan was suggesting and still gain speed by not processing on them, but this still requires a different encoder to gain the performance, unfortunately I am not that familiar with grey input JPEG encoders.