GPUJPEG icon indicating copy to clipboard operation
GPUJPEG copied to clipboard

Is there support for pitched (noncontiguous) image?

Open melonedo opened this issue 1 year ago • 1 comments

Thank you for such performant library! While I am using it along with OpenCV's GpuMat, a drawback is that GPUJPEG requires input images to be contiguous with zero gap between rows, while GpuMat by default creates images padded to conform alignments, which requires an extra cudaMemcpy2D call to convert between these. Can GPUJPEG work with pitched image to save this call?

melonedo avatar Jul 22 '24 05:07 melonedo

Hi, unfortunately the short answer is no, it doesn't.

MartinPulec avatar Jul 26 '24 09:07 MartinPulec

Just a question - how is it important for you (if still)?

The point is that it is certainly possible to add the pitch to the pre/postprocessor. From the API point of view it would perhaps be a companion function to gpujpeg_encoder_input_set_image (like _pitched). On the other hand, if it is not much important to you and you don't mind using additional memcpy, we'd consider. It is true that is would be nicer, but it will also enrich the API and add some more lines to care about pre- and postprocessors.

MartinPulec avatar Sep 04 '24 09:09 MartinPulec