pub unsafe extern "C" fn tj3DecodeYUVPlanes8(
    handle: tjhandle,
    srcPlanes: *const *const c_uchar,
    strides: *const c_int,
    dstBuf: *mut c_uchar,
    width: c_int,
    pitch: c_int,
    height: c_int,
    pixelFormat: c_int
) -> c_int
Expand description

Decode a set of 8-bit-per-sample Y, U (Cb), and V (Cr) image planes into an 8-bit-per-sample packed-pixel RGB or grayscale image. This function performs color conversion (which is accelerated in the libjpeg-turbo implementation) but does not execute any of the other steps in the JPEG decompression process.

@param handle handle to a TurboJPEG instance that has been initialized for decompression

@param srcPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes (or just a Y plane, if decoding a grayscale image) that contain a YUV image to be decoded. These planes can be contiguous or non-contiguous in memory. The size of each plane should match the value returned by #tj3YUVPlaneSize() for the given image width, height, strides, and level of chrominance subsampling (see #TJPARAM_SUBSAMP.) Refer to @ref YUVnotes “YUV Image Format Notes” for more details.

@param strides an array of integers, each specifying the number of bytes per row in the corresponding plane of the YUV source image. Setting the stride for any plane to 0 is the same as setting it to the plane width (see @ref YUVnotes “YUV Image Format Notes”.) If strides is NULL, then the strides for all planes will be set to their respective plane widths. You can adjust the strides in order to specify an arbitrary amount of row padding in each plane or to decode a subregion of a larger planar YUV image.

@param dstBuf pointer to a buffer that will receive the packed-pixel decoded image. This buffer should normally be pitch * height bytes in size. However, you can also use this parameter to decode into a specific region of a larger buffer.

@param width width (in pixels) of the source and destination images

@param pitch bytes per row in the destination image. Normally this should be set to width * #tjPixelSize[pixelFormat], if the destination image should be unpadded. (Setting this parameter to 0 is the equivalent of setting it to width * #tjPixelSize[pixelFormat].) However, you can also use this parameter to specify the row alignment/padding of the destination image, to skip rows, or to decode into a specific region of a larger buffer.

@param height height (in pixels) of the source and destination images

@param pixelFormat pixel format of the destination image (see @ref TJPF “Pixel formats”.)

@return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() and #tj3GetErrorCode().)