C

Qt Quick Ultralite imagedecoder Example

/****************************************************************************** ** ** Copyright (C) 2024 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 <stdint.h> #include "r_jcua_api.h" #include <platforminterface/imagedecoder.h> #include <v800_ghs.h> #define JCUA_HW_UNIT (0) #ifndef DECODE_BUFFER_PIXEL_LINES //must be multiple of 16 #define DECODE_BUFFER_PIXEL_LINES (16) #endif //must be multiple of 8 bytes #define INPUT_SPLIT_BUFFER_SIZE 2048 #ifndef CHROMA_SUBSAMPLING #define CHROMA_SUBSAMPLING R_JCUA_JPEG_FORMAT_YCBCR420 #endif #ifdef RH850_JPEG_DEBUG_LOGS #define DEBUG_PRINTF(...) qul_printf(__VA_ARGS__) #else #define DEBUG_PRINTF(...) #endif #define CALLBACK_FACTOR_DECODE_INPUT_PAUSED_EVENT_ID (0) #define CALLBACK_FACTOR_DECODE_OUTPUT_PAUSED_EVENT_ID (1) #define CALLBACK_FACTOR_DECODE_COMPLETE_EVENT_ID (2) #define CALLBACK_FACTOR_DECODE_SIZEOVER_EVENT_ID (3) #define CALLBACK_FACTOR_DECODE_ERRORED_EVENT_ID (4) #define CALLBACK_FACTOR_FATAL_ERROR_EVENT_ID (5) #define CALLBACK_FACTOR_HEADER_TIMEOUT_EVENT_ID (6) #define CALLBACK_FACTOR_DECODE_TIMEOUT_EVENT_ID (7) #define SET_EVENT_BIT(x, y) __SET1(&x, y) #define CLEAR_EVENT_BIT(x, y) __CLR1(&x, y) #define EVENT(x, y) __TST1(&x, y) r_jcua_Error_t jpegDecode_Init(); r_jcua_Error_t jpegDecode_Start(Qul::PlatformInterface::ImageDecoder::RequestDataCallback &callback, void *outputBufferAddr, uint32_t outputBufferSize, void *processBuffer, uint32_t outputBufferStride, r_jcua_ImageInfo_t jpegInfo); const uint16_t decodeBuffPixelLines();