Graphics framework for GR-PEACH. When you use this program, we judge you have agreed to the following contents. https://developer.mbed.org/teams/Renesas/wiki/About-LICENSE

Dependents:   ImageZoomInout_Sample ImageRotaion_Sample ImageScroll_Sample GR-PEACH_LCD_4_3inch_Save_to_USB ... more

License

When you use this library, we judge you have agreed to the following contents.

https://developer.mbed.org/teams/Renesas/wiki/About-LICENSE

Note

If you import the GraphicsFramework library, please import GR-PEACH_video library and R_BSP library together.



JPEG Converter

The JPEG Converter driver implements encode and decode functionality which uses the JCU of the RZ/A Series.

Hello World!

Import programJCU_HelloWorld

Hello World for JCU(JPEG Codec Unit). JCU is JPEG codec unit of RZ/A1. When you use this program, we judge you have agreed to the following contents. https://developer.mbed.org/teams/Renesas/wiki/About-LICENSE

API

Import library

Data Structures

struct bitmap_buff_info_t
Bitmap data setting struct. More...
struct encode_options_t
Encode option setting. More...

Public Types

enum jpeg_conv_error_t {
JPEG_CONV_OK = 0, JPEG_CONV_JCU_ERR = -1, JPEG_CONV_FORMA_ERR = -2, JPEG_CONV_PARAM_ERR = -3,
JPEG_CONV_BUSY = -4, JPEG_CONV_PARAM_RANGE_ERR = -7
}

Error codes.

More...
enum wr_rd_swa_t {
WR_RD_WRSWA_NON = 0, WR_RD_WRSWA_8BIT = 1, WR_RD_WRSWA_16BIT = 2, WR_RD_WRSWA_16_8BIT = 3,
WR_RD_WRSWA_32BIT = 4, WR_RD_WRSWA_32_8BIT = 5, WR_RD_WRSWA_32_16BIT = 6, WR_RD_WRSWA_32_16_8BIT = 7
}

Write/Read image pixcel frame buffer swap setting.

More...
enum wr_rd_format_t { WR_RD_YCbCr422 = 0x00, WR_RD_ARGB8888 = 0x01, WR_RD_RGB565 = 0x02 }

Write/Read image pixcel format selects.

More...
enum sub_sampling_t { SUB_SAMPLING_1_1 = 0x00, SUB_SAMPLING_1_2 = 0x01, SUB_SAMPLING_1_4 = 0x02, SUB_SAMPLING_1_8 = 0x03 }

Thinning output image selects.

More...
enum cbcr_offset_t { CBCR_OFFSET_0 = 0x00, CBCR_OFFSET_128 = 0x01 }

Cb/Cr range selects for decode.

More...

Public Member Functions

JPEG_Converter ()
Constructor method of JPEG converter(encode/decode)
virtual ~JPEG_Converter ()
Destructor method of JPEG converter(encode/decode)
JPEG_Converter::jpeg_conv_error_t decode (void *pJpegBuff, bitmap_buff_info_t *psOutputBuff)
Decode JPEG to rinear data.
JPEG_Converter::jpeg_conv_error_t decode (void *pJpegBuff, bitmap_buff_info_t *psOutputBuff, decode_options_t *pOptions)
JPEG data decode to bitmap.
JPEG_Converter::jpeg_conv_error_t encode ( bitmap_buff_info_t *psInputBuff, void *pJpegBuff, size_t *pEncodeSize)
Encode rinear data to JPEG.
JPEG_Converter::jpeg_conv_error_t encode ( bitmap_buff_info_t *psInputBuff, void *pJpegBuff, size_t *pEncodeSize, encode_options_t *pOptions)
Bitmap data encode to JPEG.
JPEG_Converter::jpeg_conv_error_t SetQuality (const uint8_t qual)
Set encode quality.

Correspondence file

A correspondence file of JPEG Converter is as the following table.

JPEGCorrespondence
Width>0(greater than 0)
Height>0(greater than 0)
Color formatYCbCr444, YCbCr422, YCbCr420, YCbCr411
BitmapCorrespondence
Width>0(greater than 0)
Height>0(greater than 0)
Color formatYCbCr422

Notice

You run JPEG converter once destruction each time.

You set whether these JPEG files aren't input, or it check error setting decode(set in "flag" = true). The JPEG file which becomes correspondence outside will be the following condition.

  • File besides the above-mentioned correspondence file.
  • As information in the JPEG file, WIDTH or HEIGHT is larger than output buffer setting.

Buffer area is used encode/decode, set 8 bytes align and non-cash memory area. The output buffer when decoding, is made beyond the size decided in the size of the JPEG file, the format, setting of thinning out. You make output buffer for decode/encode to enough big size in order to stock this result. JPEG Converter, if you do not particularly perform specified, does not check size against the output data at the time of encoding and decoding. You set the output buffer so that there is no effect of corruption by the output data.

Color format

Color format in case to be converted from Bitmap to JPEG is either ARGB8888 or RGB555, YCbCr422. Color format of the If you want to convert from JPEG file to Bitmap file is YCbCr422. You correct "alpha(member of decode_options_t)" of setting and "output_cb_cr_offset(member of decode_options_t)" according to color format when decoding.

  • example
    decode to ARGB8888(WR_RD_ARGB8888 set in format member of bitmap_buff_info_t)
    alpha = 0x01-0xFF
    output_cb_cr_offset = CBCR_OFFSET_0

    decode to YCbCr422(WR_RD_YCbCr422 set in format member of bitmap_buff_info_t)
    alpha = 0
    output_cb_cr_offset = CBCR_OFFSET_0 or CBCR_OFFSET_128

    decode to RGB565(WR_RD_RGB565 set in format member of bitmap_buff_info_t)
    alpha = 0
    output_cb_cr_offset = CBCR_OFFSET_0

Decode/encode settings are optional

If omitted encode/decode settings, it will work with the following settings.
[Decode option setting (member of decode_options_t)]

  • Vertical sub sampling is thinning output image to 1/1.
  • Horizontal sub sampling is thinning output image to 1/1.
  • Output data of Cb/Cr range is -128 to 127.
  • Output data of swap in 8-bit units: 2-1-4-3-6-5-8-7.
  • Alpha value of 0.
  • JPEG format correspondence outside error check.
  • It decode in a synchronous function.

[Encode option setting (member of encode_options_t)]

  • DRI value is 0.
  • Encoding JPEG file start width offset is 0.
  • Encoding JPEG file start height offset is 0.
  • Input data of Cb/Cr range of input data is -128 to 127.
  • Input data swap in 8-bit units: 2-1-4-3-6-5-8-7.
  • It don't check encode size.
  • Quantization Y use default table(Quality75).
  • Quantization C use default table(Quality75).
  • Huffman Y DC use default table.
  • Huffman C DC use default table.
  • Huffman Y AC use default table.
  • Huffman C AC use default table.
  • It encode in a synchronous function.

