Function gpujpeg_decoder_init

Source
pub unsafe extern "C" fn gpujpeg_decoder_init(
    decoder: *mut gpujpeg_decoder,
    param: *const gpujpeg_parameters,
    param_image: *const gpujpeg_image_parameters,
) -> c_int
Expand description

Init JPEG decoder for specific image properties

Following properties are relevant:

  • image dimensions, commonent count
  • output pixel format that will be requested
  • interleaving, restart interval, color_space_internal (usually GPUJPEG_YCBCR_BT601_256LVLS)
  • correct subsampling setting

§note

Doesn’t need to be called from user code, buffers will be initialized automatically according to image properties during decompression.

@param decoder Decoder structure @param[in] param Parameters for coder, pointed structure is copied @param[in] param_image Parameters for image data, pointed structure is copied

§return

0 if succeeds, otherwise nonzero