Qt Quick Ultralite imagedecoder Example

/****************************************************************************** ** ** Copyright (C) 2023 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Quick Ultralite module. ** ** $QT_BEGIN_LICENSE:COMM$ ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see http://www.qt.io/terms-conditions. For further ** information use the contact form at http://www.qt.io/contact-us. ** ** $QT_END_LICENSE$ ** ******************************************************************************/
#pragma once #include <cstdint> #define CHUNK_SIZE_IN ((uint32_t) (4096)) //Must be multiples of 768 #define CHUNK_SIZE_OUT ((uint32_t) (768)) #define JPEG_BUFFER_EMPTY 0 #define JPEG_BUFFER_FULL 1 #define NB_INPUT_DATA_BUFFERS 2 //Resize this value to allow foreground buffer processing to be synchronous with JPEG hardware #define NB_OUTPUT_DATA_BUFFERS 200 struct JPEG_Data_BufferTypeDef { uint8_t State; uint8_t *DataBuffer; uint32_t DataBufferSize; }; extern JPEG_Data_BufferTypeDef Jpeg_OUT_BufferTab[NB_OUTPUT_DATA_BUFFERS]; extern JPEG_Data_BufferTypeDef Jpeg_IN_BufferTab[NB_INPUT_DATA_BUFFERS]; void initJpegOutputBuffers(void);