Synchronous/asynchronous switching

Decoding and encoding setting to operate asynchronously by setting a callback function(decode_options_t and encode_options_t).

Quality

Quality changes are possible. If you want to change the Quality, please specify the table made of Quality you want to change the address of the setting. If you do not want to change the Quality, it will operate at Quality75.

RGA

The RGA library implements fast drawing functionality which uses the RGA of the RZ/A Series.
Supporting compiler is ARMCC, GCC ARM and IAR.

Hello World!

Import programRGA_HelloWorld

Hello World for RGA(Renesas Graphics Architecture). RGA is the Graphics Library of RZ/A1. When you use this program, we judge you have agreed to the following contents. https://developer.mbed.org/teams/Renesas/wiki/About-LICENSE

Committer:
dkato
Date:
Mon Apr 24 08:16:23 2017 +0000
Revision:
13:1ee2176ef13f
Parent:
0:37e1e6a45ced
Add "SetQuality()" to JCU.
; Bug fixes.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dkato 0:37e1e6a45ced 1 /*******************************************************************************
dkato 0:37e1e6a45ced 2 * DISCLAIMER
dkato 0:37e1e6a45ced 3 * This software is supplied by Renesas Electronics Corporation and is only
dkato 0:37e1e6a45ced 4 * intended for use with Renesas products. No other uses are authorized. This
dkato 0:37e1e6a45ced 5 * software is owned by Renesas Electronics Corporation and is protected under
dkato 0:37e1e6a45ced 6 * all applicable laws, including copyright laws.
dkato 0:37e1e6a45ced 7 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
dkato 0:37e1e6a45ced 8 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
dkato 0:37e1e6a45ced 9 * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
dkato 0:37e1e6a45ced 10 * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
dkato 0:37e1e6a45ced 11 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
dkato 0:37e1e6a45ced 12 * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
dkato 0:37e1e6a45ced 13 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
dkato 0:37e1e6a45ced 14 * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
dkato 0:37e1e6a45ced 15 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
dkato 0:37e1e6a45ced 16 * Renesas reserves the right, without notice, to make changes to this software
dkato 0:37e1e6a45ced 17 * and to discontinue the availability of this software. By using this software,
dkato 0:37e1e6a45ced 18 * you agree to the additional terms and conditions found by accessing the
dkato 0:37e1e6a45ced 19 * following link:
dkato 0:37e1e6a45ced 20 * http://www.renesas.com/disclaimer
dkato 0:37e1e6a45ced 21 * Copyright (C) 2012 - 2015 Renesas Electronics Corporation. All rights reserved.
dkato 0:37e1e6a45ced 22 *******************************************************************************/
dkato 0:37e1e6a45ced 23 /**
dkato 0:37e1e6a45ced 24 * @file r_jcu_api.h
dkato 0:37e1e6a45ced 25 * @brief JCU (JPEG hardware) driver API. Main Header.
dkato 0:37e1e6a45ced 26 *
dkato 0:37e1e6a45ced 27 * $Module: JCU $ $PublicVersion: 1.00 $ (=JCU_VERSION)
dkato 0:37e1e6a45ced 28 * $Rev: 38 $
dkato 0:37e1e6a45ced 29 * $Date:: 2014-03-18 16:14:45 +0900#$
dkato 0:37e1e6a45ced 30 */
dkato 0:37e1e6a45ced 31
dkato 0:37e1e6a45ced 32 #ifndef JCU_API_H_
dkato 0:37e1e6a45ced 33 #define JCU_API_H_
dkato 0:37e1e6a45ced 34
dkato 0:37e1e6a45ced 35 /******************************************************************************
dkato 0:37e1e6a45ced 36 Includes <System Includes> , "Project Includes"
dkato 0:37e1e6a45ced 37 ******************************************************************************/
dkato 0:37e1e6a45ced 38 #include <stddef.h>
dkato 0:37e1e6a45ced 39 #include "r_jcu_user.h"
dkato 0:37e1e6a45ced 40 #include "r_ospl.h"
dkato 0:37e1e6a45ced 41 #ifdef __cplusplus
dkato 0:37e1e6a45ced 42 extern "C"
dkato 0:37e1e6a45ced 43 {
dkato 0:37e1e6a45ced 44 #endif /* __cplusplus */
dkato 0:37e1e6a45ced 45
dkato 0:37e1e6a45ced 46 /******************************************************************************
dkato 0:37e1e6a45ced 47 Typedef definitions
dkato 0:37e1e6a45ced 48 ******************************************************************************/
dkato 0:37e1e6a45ced 49
dkato 0:37e1e6a45ced 50 /**
dkato 0:37e1e6a45ced 51 * @enum jcu_status_information_t
dkato 0:37e1e6a45ced 52 * @brief Status
dkato 0:37e1e6a45ced 53 *
dkato 0:37e1e6a45ced 54 * - JCU_STATUS_UNDEF - 0x00, Undefined
dkato 0:37e1e6a45ced 55 * - JCU_STATUS_INIT - 0x01, Initialized
dkato 0:37e1e6a45ced 56 * - JCU_STATUS_SELECTED - 0x02, Codec is selected
dkato 0:37e1e6a45ced 57 * - JCU_STATUS_READY - 0x08, Ready
dkato 0:37e1e6a45ced 58 * - JCU_STATUS_RUN - 0x10, Run
dkato 0:37e1e6a45ced 59 * - JCU_STATUS_INTERRUPTING - 0x40, Interrupting
dkato 0:37e1e6a45ced 60 * - JCU_STATUS_INTERRUPTED - 0x80, Interrupted
dkato 0:37e1e6a45ced 61 */
dkato 0:37e1e6a45ced 62 typedef enum {
dkato 0:37e1e6a45ced 63 JCU_STATUS_UNDEF = 0x00,
dkato 0:37e1e6a45ced 64 JCU_STATUS_INIT = 0x01,
dkato 0:37e1e6a45ced 65 JCU_STATUS_SELECTED = 0x02,
dkato 0:37e1e6a45ced 66 JCU_STATUS_READY = 0x08,
dkato 0:37e1e6a45ced 67 JCU_STATUS_RUN = 0x10,
dkato 0:37e1e6a45ced 68 JCU_STATUS_INTERRUPTING = 0x40,
dkato 0:37e1e6a45ced 69 JCU_STATUS_INTERRUPTED = 0x80
dkato 0:37e1e6a45ced 70 } jcu_status_information_t;
dkato 0:37e1e6a45ced 71
dkato 0:37e1e6a45ced 72
dkato 0:37e1e6a45ced 73 /**
dkato 0:37e1e6a45ced 74 * @struct jcu_async_status_t
dkato 0:37e1e6a45ced 75 * @brief Status of asynchronize
dkato 0:37e1e6a45ced 76 */
dkato 0:37e1e6a45ced 77 typedef struct st_jcu_async_status_t jcu_async_status_t;
dkato 0:37e1e6a45ced 78 struct st_jcu_async_status_t {
dkato 0:37e1e6a45ced 79 jcu_status_information_t Status;
dkato 0:37e1e6a45ced 80 bit_flags_fast32_t SubStatusFlags;
dkato 0:37e1e6a45ced 81 bool_t IsPaused;
dkato 0:37e1e6a45ced 82 bool_t IsEnabledInterrupt;
dkato 0:37e1e6a45ced 83 r_ospl_flag32_t InterruptEnables;
dkato 0:37e1e6a45ced 84 r_ospl_flag32_t InterruptFlags;
dkato 0:37e1e6a45ced 85 r_ospl_flag32_t CancelFlags; /*<r_ospl_cancel_flag_t>*/
dkato 0:37e1e6a45ced 86 };
dkato 0:37e1e6a45ced 87
dkato 0:37e1e6a45ced 88
dkato 0:37e1e6a45ced 89 /* Section: Global */
dkato 0:37e1e6a45ced 90 /**
dkato 0:37e1e6a45ced 91 * @enum SubStatusFlags
dkato 0:37e1e6a45ced 92 * @brief Sub Status
dkato 0:37e1e6a45ced 93 *
dkato 0:37e1e6a45ced 94 * - JCU_SUB_INFOMATION_READY - 0x00000008
dkato 0:37e1e6a45ced 95 * - JCU_SUB_DECODE_OUTPUT_PAUSE - 0x00000100
dkato 0:37e1e6a45ced 96 * - JCU_SUB_DECODE_INPUT_PAUSE - 0x00000200
dkato 0:37e1e6a45ced 97 * - JCU_SUB_ENCODE_OUTPUT_PAUSE - 0x00001000
dkato 0:37e1e6a45ced 98 * - JCU_SUB_ENCODE_INPUT_PAUSE - 0x00002000
dkato 0:37e1e6a45ced 99 */
dkato 0:37e1e6a45ced 100 #define JCU_SUB_INFOMATION_READY 0x00000008
dkato 0:37e1e6a45ced 101 #define JCU_SUB_DECODE_OUTPUT_PAUSE 0x00000100
dkato 0:37e1e6a45ced 102 #define JCU_SUB_DECODE_INPUT_PAUSE 0x00000200
dkato 0:37e1e6a45ced 103 #define JCU_SUB_ENCODE_OUTPUT_PAUSE 0x00001000
dkato 0:37e1e6a45ced 104 #define JCU_SUB_ENCODE_INPUT_PAUSE 0x00002000
dkato 0:37e1e6a45ced 105
dkato 0:37e1e6a45ced 106
dkato 0:37e1e6a45ced 107 /**
dkato 0:37e1e6a45ced 108 * @def jcu_interrupt_line_t
dkato 0:37e1e6a45ced 109 * @brief Interrupt Lines
dkato 0:37e1e6a45ced 110 *
dkato 0:37e1e6a45ced 111 * - JCU_INTERRUPT_LINE_JEDI - 1
dkato 0:37e1e6a45ced 112 * - JCU_INTERRUPT_LINE_JDTI - 2
dkato 0:37e1e6a45ced 113 * - JCU_INTERRUPT_LINE_ALL - 1 | 2
dkato 0:37e1e6a45ced 114 */
dkato 0:37e1e6a45ced 115 typedef uint_fast32_t jcu_interrupt_line_t;
dkato 0:37e1e6a45ced 116 #define JCU_INTERRUPT_LINE_JEDI 0x00000001u
dkato 0:37e1e6a45ced 117 #define JCU_INTERRUPT_LINE_JDTI 0x00000002u
dkato 0:37e1e6a45ced 118 #define JCU_INTERRUPT_LINE_ALL \
dkato 0:37e1e6a45ced 119 ( JCU_INTERRUPT_LINE_JEDI | JCU_INTERRUPT_LINE_JDTI )
dkato 0:37e1e6a45ced 120
dkato 0:37e1e6a45ced 121
dkato 0:37e1e6a45ced 122 /**
dkato 0:37e1e6a45ced 123 * @typedef jcu_interrupt_lines_t
dkato 0:37e1e6a45ced 124 * @brief Bit flags of <jcu_interrupt_line_t>
dkato 0:37e1e6a45ced 125 */
dkato 0:37e1e6a45ced 126 typedef bit_flags_fast32_t /*<jcu_interrupt_line_t>*/ jcu_interrupt_lines_t;
dkato 0:37e1e6a45ced 127
dkato 0:37e1e6a45ced 128
dkato 0:37e1e6a45ced 129 /******************************************************************************
dkato 0:37e1e6a45ced 130 Macro definitions
dkato 0:37e1e6a45ced 131 ******************************************************************************/
dkato 0:37e1e6a45ced 132
dkato 0:37e1e6a45ced 133
dkato 0:37e1e6a45ced 134 /**
dkato 0:37e1e6a45ced 135 * @def JCU_VERSION
dkato 0:37e1e6a45ced 136 * @brief VERSION
dkato 0:37e1e6a45ced 137 * @par Parameters
dkato 0:37e1e6a45ced 138 * None
dkato 0:37e1e6a45ced 139 * @return None.
dkato 0:37e1e6a45ced 140 */
dkato 0:37e1e6a45ced 141 #define JCU_VERSION 100
dkato 0:37e1e6a45ced 142
dkato 0:37e1e6a45ced 143
dkato 0:37e1e6a45ced 144 /**
dkato 0:37e1e6a45ced 145 * @def JCU_VERSION_STRING
dkato 0:37e1e6a45ced 146 * @brief String of <JCU_VERSION>
dkato 0:37e1e6a45ced 147 * @par Parameters
dkato 0:37e1e6a45ced 148 * None
dkato 0:37e1e6a45ced 149 * @return None.
dkato 0:37e1e6a45ced 150 */
dkato 0:37e1e6a45ced 151 #define JCU_VERSION_STRING "1.00"
dkato 0:37e1e6a45ced 152
dkato 0:37e1e6a45ced 153
dkato 0:37e1e6a45ced 154 /**
dkato 0:37e1e6a45ced 155 * @def JCU_INT_TYPE_NUM
dkato 0:37e1e6a45ced 156 * @brief The number of the interrupt source
dkato 0:37e1e6a45ced 157 * @par Parameters
dkato 0:37e1e6a45ced 158 * None
dkato 0:37e1e6a45ced 159 * @return None.
dkato 0:37e1e6a45ced 160 */
dkato 0:37e1e6a45ced 161 #define JCU_INT_TYPE_NUM 0x0009
dkato 0:37e1e6a45ced 162
dkato 0:37e1e6a45ced 163
dkato 0:37e1e6a45ced 164 /**
dkato 0:37e1e6a45ced 165 * @def JCU_COLOR_ELEMENT_NUM
dkato 0:37e1e6a45ced 166 * @brief Y,Cb and Cr
dkato 0:37e1e6a45ced 167 * @par Parameters
dkato 0:37e1e6a45ced 168 * None
dkato 0:37e1e6a45ced 169 * @return None.
dkato 0:37e1e6a45ced 170 */
dkato 0:37e1e6a45ced 171 #define JCU_COLOR_ELEMENT_NUM 3
dkato 0:37e1e6a45ced 172
dkato 0:37e1e6a45ced 173
dkato 0:37e1e6a45ced 174 /******************************************************************************
dkato 0:37e1e6a45ced 175 Struct & Enum definitions
dkato 0:37e1e6a45ced 176 ******************************************************************************/
dkato 0:37e1e6a45ced 177
dkato 0:37e1e6a45ced 178 /**
dkato 0:37e1e6a45ced 179 * @enum jcu_errorcode_t
dkato 0:37e1e6a45ced 180 * @brief Error code of JCU driver
dkato 0:37e1e6a45ced 181 *
dkato 0:37e1e6a45ced 182 * - JCU_ERROR_OK - 0
dkato 0:37e1e6a45ced 183 * - JCU_ERROR_PARAM - 0x4501
dkato 0:37e1e6a45ced 184 * - JCU_ERROR_STATUS - 0x4502
dkato 0:37e1e6a45ced 185 * - JCU_ERROR_CODEC_TYPE - 0x4503
dkato 0:37e1e6a45ced 186 * - JCU_ERROR_LIMITATION - 0x4504
dkato 0:37e1e6a45ced 187 */
dkato 0:37e1e6a45ced 188 enum { E_CATEGORY_JCU_ERR = 0x4500 }; /* Offset of JCU error code */
dkato 0:37e1e6a45ced 189 typedef errnum_t jcu_errorcode_t;
dkato 0:37e1e6a45ced 190 enum {
dkato 0:37e1e6a45ced 191 JCU_ERROR_OK = 0x0000,
dkato 0:37e1e6a45ced 192 JCU_ERROR_PARAM = 0x4501,
dkato 0:37e1e6a45ced 193 JCU_ERROR_STATUS = 0x4502,
dkato 0:37e1e6a45ced 194 JCU_ERROR_CODEC_TYPE = 0x4503,
dkato 0:37e1e6a45ced 195 JCU_ERROR_LIMITATION = 0x4504
dkato 0:37e1e6a45ced 196 };
dkato 0:37e1e6a45ced 197
dkato 0:37e1e6a45ced 198
dkato 0:37e1e6a45ced 199 /**
dkato 0:37e1e6a45ced 200 * @enum jcu_detail_error_t
dkato 0:37e1e6a45ced 201 * @brief Kind of detailed error for decoding
dkato 0:37e1e6a45ced 202 *
dkato 0:37e1e6a45ced 203 * - JCU_JCDERR_OK - 0x0000
dkato 0:37e1e6a45ced 204 * - JCU_JCDERR_SOI_NOT_FOUND - 0x4521
dkato 0:37e1e6a45ced 205 * - JCU_JCDERR_INVALID_SOF - 0x4522
dkato 0:37e1e6a45ced 206 * - JCU_JCDERR_UNPROVIDED_SOF - 0x4523
dkato 0:37e1e6a45ced 207 * - JCU_JCDERR_SOF_ACCURACY - 0x4524
dkato 0:37e1e6a45ced 208 * - JCU_JCDERR_DQT_ACCURACY - 0x4525
dkato 0:37e1e6a45ced 209 * - JCU_JCDERR_COMPONENT_1 - 0x4526
dkato 0:37e1e6a45ced 210 * - JCU_JCDERR_COMPONENT_2 - 0x4527
dkato 0:37e1e6a45ced 211 * - JCU_JCDERR_NO_SOF0_DQT_DHT - 0x4528
dkato 0:37e1e6a45ced 212 * - JCU_JCDERR_SOS_NOT_FOUND - 0x4529
dkato 0:37e1e6a45ced 213 * - JCU_JCDERR_EOI_NOT_FOUND - 0x452A
dkato 0:37e1e6a45ced 214 * - JCU_JCDERR_RESTART_INTERVAL - 0x452B
dkato 0:37e1e6a45ced 215 * - JCU_JCDERR_IMAGE_SIZE - 0x452C
dkato 0:37e1e6a45ced 216 * - JCU_JCDERR_LAST_MCU_DATA - 0x452D
dkato 0:37e1e6a45ced 217 * - JCU_JCDERR_BLOCK_DATA - 0x452E
dkato 0:37e1e6a45ced 218 */
dkato 0:37e1e6a45ced 219 enum { E_CATEGORY_JCU_JCDERR = 0x4520 }; /* Offset of JCU detail error code */
dkato 0:37e1e6a45ced 220 typedef errnum_t jcu_detail_error_t;
dkato 0:37e1e6a45ced 221 enum {
dkato 0:37e1e6a45ced 222 JCU_JCDERR_OK = 0x0000,
dkato 0:37e1e6a45ced 223 JCU_JCDERR_SOI_NOT_FOUND = 0x4521,
dkato 0:37e1e6a45ced 224 JCU_JCDERR_INVALID_SOF = 0x4522,
dkato 0:37e1e6a45ced 225 JCU_JCDERR_UNPROVIDED_SOF = 0x4523,
dkato 0:37e1e6a45ced 226 JCU_JCDERR_SOF_ACCURACY = 0x4524,
dkato 0:37e1e6a45ced 227 JCU_JCDERR_DQT_ACCURACY = 0x4525,
dkato 0:37e1e6a45ced 228 JCU_JCDERR_COMPONENT_1 = 0x4526,
dkato 0:37e1e6a45ced 229 JCU_JCDERR_COMPONENT_2 = 0x4527,
dkato 0:37e1e6a45ced 230 JCU_JCDERR_NO_SOF0_DQT_DHT = 0x4528,
dkato 0:37e1e6a45ced 231 JCU_JCDERR_SOS_NOT_FOUND = 0x4529,
dkato 0:37e1e6a45ced 232 JCU_JCDERR_EOI_NOT_FOUND = 0x452A,
dkato 0:37e1e6a45ced 233 JCU_JCDERR_RESTART_INTERVAL = 0x452B,
dkato 0:37e1e6a45ced 234 JCU_JCDERR_IMAGE_SIZE = 0x452C,
dkato 0:37e1e6a45ced 235 JCU_JCDERR_LAST_MCU_DATA = 0x452D,
dkato 0:37e1e6a45ced 236 JCU_JCDERR_BLOCK_DATA = 0x452E
dkato 0:37e1e6a45ced 237 };
dkato 0:37e1e6a45ced 238
dkato 0:37e1e6a45ced 239
dkato 0:37e1e6a45ced 240 /**
dkato 0:37e1e6a45ced 241 * @enum jcu_codec_t
dkato 0:37e1e6a45ced 242 * @brief The type of codec
dkato 0:37e1e6a45ced 243 *
dkato 0:37e1e6a45ced 244 * - JCU_ENCODE - 0
dkato 0:37e1e6a45ced 245 * - JCU_DECODE - 1
dkato 0:37e1e6a45ced 246 */
dkato 0:37e1e6a45ced 247 typedef enum {
dkato 0:37e1e6a45ced 248 JCU_ENCODE = 0,
dkato 0:37e1e6a45ced 249 JCU_DECODE = 1
dkato 0:37e1e6a45ced 250 } jcu_codec_t;
dkato 0:37e1e6a45ced 251
dkato 0:37e1e6a45ced 252
dkato 0:37e1e6a45ced 253 /**
dkato 0:37e1e6a45ced 254 * @struct jcu_count_mode_param_t
dkato 0:37e1e6a45ced 255 * @brief Buffer settings for separating decode or encode
dkato 0:37e1e6a45ced 256 */
dkato 0:37e1e6a45ced 257 typedef struct {
dkato 0:37e1e6a45ced 258 struct {
dkato 0:37e1e6a45ced 259 /** true: It uses the count mode process. */
dkato 0:37e1e6a45ced 260 bool_t isEnable;
dkato 0:37e1e6a45ced 261
dkato 0:37e1e6a45ced 262 /** Address is changed when processing is stopped. */
dkato 0:37e1e6a45ced 263 bool_t isInitAddress;
dkato 0:37e1e6a45ced 264
dkato 0:37e1e6a45ced 265 /** This is enable when isInitAddrss is true. */
dkato 0:37e1e6a45ced 266 uint32_t *restartAddress;
dkato 0:37e1e6a45ced 267
dkato 0:37e1e6a45ced 268 /** Encode:8line Decode:8byte. */
dkato 0:37e1e6a45ced 269 uint32_t dataCount;
dkato 0:37e1e6a45ced 270
dkato 0:37e1e6a45ced 271 } inputBuffer;
dkato 0:37e1e6a45ced 272
dkato 0:37e1e6a45ced 273 struct {
dkato 0:37e1e6a45ced 274 /** true: It uses the count mode process. */
dkato 0:37e1e6a45ced 275 bool_t isEnable;
dkato 0:37e1e6a45ced 276
dkato 0:37e1e6a45ced 277 /** Address is changed when processing is stopped. */
dkato 0:37e1e6a45ced 278 bool_t isInitAddress; /* */
dkato 0:37e1e6a45ced 279
dkato 0:37e1e6a45ced 280 /** This is enable when isInitAddress is true. */
dkato 0:37e1e6a45ced 281 uint32_t *restartAddress; /* */
dkato 0:37e1e6a45ced 282
dkato 0:37e1e6a45ced 283 /** Encode:8byte Decode:8line. */
dkato 0:37e1e6a45ced 284 uint32_t dataCount;
dkato 0:37e1e6a45ced 285
dkato 0:37e1e6a45ced 286 } outputBuffer;
dkato 0:37e1e6a45ced 287 } jcu_count_mode_param_t;
dkato 0:37e1e6a45ced 288
dkato 0:37e1e6a45ced 289
dkato 0:37e1e6a45ced 290 /* Section: Global */
dkato 0:37e1e6a45ced 291 /**
dkato 0:37e1e6a45ced 292 * @enum jcu_continue_type_t
dkato 0:37e1e6a45ced 293 * @brief Type of continue buffer
dkato 0:37e1e6a45ced 294 *
dkato 0:37e1e6a45ced 295 * - JCU_INPUT_BUFFER - 0
dkato 0:37e1e6a45ced 296 * - JCU_OUTPUT_BUFFER - 1
dkato 0:37e1e6a45ced 297 * - JCU_IMAGE_INFO - 2
dkato 0:37e1e6a45ced 298 */
dkato 0:37e1e6a45ced 299 typedef enum {
dkato 0:37e1e6a45ced 300 JCU_INPUT_BUFFER,
dkato 0:37e1e6a45ced 301 JCU_OUTPUT_BUFFER,
dkato 0:37e1e6a45ced 302 JCU_IMAGE_INFO
dkato 0:37e1e6a45ced 303 } jcu_continue_type_t;
dkato 0:37e1e6a45ced 304
dkato 0:37e1e6a45ced 305
dkato 0:37e1e6a45ced 306 /**
dkato 0:37e1e6a45ced 307 * @def jcu_int_detail_error_t
dkato 0:37e1e6a45ced 308 * @brief Bit flags of detail error
dkato 0:37e1e6a45ced 309 *
dkato 0:37e1e6a45ced 310 * - JCU_INT_ERROR_RESTART_INTERVAL_DATA - INT7_MASK
dkato 0:37e1e6a45ced 311 * - JCU_INT_ERROR_SEGMENT_TOTAL_DATA - INT6_MASK
dkato 0:37e1e6a45ced 312 * - JCU_INT_ERROR_MCU_BLOCK_DATA - INT5_MASK
dkato 0:37e1e6a45ced 313 * - JCU_INT_ERROR_ALL - e.g. for mask
dkato 0:37e1e6a45ced 314 */
dkato 0:37e1e6a45ced 315 typedef uint_fast32_t jcu_int_detail_error_t;
dkato 0:37e1e6a45ced 316 #define JCU_INT_ERROR_RESTART_INTERVAL_DATA (0x80u)
dkato 0:37e1e6a45ced 317 #define JCU_INT_ERROR_SEGMENT_TOTAL_DATA (0x40u)
dkato 0:37e1e6a45ced 318 #define JCU_INT_ERROR_MCU_BLOCK_DATA (0x20u)
dkato 0:37e1e6a45ced 319 #define JCU_INT_ERROR_ALL \
dkato 0:37e1e6a45ced 320 ( JCU_INT_ERROR_RESTART_INTERVAL_DATA | JCU_INT_ERROR_SEGMENT_TOTAL_DATA | \
dkato 0:37e1e6a45ced 321 JCU_INT_ERROR_MCU_BLOCK_DATA )
dkato 0:37e1e6a45ced 322
dkato 0:37e1e6a45ced 323
dkato 0:37e1e6a45ced 324 /**
dkato 0:37e1e6a45ced 325 * @typedef jcu_int_detail_errors_t
dkato 0:37e1e6a45ced 326 * @brief Bit flags of detail error
dkato 0:37e1e6a45ced 327 */
dkato 0:37e1e6a45ced 328 typedef bit_flags_fast32_t /*<jcu_int_detail_error_t>*/ jcu_int_detail_errors_t;
dkato 0:37e1e6a45ced 329
dkato 0:37e1e6a45ced 330
dkato 0:37e1e6a45ced 331 /**
dkato 0:37e1e6a45ced 332 * @enum jcu_swap_t
dkato 0:37e1e6a45ced 333 * @brief SampleEnum
dkato 0:37e1e6a45ced 334 *
dkato 0:37e1e6a45ced 335 * - SymbolA - 0, NULL
dkato 0:37e1e6a45ced 336 * - SymbolB - 1
dkato 0:37e1e6a45ced 337 */
dkato 0:37e1e6a45ced 338 typedef int_t jcu_swap_t;
dkato 0:37e1e6a45ced 339 #define JCU_SWAP_NONE (0x00)
dkato 0:37e1e6a45ced 340 #define JCU_SWAP_BYTE (0x01)
dkato 0:37e1e6a45ced 341 #define JCU_SWAP_WORD (0x02)
dkato 0:37e1e6a45ced 342 #define JCU_SWAP_WORD_AND_BYTE (0x03)
dkato 0:37e1e6a45ced 343 #define JCU_SWAP_LONG_WORD (0x04)
dkato 0:37e1e6a45ced 344 #define JCU_SWAP_LONG_WORD_AND_BYTE (0x05)
dkato 0:37e1e6a45ced 345 #define JCU_SWAP_LONG_WORD_AND_WORD (0x06)
dkato 0:37e1e6a45ced 346 #define JCU_SWAP_LONG_WORD_AND_WORD_AND_BYTE (0x07)
dkato 0:37e1e6a45ced 347
dkato 0:37e1e6a45ced 348
dkato 0:37e1e6a45ced 349 /**
dkato 0:37e1e6a45ced 350 * @struct jcu_buffer_t
dkato 0:37e1e6a45ced 351 * @brief Buffer settings
dkato 0:37e1e6a45ced 352 */
dkato 0:37e1e6a45ced 353 typedef struct {
dkato 0:37e1e6a45ced 354 jcu_swap_t swapSetting;
dkato 0:37e1e6a45ced 355 uint32_t *address;
dkato 0:37e1e6a45ced 356 } jcu_buffer_t;
dkato 0:37e1e6a45ced 357
dkato 0:37e1e6a45ced 358
dkato 0:37e1e6a45ced 359 /**
dkato 0:37e1e6a45ced 360 * @struct jcu_buffer_param_t
dkato 0:37e1e6a45ced 361 * @brief Buffer parameter for input and output
dkato 0:37e1e6a45ced 362 */
dkato 0:37e1e6a45ced 363 typedef struct {
dkato 0:37e1e6a45ced 364 jcu_buffer_t source;
dkato 0:37e1e6a45ced 365 jcu_buffer_t destination;
dkato 0:37e1e6a45ced 366 int16_t lineOffset;
dkato 0:37e1e6a45ced 367 } jcu_buffer_param_t;
dkato 0:37e1e6a45ced 368
dkato 0:37e1e6a45ced 369
dkato 0:37e1e6a45ced 370 /* Section: Global */
dkato 0:37e1e6a45ced 371 /**
dkato 0:37e1e6a45ced 372 * @enum jcu_sub_sampling_t
dkato 0:37e1e6a45ced 373 * @brief Sub sampling settings for decoding
dkato 0:37e1e6a45ced 374 *
dkato 0:37e1e6a45ced 375 * - JCU_SUB_SAMPLING_1_1 - 0x00 = 1/1
dkato 0:37e1e6a45ced 376 * - JCU_SUB_SAMPLING_1_2 - 0x01 = 1/2
dkato 0:37e1e6a45ced 377 * - JCU_SUB_SAMPLING_1_4 - 0x02 = 1/4
dkato 0:37e1e6a45ced 378 * - JCU_SUB_SAMPLING_1_8 - 0x03 = 1/8
dkato 0:37e1e6a45ced 379 */
dkato 0:37e1e6a45ced 380 typedef enum {
dkato 0:37e1e6a45ced 381 JCU_SUB_SAMPLING_1_1 = 0x00,
dkato 0:37e1e6a45ced 382 JCU_SUB_SAMPLING_1_2 = 0x01,
dkato 0:37e1e6a45ced 383 JCU_SUB_SAMPLING_1_4 = 0x02,
dkato 0:37e1e6a45ced 384 JCU_SUB_SAMPLING_1_8 = 0x03
dkato 0:37e1e6a45ced 385 } jcu_sub_sampling_t;
dkato 0:37e1e6a45ced 386
dkato 0:37e1e6a45ced 387
dkato 0:37e1e6a45ced 388 /**
dkato 0:37e1e6a45ced 389 * @enum jcu_decode_format_t
dkato 0:37e1e6a45ced 390 * @brief Kind of pixel format can process the decoding
dkato 0:37e1e6a45ced 391 *
dkato 0:37e1e6a45ced 392 * - JCU_OUTPUT_YCbCr422 - 0x00
dkato 0:37e1e6a45ced 393 * - JCU_OUTPUT_ARGB8888 - 0x01
dkato 0:37e1e6a45ced 394 * - JCU_OUTPUT_RGB565 - 0x02
dkato 0:37e1e6a45ced 395 */
dkato 0:37e1e6a45ced 396 typedef enum {
dkato 0:37e1e6a45ced 397 JCU_OUTPUT_YCbCr422 = 0x00,
dkato 0:37e1e6a45ced 398 JCU_OUTPUT_ARGB8888 = 0x01,
dkato 0:37e1e6a45ced 399 JCU_OUTPUT_RGB565 = 0x02
dkato 0:37e1e6a45ced 400 } jcu_decode_format_t;
dkato 0:37e1e6a45ced 401
dkato 0:37e1e6a45ced 402
dkato 0:37e1e6a45ced 403 /**
dkato 0:37e1e6a45ced 404 * @enum jcu_cbcr_offset_t
dkato 0:37e1e6a45ced 405 * @brief Cb/Cr offset
dkato 0:37e1e6a45ced 406 *
dkato 0:37e1e6a45ced 407 * - JCU_CBCR_OFFSET_0 - 0 = No offset
dkato 0:37e1e6a45ced 408 * - JCU_CBCR_OFFSET_128 - 1 = +128 offset
dkato 0:37e1e6a45ced 409 */
dkato 0:37e1e6a45ced 410 typedef enum {
dkato 0:37e1e6a45ced 411 JCU_CBCR_OFFSET_0 = 0,
dkato 0:37e1e6a45ced 412 JCU_CBCR_OFFSET_128 = 1
dkato 0:37e1e6a45ced 413 } jcu_cbcr_offset_t;
dkato 0:37e1e6a45ced 414
dkato 0:37e1e6a45ced 415
dkato 0:37e1e6a45ced 416 /**
dkato 0:37e1e6a45ced 417 * @enum jcu_jpeg_format_t
dkato 0:37e1e6a45ced 418 * @brief Kind of pixel format for the jpeg file format when decoding
dkato 0:37e1e6a45ced 419 *
dkato 0:37e1e6a45ced 420 * - JCU_JPEG_YCbCr444 - 0
dkato 0:37e1e6a45ced 421 * - JCU_JPEG_YCbCr422 - 1
dkato 0:37e1e6a45ced 422 * - JCU_JPEG_YCbCr420 - 2
dkato 0:37e1e6a45ced 423 * - JCU_JPEG_YCbCr411 - 6
dkato 0:37e1e6a45ced 424 */
dkato 0:37e1e6a45ced 425 typedef enum {
dkato 0:37e1e6a45ced 426 JCU_JPEG_YCbCr444 = 0x00,
dkato 0:37e1e6a45ced 427 JCU_JPEG_YCbCr422 = 0x01,
dkato 0:37e1e6a45ced 428 JCU_JPEG_YCbCr420 = 0x02,
dkato 0:37e1e6a45ced 429 JCU_JPEG_YCbCr411 = 0x06
dkato 0:37e1e6a45ced 430 } jcu_jpeg_format_t;
dkato 0:37e1e6a45ced 431
dkato 0:37e1e6a45ced 432
dkato 0:37e1e6a45ced 433 /**
dkato 0:37e1e6a45ced 434 * @struct jcu_image_info_t
dkato 0:37e1e6a45ced 435 * @brief Image information data store variable
dkato 0:37e1e6a45ced 436 */
dkato 0:37e1e6a45ced 437 typedef struct {
dkato 0:37e1e6a45ced 438 uint32_t width;
dkato 0:37e1e6a45ced 439 uint32_t height;
dkato 0:37e1e6a45ced 440 jcu_jpeg_format_t encodedFormat;
dkato 0:37e1e6a45ced 441 } jcu_image_info_t;
dkato 0:37e1e6a45ced 442
dkato 0:37e1e6a45ced 443
dkato 0:37e1e6a45ced 444 /* Section: Global */
dkato 0:37e1e6a45ced 445 /**
dkato 0:37e1e6a45ced 446 * @enum jcu_table_no_t
dkato 0:37e1e6a45ced 447 * @brief The index of the table
dkato 0:37e1e6a45ced 448 *
dkato 0:37e1e6a45ced 449 * - JCU_TABLE_NO_0 - 0
dkato 0:37e1e6a45ced 450 * - JCU_TABLE_NO_1 - 1
dkato 0:37e1e6a45ced 451 * - JCU_TABLE_NO_2 - 2
dkato 0:37e1e6a45ced 452 * - JCU_TABLE_NO_3 - 3
dkato 0:37e1e6a45ced 453 */
dkato 0:37e1e6a45ced 454 typedef enum {
dkato 0:37e1e6a45ced 455 JCU_TABLE_NO_0 = 0,
dkato 0:37e1e6a45ced 456 JCU_TABLE_NO_1 = 1,
dkato 0:37e1e6a45ced 457 JCU_TABLE_NO_2 = 2,
dkato 0:37e1e6a45ced 458 JCU_TABLE_NO_3 = 3
dkato 0:37e1e6a45ced 459 } jcu_table_no_t;
dkato 0:37e1e6a45ced 460
dkato 0:37e1e6a45ced 461
dkato 0:37e1e6a45ced 462 /**
dkato 0:37e1e6a45ced 463 * @enum jcu_huff_t
dkato 0:37e1e6a45ced 464 * @brief Kind of Huffman table
dkato 0:37e1e6a45ced 465 *
dkato 0:37e1e6a45ced 466 * - JCU_HUFFMAN_AC - 0
dkato 0:37e1e6a45ced 467 * - JCU_HUFFMAN_DC - 1
dkato 0:37e1e6a45ced 468 */
dkato 0:37e1e6a45ced 469 typedef enum {
dkato 0:37e1e6a45ced 470 JCU_HUFFMAN_AC,
dkato 0:37e1e6a45ced 471 JCU_HUFFMAN_DC
dkato 0:37e1e6a45ced 472 } jcu_huff_t;
dkato 0:37e1e6a45ced 473
dkato 0:37e1e6a45ced 474
dkato 0:37e1e6a45ced 475 /**
dkato 0:37e1e6a45ced 476 * @enum jcu_color_element_t
dkato 0:37e1e6a45ced 477 * @brief Kind of color data for using the encoder parameter
dkato 0:37e1e6a45ced 478 *
dkato 0:37e1e6a45ced 479 * - JCU_ELEMENT_Y - 0
dkato 0:37e1e6a45ced 480 * - JCU_ELEMENT_Cb - 1
dkato 0:37e1e6a45ced 481 * - JCU_ELEMENT_Cr - 2
dkato 0:37e1e6a45ced 482 */
dkato 0:37e1e6a45ced 483 typedef enum {
dkato 0:37e1e6a45ced 484 JCU_ELEMENT_Y,
dkato 0:37e1e6a45ced 485 JCU_ELEMENT_Cb,
dkato 0:37e1e6a45ced 486 JCU_ELEMENT_Cr
dkato 0:37e1e6a45ced 487 } jcu_color_element_t;
dkato 0:37e1e6a45ced 488
dkato 0:37e1e6a45ced 489
dkato 0:37e1e6a45ced 490 /**
dkato 0:37e1e6a45ced 491 * @struct jcu_decode_param_t
dkato 0:37e1e6a45ced 492 * @brief Setting parameter for the Decoding
dkato 0:37e1e6a45ced 493 */
dkato 0:37e1e6a45ced 494 typedef struct {
dkato 0:37e1e6a45ced 495 jcu_sub_sampling_t verticalSubSampling;
dkato 0:37e1e6a45ced 496 jcu_sub_sampling_t horizontalSubSampling;
dkato 0:37e1e6a45ced 497 jcu_decode_format_t decodeFormat;
dkato 0:37e1e6a45ced 498 jcu_cbcr_offset_t outputCbCrOffset;
dkato 0:37e1e6a45ced 499 uint8_t alpha;
dkato 0:37e1e6a45ced 500 } jcu_decode_param_t;
dkato 0:37e1e6a45ced 501
dkato 0:37e1e6a45ced 502
dkato 0:37e1e6a45ced 503 /**
dkato 0:37e1e6a45ced 504 * @struct jcu_encode_param_t
dkato 0:37e1e6a45ced 505 * @brief Setting parameter for the Encoding
dkato 0:37e1e6a45ced 506 */
dkato 0:37e1e6a45ced 507 typedef struct {
dkato 0:37e1e6a45ced 508 jcu_jpeg_format_t encodeFormat;
dkato 0:37e1e6a45ced 509 int32_t QuantizationTable[JCU_COLOR_ELEMENT_NUM];
dkato 0:37e1e6a45ced 510 int32_t HuffmanTable[JCU_COLOR_ELEMENT_NUM];
dkato 0:37e1e6a45ced 511 uint32_t DRI_value;
dkato 0:37e1e6a45ced 512 uint32_t width;
dkato 0:37e1e6a45ced 513 uint32_t height;
dkato 0:37e1e6a45ced 514 jcu_cbcr_offset_t inputCbCrOffset;
dkato 0:37e1e6a45ced 515 } jcu_encode_param_t;
dkato 0:37e1e6a45ced 516
dkato 0:37e1e6a45ced 517
dkato 0:37e1e6a45ced 518 /* Section: Global */
dkato 0:37e1e6a45ced 519 /**
dkato 0:37e1e6a45ced 520 * @enum jcu_codec_status_t
dkato 0:37e1e6a45ced 521 * @brief Codec type
dkato 0:37e1e6a45ced 522 *
dkato 0:37e1e6a45ced 523 * - JCU_CODEC_NOT_SELECTED - -1
dkato 0:37e1e6a45ced 524 * - JCU_STATUS_ENCODE - 0
dkato 0:37e1e6a45ced 525 * - JCU_STATUS_DECODE - 1
dkato 0:37e1e6a45ced 526 */
dkato 0:37e1e6a45ced 527 typedef enum {
dkato 0:37e1e6a45ced 528 JCU_CODEC_NOT_SELECTED = -1,
dkato 0:37e1e6a45ced 529 JCU_STATUS_ENCODE = 0,
dkato 0:37e1e6a45ced 530 JCU_STATUS_DECODE = 1
dkato 0:37e1e6a45ced 531 } jcu_codec_status_t;
dkato 0:37e1e6a45ced 532
dkato 0:37e1e6a45ced 533
dkato 0:37e1e6a45ced 534 /******************************************************************************
dkato 0:37e1e6a45ced 535 Variable Externs
dkato 0:37e1e6a45ced 536 ******************************************************************************/
dkato 0:37e1e6a45ced 537
dkato 0:37e1e6a45ced 538 /******************************************************************************
dkato 0:37e1e6a45ced 539 Imported global variables and functions (from other files)
dkato 0:37e1e6a45ced 540 ******************************************************************************/
dkato 0:37e1e6a45ced 541
dkato 0:37e1e6a45ced 542 /******************************************************************************
dkato 0:37e1e6a45ced 543 Functions Prototypes
dkato 0:37e1e6a45ced 544 ******************************************************************************/
dkato 0:37e1e6a45ced 545 jcu_errorcode_t R_JCU_Initialize( void *const NullConfig );
dkato 0:37e1e6a45ced 546 jcu_errorcode_t R_JCU_Terminate(void);
dkato 0:37e1e6a45ced 547 jcu_errorcode_t R_JCU_TerminateAsync( r_ospl_async_t *const async );
dkato 0:37e1e6a45ced 548 jcu_errorcode_t R_JCU_SelectCodec(const jcu_codec_t codec);
dkato 0:37e1e6a45ced 549 jcu_errorcode_t R_JCU_Start(void);
dkato 0:37e1e6a45ced 550 jcu_errorcode_t R_JCU_StartAsync( r_ospl_async_t *const async );
dkato 0:37e1e6a45ced 551 jcu_errorcode_t R_JCU_SetCountMode(const jcu_count_mode_param_t *const buffer);
dkato 0:37e1e6a45ced 552 jcu_errorcode_t R_JCU_Continue(const jcu_continue_type_t type);
dkato 0:37e1e6a45ced 553 jcu_errorcode_t R_JCU_ContinueAsync(const jcu_continue_type_t type, r_ospl_async_t *const async);
dkato 0:37e1e6a45ced 554 void R_JCU_GetAsyncStatus(const jcu_async_status_t **const out_Status);
dkato 0:37e1e6a45ced 555 jcu_errorcode_t R_JCU_SetDecodeParam(const jcu_decode_param_t *const decode, const jcu_buffer_param_t *const buffer);
dkato 0:37e1e6a45ced 556 jcu_errorcode_t R_JCU_SetPauseForImageInfo(const bool_t is_pause);
dkato 0:37e1e6a45ced 557 jcu_errorcode_t R_JCU_GetImageInfo(jcu_image_info_t *const buffer);
dkato 0:37e1e6a45ced 558 jcu_errorcode_t R_JCU_SetErrorFilter(jcu_int_detail_errors_t filter);
dkato 0:37e1e6a45ced 559 jcu_errorcode_t R_JCU_SetQuantizationTable(const jcu_table_no_t tableNo, const uint8_t *const table);
dkato 0:37e1e6a45ced 560 jcu_errorcode_t R_JCU_SetHuffmanTable(const jcu_table_no_t tableNo, const jcu_huff_t type, const uint8_t *const table);
dkato 0:37e1e6a45ced 561 jcu_errorcode_t R_JCU_SetEncodeParam(const jcu_encode_param_t *const encode, const jcu_buffer_param_t *const buffer);
dkato 0:37e1e6a45ced 562 jcu_errorcode_t R_JCU_GetEncodedSize(size_t *const out_Size);
dkato 0:37e1e6a45ced 563 jcu_errorcode_t R_JCU_Set2ndCacheAttribute( r_ospl_axi_cache_attribute_t const read_cache_attribute,
dkato 0:37e1e6a45ced 564 r_ospl_axi_cache_attribute_t const write_cache_attribute );
dkato 0:37e1e6a45ced 565
dkato 0:37e1e6a45ced 566 #ifndef R_OSPL_NDEBUG
dkato 0:37e1e6a45ced 567 void R_JCU_PrintRegisters(void);
dkato 0:37e1e6a45ced 568 #endif
dkato 0:37e1e6a45ced 569
dkato 0:37e1e6a45ced 570 /* For interrupt callback */
dkato 0:37e1e6a45ced 571 errnum_t R_JCU_OnInterrupting( const r_ospl_interrupt_t *const InterruptSource );
dkato 0:37e1e6a45ced 572 errnum_t R_JCU_OnInterrupted(void);
dkato 0:37e1e6a45ced 573 #ifdef __cplusplus
dkato 0:37e1e6a45ced 574 }
dkato 0:37e1e6a45ced 575 #endif /* __cplusplus */
dkato 0:37e1e6a45ced 576
dkato 0:37e1e6a45ced 577 #endif /* #define JCU_API_H_ */