Process a JPEG image with the specified decoder instance. This function processes the provided JPEG image data using the specified JPEG decoder instance. The input JPEG image data is specified by the `bit_stream` pointer and the `stream_size` parameter. The resulting decoded image data is written to the `decode_outbuf` buffer, and the length of the output image data is returned through the `out_size` pointer.
Handle of the JPEG decoder instance to use for processing.
decode_cfg
Config structure of decoder.
bit_stream
Pointer to the buffer containing the input JPEG image data.
stream_size
Size of the input JPEG image data in bytes.
decode_outbuf
Pointer to the buffer that will receive the decoded image data.
outbuf_size
The size of `decode_outbuf`
out_size
Pointer to a variable that will receive the length of the output image data.
Return value
- ESP_OK: JPEG decoder process successfully. - ESP_ERR_INVALID_ARG: JPEG decoder process failed because of invalid argument.
Notes
1.Please make sure that the content of `bit_stream` pointer cannot be modified until this function returns. 2.Please note that the output size of image is always the multiple of 16 depends on protocol of JPEG.
Related Functions
Found 2 other functions taking a jpeg_decoder_t
argument:
Acquire a JPEG decode engine with the specified configuration. This function acquires a JPEG decode engine with the specified configuration. The configuration parameters are provided through the `dec_eng_cfg` structure, and the resulting JPEG decoder handle is returned through the `ret_decoder` pointer.
Release resources used by a JPEG decoder instance. This function releases the resources used by the specified JPEG decoder instance. The decoder instance is specified by the `decoder_engine` parameter.
Examples
jpeg_decoder_process() is referenced by 1 libraries and example projects: