diff --git a/.github/workflows/upload_component.yml b/.github/workflows/upload_component.yml index 7c6140e..94cc15d 100644 --- a/.github/workflows/upload_component.yml +++ b/.github/workflows/upload_component.yml @@ -15,6 +15,6 @@ jobs: - name: Upload components to component service uses: espressif/upload-components-ci-action@v1 with: - directories: "bdc_motor;cbor;jsmn;led_strip;libsodium;pid_ctrl;qrcode;nghttp;sh2lib;expat;esp_encrypted_img;coap;pcap;json_generator;json_parser;usb/usb_host_cdc_acm;usb/usb_host_msc;usb/usb_host_uvc;esp_serial_slave_link" + directories: "bdc_motor;cbor;jsmn;led_strip;libsodium;pid_ctrl;qrcode;nghttp;sh2lib;expat;esp_encrypted_img;coap;pcap;json_generator;json_parser;usb/usb_host_cdc_acm;usb/usb_host_msc;usb/usb_host_uvc;esp_serial_slave_link;esp_jpeg" namespace: "espressif" api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }} diff --git a/esp_jpeg/CMakeLists.txt b/esp_jpeg/CMakeLists.txt new file mode 100644 index 0000000..b3caf42 --- /dev/null +++ b/esp_jpeg/CMakeLists.txt @@ -0,0 +1,10 @@ +set(sources "jpeg_decoder.c") +set(includes "include") + +# Compile only when cannot use ROM code +if(NOT CONFIG_JD_USE_ROM) + list(APPEND sources "tjpgd/tjpgd.c") + list(APPEND includes "tjpgd") +endif() + +idf_component_register(SRCS ${sources} INCLUDE_DIRS ${includes}) diff --git a/esp_jpeg/Kconfig b/esp_jpeg/Kconfig new file mode 100644 index 0000000..7396519 --- /dev/null +++ b/esp_jpeg/Kconfig @@ -0,0 +1,69 @@ +menu "JPEG Decoder" + + config JD_USE_ROM + bool "Use TinyJPG Decoder from ROM" + depends on (!IDF_TARGET_ESP32S2 && !IDF_TARGET_ESP32C2) + default y + help + By default, Espressif SoCs use TJpg decoder implemented in ROM code. + If this feature is disabled, new configuration of TJpg decoder can be used. + Refer to REAME.md for more details. + + config JD_SZBUF + int "Size of stream input buffer" + depends on !JD_USE_ROM + default 512 + + config JD_FORMAT + int + depends on !JD_USE_ROM + default 0 if JD_FORMAT_RGB888 + default 1 if JD_FORMAT_RGB565 + + choice + prompt "Output pixel format" + depends on !JD_USE_ROM + default JD_FORMAT_RGB888 + help + Output format is selected at runtime. + + config JD_FORMAT_RGB888 + bool "Support RGB565 and RGB888 output (16-bit/pix and 24-bit/pix)" + config JD_FORMAT_RGB565 + bool "Support RGB565 output (16-bit/pix)" + endchoice + + config JD_USE_SCALE + bool "Enable descaling" + depends on !JD_USE_ROM + default y + help + If scaling is enabled, size of output image can be lowered during decoding. + + config JD_TBLCLIP + bool "Use table conversion for saturation arithmetic" + depends on !JD_USE_ROM + default y + help + Use table conversion for saturation arithmetic. A bit faster, but increases 1 KB of code size. + + config JD_FASTDECODE + int + depends on !JD_USE_ROM + default 0 if JD_FASTDECODE_BASIC + default 1 if JD_FASTDECODE_32BIT + default 2 if JD_FASTDECODE_TABLE + + choice + prompt "Optimization level" + depends on !JD_USE_ROM + default JD_FASTDECODE_32BIT + + config JD_FASTDECODE_BASIC + bool "Basic optimization. Suitable for 8/16-bit MCUs" + config JD_FASTDECODE_32BIT + bool "+ 32-bit barrel shifter. Suitable for 32-bit MCUs" + config JD_FASTDECODE_TABLE + bool "+ Table conversion for huffman decoding (wants 6 << HUFF_BIT bytes of RAM)" + endchoice +endmenu diff --git a/esp_jpeg/README.md b/esp_jpeg/README.md new file mode 100644 index 0000000..dc532f6 --- /dev/null +++ b/esp_jpeg/README.md @@ -0,0 +1,103 @@ +# JPEG Decoder: TJpgDec - Tiny JPEG Decompressor + +TJpgDec is a generic JPEG image decompressor that is highly optimized for small embedded systems. It works with very low memory consumption. + +Some microcontrollers have TJpg decoder in ROM, it is used, if there is. [^1] Using ROM code can be disabled in menuconfig. + +[^1]: **_NOTE:_** When the ROM decoder is used, the configuration can't be changed. The configuration is fixed. + +## Features + +**Compilation configuration:** +- Size of stream input buffer (default 512) +- Output pixel format (default RGB888): RGB888/RGB565 +- Switches output descaling feature (default enabled) +- Use table conversion for saturation arithmetic (default enabled) +- Three optimization levels (default basic): 8/16-bit MCUs, 32-bit MCUs, Table conversion for huffman decoding + +**Runtime configuration:** +- Pixel Format: RGB888, RGB565 +- Scaling Ratio: 1/1, 1/2, 1/4 or 1/8 Selectable on Decompression +- Allow swap the first and the last byte of the color + +## TJpgDec in ROM + +Some microcontrollers have TJpg decoder in ROM. It is used as default, but it can be disabled in menuconfig. Then there will be used code saved in this component. + +### List of MCUs, which have TJpgDec in ROM +- ESP32 +- ESP32-S3 +- ESP32-C2 +- ESP32-C3 +- ESP32-H2 + +### Fixed compilation configuration of the ROM code +- Stream input buffer: 512 +- Output pixel format: RGB888 +- Descaling feature for output: Enabled +- Table for saturation: Enabled +- Optimization level: Basic (JD_FASTDECODE = 0) + +### Pros and cons using ROM code + +**Advantages:** +- Save 5k of the flash memory (in the same configuration) + +**Disadvantages:** +- Cannot be changed compilation configuration +- Some configuration can be faster in some cases + +## Speed comparison + +In this table are examples of speed decoding JPEG image with this configuration: +* Image size: 320 x 180 px +* Output format: RGB565 +* CPU: ESP32-S3 +* CPU frequency: 240 MHz +* SPI mode: DIO +* Internal RAM used +* Measured in 1000 retries + +| ROM used | JD_SZBUF | JD_FORMAT | JD_USE_SCALE | JD_TBLCLIP | JD_FASTDECODE | RAM buffer | Flash size | Approx. time | +| :------: | :------: | :-------: | :----------: | :--------: | :-----------: | :--------: | :--------: | :----------: | +| YES | 512 | RGB888 | 1 | 1 | 0 | 3.1 kB | 0 kB | 52 ms | +| NO | 512 | RGB888 | 1 | 1 | 0 | 3.1 kB | 5 kB | 50 ms | +| NO | 512 | RGB888 | 1 | 0 | 0 | 3.1 kB | 4 kB | 68 ms | +| NO | 512 | RGB888 | 1 | 1 | 1 | 3.1 kB | 5 kB | 50 ms | +| NO | 512 | RGB888 | 1 | 0 | 1 | 3.1 kB | 4 kB | 62 ms | +| NO | 512 | RGB888 | 1 | 1 | 2 | 65.5 kB | 5.5 kB | 46 ms | +| NO | 512 | RGB888 | 1 | 0 | 2 | 65.5 kB | 4.5 kB | 59 ms | +| NO | 512 | RGB565 | 1 | 1 | 0 | 5 kB | 5 kB | 60 ms | +| NO | 512 | RGB565 | 1 | 1 | 1 | 5 kB | 5 kB | 59 ms | +| NO | 512 | RGB565 | 1 | 1 | 2 | 65.5 kB | 5.5 kB | 56 ms | + +## Add to project + +Packages from this repository are uploaded to [Espressif's component service](https://components.espressif.com/). +You can add them to your project via `idf.py add-dependancy`, e.g. +``` + idf.py add-dependency esp_jpeg==1.0.0 +``` + +Alternatively, you can create `idf_component.yml`. More is in [Espressif's documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-component-manager.html). + +## Example use + +Here is example of usage. This calling is **blocking**. + +``` +esp_jpeg_image_cfg_t jpeg_cfg = { + .indata = (uint8_t *)jpeg_img_buf, + .indata_size = jpeg_img_buf_size, + .outbuf = out_img_buf, + .outbuf_size = out_img_buf_size, + .out_format = JPEG_IMAGE_OUT_FORMAT_RGB565, + .out_scale = JPEG_IMAGE_SCALE_0, + .flags = { + .swap_color_bytes = 1, + } +}; +esp_jpeg_image_output_t outimg; + +esp_jpeg_decode(&jpeg_cfg, &outimg); +``` diff --git a/esp_jpeg/idf_component.yml b/esp_jpeg/idf_component.yml new file mode 100644 index 0000000..0517652 --- /dev/null +++ b/esp_jpeg/idf_component.yml @@ -0,0 +1,5 @@ +version: "1.0.3" +description: "JPEG Decoder: TJpgDec" +url: https://github.com/espressif/idf-extra-components/tree/master/esp_jpeg/ +dependencies: + idf: ">=4.4" diff --git a/esp_jpeg/include/jpeg_decoder.h b/esp_jpeg/include/jpeg_decoder.h new file mode 100644 index 0000000..849b946 --- /dev/null +++ b/esp_jpeg/include/jpeg_decoder.h @@ -0,0 +1,82 @@ +/* + * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include "esp_err.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Scale of output image + * + */ +typedef enum { + JPEG_IMAGE_SCALE_0 = 0, /*!< No scale */ + JPEG_IMAGE_SCALE_1_2, /*!< Scale 1:2 */ + JPEG_IMAGE_SCALE_1_4, /*!< Scale 1:4 */ + JPEG_IMAGE_SCALE_1_8, /*!< Scale 1:8 */ +} esp_jpeg_image_scale_t; + +/** + * @brief Format of output image + * + */ +typedef enum { + JPEG_IMAGE_FORMAT_RGB888 = 0, /*!< Format RGB888 */ + JPEG_IMAGE_FORMAT_RGB565, /*!< Format RGB565 */ +} esp_jpeg_image_format_t; + +/** + * @brief JPEG Configuration Type + * + */ +typedef struct esp_jpeg_image_cfg_s { + uint8_t *indata; /*!< Input JPEG image */ + uint32_t indata_size; /*!< Size of input image */ + uint8_t *outbuf; /*!< Output buffer */ + uint32_t outbuf_size; /*!< Output buffer size */ + esp_jpeg_image_format_t out_format; /*!< Output image format */ + esp_jpeg_image_scale_t out_scale; /*!< Output scale */ + + struct { + uint8_t swap_color_bytes: 1; /*!< Swap first and last color bytes */ + } flags; + + struct { + uint32_t read; /*!< Internal count of read bytes */ + } priv; +} esp_jpeg_image_cfg_t; + +/** + * @brief JPEG output info + * + */ +typedef struct esp_jpeg_image_output_s { + uint16_t width; /*!< Width of the output image */ + uint16_t height; /*!< Height of the output image */ +} esp_jpeg_image_output_t; + +/** + * @brief Decode JPEG image + * + * @note This function is blocking. + * + * @param cfg: Configuration structure + * @param img: Output image info + * + * @return + * - ESP_OK on success + * - ESP_ERR_NO_MEM if there is no memory for allocating main structure + * - ESP_FAIL if there is an error in decoding JPEG + */ +esp_err_t esp_jpeg_decode(esp_jpeg_image_cfg_t *cfg, esp_jpeg_image_output_t *img); + +#ifdef __cplusplus +} +#endif diff --git a/esp_jpeg/jpeg_decoder.c b/esp_jpeg/jpeg_decoder.c new file mode 100644 index 0000000..4df2582 --- /dev/null +++ b/esp_jpeg/jpeg_decoder.c @@ -0,0 +1,228 @@ +/* + * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include "freertos/FreeRTOS.h" +#include "esp_system.h" +#include "esp_rom_caps.h" +#include "esp_log.h" +#include "esp_err.h" +#include "esp_check.h" +#include "jpeg_decoder.h" + +#if CONFIG_JD_USE_ROM +/* When supported in ROM, use ROM functions */ +#if defined(ESP_ROM_HAS_JPEG_DECODE) +#include "rom/tjpgd.h" +#else +#error Using JPEG decoder from ROM is not supported for selected target. Please select external code in menuconfig. +#endif + +/* The ROM code of TJPGD is older and has different return type in decode callback */ +typedef unsigned int jpeg_decode_out_t; +#else +/* When Tiny JPG Decoder is not in ROM or selected external code */ +#include "tjpgd.h" + +/* The TJPGD outside the ROM code is newer and has different return type in decode callback */ +typedef int jpeg_decode_out_t; +#endif + +static const char *TAG = "JPEG"; + +#define LOBYTE(u16) ((uint8_t)(((uint16_t)(u16)) & 0xff)) +#define HIBYTE(u16) ((uint8_t)((((uint16_t)(u16))>>8) & 0xff)) + +#if defined(JD_FASTDECODE) && (JD_FASTDECODE == 2) +#define JPEG_WORK_BUF_SIZE 65472 +#else +#define JPEG_WORK_BUF_SIZE 3100 /* Recommended buffer size; Independent on the size of the image */ +#endif + +/* If not set JD_FORMAT, it is set in ROM to RGB888, otherwise, it can be set in config */ +#ifndef JD_FORMAT +#define JD_FORMAT 0 +#endif + +/* Output color bytes from tjpgd (depends on JD_FORMAT) */ +#if (JD_FORMAT==0) +#define ESP_JPEG_COLOR_BYTES 3 +#elif (JD_FORMAT==1) +#define ESP_JPEG_COLOR_BYTES 2 +#elif (JD_FORMAT==2) +#error Grayscale image output format is not supported +#define ESP_JPEG_COLOR_BYTES 1 +#endif + +/******************************************************************************* +* Function definitions +*******************************************************************************/ +static uint8_t jpeg_get_div_by_scale(esp_jpeg_image_scale_t scale); +static uint8_t jpeg_get_color_bytes(esp_jpeg_image_format_t format); + +static unsigned int jpeg_decode_in_cb(JDEC *jd, uint8_t *buff, unsigned int nbyte); +static jpeg_decode_out_t jpeg_decode_out_cb(JDEC *jd, void *bitmap, JRECT *rect); +/******************************************************************************* +* Public API functions +*******************************************************************************/ + +esp_err_t esp_jpeg_decode(esp_jpeg_image_cfg_t *cfg, esp_jpeg_image_output_t *img) +{ + esp_err_t ret = ESP_OK; + uint8_t *workbuf = NULL; + JRESULT res; + JDEC JDEC; + + assert(cfg != NULL); + assert(img != NULL); + + workbuf = heap_caps_malloc(JPEG_WORK_BUF_SIZE, MALLOC_CAP_DEFAULT); + ESP_GOTO_ON_FALSE(workbuf, ESP_ERR_NO_MEM, err, TAG, "no mem for JPEG work buffer"); + + cfg->priv.read = 0; + + /* Prepare image */ + res = jd_prepare(&JDEC, jpeg_decode_in_cb, workbuf, JPEG_WORK_BUF_SIZE, cfg); + ESP_GOTO_ON_FALSE((res == JDR_OK), ESP_FAIL, err, TAG, "Error in preparing JPEG image!"); + + uint8_t scale_div = jpeg_get_div_by_scale(cfg->out_scale); + uint8_t out_color_bytes = jpeg_get_color_bytes(cfg->out_format); + + /* Size of output image */ + uint32_t outsize = (JDEC.height / scale_div) * (JDEC.width / scale_div) * out_color_bytes; + ESP_GOTO_ON_FALSE((outsize <= cfg->outbuf_size), ESP_ERR_NO_MEM, err, TAG, "Not enough size in output buffer!"); + + /* Size of output image */ + img->height = JDEC.height / scale_div; + img->width = JDEC.width / scale_div; + + /* Decode JPEG */ + res = jd_decomp(&JDEC, jpeg_decode_out_cb, cfg->out_scale); + ESP_GOTO_ON_FALSE((res == JDR_OK), ESP_FAIL, err, TAG, "Error in decoding JPEG image!"); + +err: + if (workbuf) { + free(workbuf); + } + + return ret; +} + +/******************************************************************************* +* Private API functions +*******************************************************************************/ + +static unsigned int jpeg_decode_in_cb(JDEC *dec, uint8_t *buff, unsigned int nbyte) +{ + assert(dec != NULL); + + uint32_t to_read = nbyte; + esp_jpeg_image_cfg_t *cfg = (esp_jpeg_image_cfg_t *)dec->device; + assert(cfg != NULL); + + if (buff) { + if (cfg->priv.read + to_read > cfg->indata_size) { + to_read = cfg->indata_size - cfg->priv.read; + } + + /* Copy data from JPEG image */ + memcpy(buff, &cfg->indata[cfg->priv.read], to_read); + cfg->priv.read += to_read; + } else if (buff == NULL) { + /* Skip data */ + cfg->priv.read += to_read; + } + + return to_read; +} + +static jpeg_decode_out_t jpeg_decode_out_cb(JDEC *dec, void *bitmap, JRECT *rect) +{ + uint16_t color = 0; + assert(dec != NULL); + + esp_jpeg_image_cfg_t *cfg = (esp_jpeg_image_cfg_t *)dec->device; + assert(cfg != NULL); + assert(bitmap != NULL); + assert(rect != NULL); + + uint8_t scale_div = jpeg_get_div_by_scale(cfg->out_scale); + uint8_t out_color_bytes = jpeg_get_color_bytes(cfg->out_format); + + /* Copy decoded image data to output buffer */ + uint8_t *in = (uint8_t *)bitmap; + uint32_t line = dec->width / scale_div; + uint8_t *dst = (uint8_t *)cfg->outbuf; + for (int y = rect->top; y <= rect->bottom; y++) { + for (int x = rect->left; x <= rect->right; x++) { + if ( (JD_FORMAT == 0 && cfg->out_format == JPEG_IMAGE_FORMAT_RGB888) || + (JD_FORMAT == 1 && cfg->out_format == JPEG_IMAGE_FORMAT_RGB565) ) { + /* Output image format is same as set in TJPGD */ + for (int b = 0; b < ESP_JPEG_COLOR_BYTES; b++) { + if (JD_FORMAT == 1 && cfg->flags.swap_color_bytes) { + dst[(y * line * out_color_bytes) + x * out_color_bytes + b] = in[out_color_bytes - b - 1]; + } else { + dst[(y * line * out_color_bytes) + x * out_color_bytes + b] = in[b]; + } + } + } else if (JD_FORMAT == 0 && cfg->out_format == JPEG_IMAGE_FORMAT_RGB565) { + /* Output image format is not same as set in TJPGD */ + /* We need to convert the 3 bytes in `in` to a rgb565 value */ + color = ((in[0] & 0xF8) << 8); + color |= ((in[1] & 0xFC) << 3); + color |= (in[2] >> 3); + + if (cfg->flags.swap_color_bytes) { + dst[(y * line * out_color_bytes) + (x * out_color_bytes)] = HIBYTE(color); + dst[(y * line * out_color_bytes) + (x * out_color_bytes) + 1] = LOBYTE(color); + } else { + dst[(y * line * out_color_bytes) + (x * out_color_bytes) + 1] = HIBYTE(color); + dst[(y * line * out_color_bytes) + (x * out_color_bytes)] = LOBYTE(color); + } + } else { + ESP_LOGE(TAG, "Selected output format is not supported!"); + assert(0); + } + in += ESP_JPEG_COLOR_BYTES; + } + } + + return 1; +} + +static uint8_t jpeg_get_div_by_scale(esp_jpeg_image_scale_t scale) +{ + switch (scale) { + /* Not scaled */ + case JPEG_IMAGE_SCALE_0: + return 1; + /* Scaled 1:2 */ + case JPEG_IMAGE_SCALE_1_2: + return 2; + /* Scaled 1:4 */ + case JPEG_IMAGE_SCALE_1_4: + return 4; + /* Scaled 1:8 */ + case JPEG_IMAGE_SCALE_1_8: + return 8; + } + + return 1; +} + +static uint8_t jpeg_get_color_bytes(esp_jpeg_image_format_t format) +{ + switch (format) { + /* RGB888 (24-bit/pix) */ + case JPEG_IMAGE_FORMAT_RGB888: + return 3; + /* RGB565 (16-bit/pix) */ + case JPEG_IMAGE_FORMAT_RGB565: + return 2; + } + + return 1; +} diff --git a/esp_jpeg/license.txt b/esp_jpeg/license.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/esp_jpeg/license.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/esp_jpeg/test/CMakeLists.txt b/esp_jpeg/test/CMakeLists.txt new file mode 100644 index 0000000..e6e0072 --- /dev/null +++ b/esp_jpeg/test/CMakeLists.txt @@ -0,0 +1,4 @@ +idf_component_register(SRCS "tjpgd_test.c" + INCLUDE_DIRS "." + REQUIRES "unity") + diff --git a/esp_jpeg/test/logo.jpg b/esp_jpeg/test/logo.jpg new file mode 100644 index 0000000..2bd9e77 Binary files /dev/null and b/esp_jpeg/test/logo.jpg differ diff --git a/esp_jpeg/test/test_logo_jpg.h b/esp_jpeg/test/test_logo_jpg.h new file mode 100644 index 0000000..66271e9 --- /dev/null +++ b/esp_jpeg/test/test_logo_jpg.h @@ -0,0 +1,634 @@ +unsigned char logo_jpg[] = { + 0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, + 0x01, 0x01, 0x00, 0x48, 0x00, 0x48, 0x00, 0x00, 0xff, 0xe2, 0x0c, 0x58, + 0x49, 0x43, 0x43, 0x5f, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x00, + 0x01, 0x01, 0x00, 0x00, 0x0c, 0x48, 0x4c, 0x69, 0x6e, 0x6f, 0x02, 0x10, + 0x00, 0x00, 0x6d, 0x6e, 0x74, 0x72, 0x52, 0x47, 0x42, 0x20, 0x58, 0x59, + 0x5a, 0x20, 0x07, 0xce, 0x00, 0x02, 0x00, 0x09, 0x00, 0x06, 0x00, 0x31, + 0x00, 0x00, 0x61, 0x63, 0x73, 0x70, 0x4d, 0x53, 0x46, 0x54, 0x00, 0x00, + 0x00, 0x00, 0x49, 0x45, 0x43, 0x20, 0x73, 0x52, 0x47, 0x42, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf6, 0xd6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d, 0x48, 0x50, + 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x11, 0x63, 0x70, 0x72, 0x74, 0x00, 0x00, 0x01, 0x50, 0x00, 0x00, + 0x00, 0x33, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x01, 0x84, 0x00, 0x00, + 0x00, 0x6c, 0x77, 0x74, 0x70, 0x74, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, + 0x00, 0x14, 0x62, 0x6b, 0x70, 0x74, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, + 0x00, 0x14, 0x72, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x02, 0x18, 0x00, 0x00, + 0x00, 0x14, 0x67, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x02, 0x2c, 0x00, 0x00, + 0x00, 0x14, 0x62, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, + 0x00, 0x14, 0x64, 0x6d, 0x6e, 0x64, 0x00, 0x00, 0x02, 0x54, 0x00, 0x00, + 0x00, 0x70, 0x64, 0x6d, 0x64, 0x64, 0x00, 0x00, 0x02, 0xc4, 0x00, 0x00, + 0x00, 0x88, 0x76, 0x75, 0x65, 0x64, 0x00, 0x00, 0x03, 0x4c, 0x00, 0x00, + 0x00, 0x86, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x03, 0xd4, 0x00, 0x00, + 0x00, 0x24, 0x6c, 0x75, 0x6d, 0x69, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, + 0x00, 0x14, 0x6d, 0x65, 0x61, 0x73, 0x00, 0x00, 0x04, 0x0c, 0x00, 0x00, + 0x00, 0x24, 0x74, 0x65, 0x63, 0x68, 0x00, 0x00, 0x04, 0x30, 0x00, 0x00, + 0x00, 0x0c, 0x72, 0x54, 0x52, 0x43, 0x00, 0x00, 0x04, 0x3c, 0x00, 0x00, + 0x08, 0x0c, 0x67, 0x54, 0x52, 0x43, 0x00, 0x00, 0x04, 0x3c, 0x00, 0x00, + 0x08, 0x0c, 0x62, 0x54, 0x52, 0x43, 0x00, 0x00, 0x04, 0x3c, 0x00, 0x00, + 0x08, 0x0c, 0x74, 0x65, 0x78, 0x74, 0x00, 0x00, 0x00, 0x00, 0x43, 0x6f, + 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x63, 0x29, 0x20, + 0x31, 0x39, 0x39, 0x38, 0x20, 0x48, 0x65, 0x77, 0x6c, 0x65, 0x74, 0x74, + 0x2d, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x72, 0x64, 0x20, 0x43, 0x6f, 0x6d, + 0x70, 0x61, 0x6e, 0x79, 0x00, 0x00, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x73, 0x52, 0x47, 0x42, 0x20, 0x49, + 0x45, 0x43, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x73, + 0x52, 0x47, 0x42, 0x20, 0x49, 0x45, 0x43, 0x36, 0x31, 0x39, 0x36, 0x36, + 0x2d, 0x32, 0x2e, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf3, 0x51, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, + 0x16, 0xcc, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x59, + 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6f, 0xa2, 0x00, 0x00, + 0x38, 0xf5, 0x00, 0x00, 0x03, 0x90, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x62, 0x99, 0x00, 0x00, 0xb7, 0x85, 0x00, 0x00, + 0x18, 0xda, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x24, 0xa0, 0x00, 0x00, 0x0f, 0x84, 0x00, 0x00, 0xb6, 0xcf, 0x64, 0x65, + 0x73, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x49, 0x45, + 0x43, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, + 0x2e, 0x69, 0x65, 0x63, 0x2e, 0x63, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x49, 0x45, 0x43, 0x20, 0x68, + 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x65, + 0x63, 0x2e, 0x63, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x2e, 0x49, 0x45, 0x43, 0x20, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, + 0x32, 0x2e, 0x31, 0x20, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, + 0x52, 0x47, 0x42, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x75, 0x72, 0x20, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x20, 0x2d, 0x20, 0x73, 0x52, 0x47, 0x42, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x49, + 0x45, 0x43, 0x20, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, + 0x20, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x52, 0x47, 0x42, + 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x75, 0x72, 0x20, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x20, 0x2d, 0x20, 0x73, 0x52, 0x47, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x20, 0x56, 0x69, 0x65, 0x77, 0x69, 0x6e, 0x67, 0x20, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, + 0x20, 0x49, 0x45, 0x43, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e, + 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x2c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x56, + 0x69, 0x65, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x49, 0x45, 0x43, 0x36, + 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x69, + 0x65, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0xa4, 0xfe, 0x00, 0x14, + 0x5f, 0x2e, 0x00, 0x10, 0xcf, 0x14, 0x00, 0x03, 0xed, 0xcc, 0x00, 0x04, + 0x13, 0x0b, 0x00, 0x03, 0x5c, 0x9e, 0x00, 0x00, 0x00, 0x01, 0x58, 0x59, + 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x09, 0x56, 0x00, 0x50, + 0x00, 0x00, 0x00, 0x57, 0x1f, 0xe7, 0x6d, 0x65, 0x61, 0x73, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x8f, 0x00, 0x00, 0x00, 0x02, 0x73, 0x69, 0x67, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x43, 0x52, 0x54, 0x20, 0x63, 0x75, 0x72, 0x76, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, + 0x00, 0x0f, 0x00, 0x14, 0x00, 0x19, 0x00, 0x1e, 0x00, 0x23, 0x00, 0x28, + 0x00, 0x2d, 0x00, 0x32, 0x00, 0x37, 0x00, 0x3b, 0x00, 0x40, 0x00, 0x45, + 0x00, 0x4a, 0x00, 0x4f, 0x00, 0x54, 0x00, 0x59, 0x00, 0x5e, 0x00, 0x63, + 0x00, 0x68, 0x00, 0x6d, 0x00, 0x72, 0x00, 0x77, 0x00, 0x7c, 0x00, 0x81, + 0x00, 0x86, 0x00, 0x8b, 0x00, 0x90, 0x00, 0x95, 0x00, 0x9a, 0x00, 0x9f, + 0x00, 0xa4, 0x00, 0xa9, 0x00, 0xae, 0x00, 0xb2, 0x00, 0xb7, 0x00, 0xbc, + 0x00, 0xc1, 0x00, 0xc6, 0x00, 0xcb, 0x00, 0xd0, 0x00, 0xd5, 0x00, 0xdb, + 0x00, 0xe0, 0x00, 0xe5, 0x00, 0xeb, 0x00, 0xf0, 0x00, 0xf6, 0x00, 0xfb, + 0x01, 0x01, 0x01, 0x07, 0x01, 0x0d, 0x01, 0x13, 0x01, 0x19, 0x01, 0x1f, + 0x01, 0x25, 0x01, 0x2b, 0x01, 0x32, 0x01, 0x38, 0x01, 0x3e, 0x01, 0x45, + 0x01, 0x4c, 0x01, 0x52, 0x01, 0x59, 0x01, 0x60, 0x01, 0x67, 0x01, 0x6e, + 0x01, 0x75, 0x01, 0x7c, 0x01, 0x83, 0x01, 0x8b, 0x01, 0x92, 0x01, 0x9a, + 0x01, 0xa1, 0x01, 0xa9, 0x01, 0xb1, 0x01, 0xb9, 0x01, 0xc1, 0x01, 0xc9, + 0x01, 0xd1, 0x01, 0xd9, 0x01, 0xe1, 0x01, 0xe9, 0x01, 0xf2, 0x01, 0xfa, + 0x02, 0x03, 0x02, 0x0c, 0x02, 0x14, 0x02, 0x1d, 0x02, 0x26, 0x02, 0x2f, + 0x02, 0x38, 0x02, 0x41, 0x02, 0x4b, 0x02, 0x54, 0x02, 0x5d, 0x02, 0x67, + 0x02, 0x71, 0x02, 0x7a, 0x02, 0x84, 0x02, 0x8e, 0x02, 0x98, 0x02, 0xa2, + 0x02, 0xac, 0x02, 0xb6, 0x02, 0xc1, 0x02, 0xcb, 0x02, 0xd5, 0x02, 0xe0, + 0x02, 0xeb, 0x02, 0xf5, 0x03, 0x00, 0x03, 0x0b, 0x03, 0x16, 0x03, 0x21, + 0x03, 0x2d, 0x03, 0x38, 0x03, 0x43, 0x03, 0x4f, 0x03, 0x5a, 0x03, 0x66, + 0x03, 0x72, 0x03, 0x7e, 0x03, 0x8a, 0x03, 0x96, 0x03, 0xa2, 0x03, 0xae, + 0x03, 0xba, 0x03, 0xc7, 0x03, 0xd3, 0x03, 0xe0, 0x03, 0xec, 0x03, 0xf9, + 0x04, 0x06, 0x04, 0x13, 0x04, 0x20, 0x04, 0x2d, 0x04, 0x3b, 0x04, 0x48, + 0x04, 0x55, 0x04, 0x63, 0x04, 0x71, 0x04, 0x7e, 0x04, 0x8c, 0x04, 0x9a, + 0x04, 0xa8, 0x04, 0xb6, 0x04, 0xc4, 0x04, 0xd3, 0x04, 0xe1, 0x04, 0xf0, + 0x04, 0xfe, 0x05, 0x0d, 0x05, 0x1c, 0x05, 0x2b, 0x05, 0x3a, 0x05, 0x49, + 0x05, 0x58, 0x05, 0x67, 0x05, 0x77, 0x05, 0x86, 0x05, 0x96, 0x05, 0xa6, + 0x05, 0xb5, 0x05, 0xc5, 0x05, 0xd5, 0x05, 0xe5, 0x05, 0xf6, 0x06, 0x06, + 0x06, 0x16, 0x06, 0x27, 0x06, 0x37, 0x06, 0x48, 0x06, 0x59, 0x06, 0x6a, + 0x06, 0x7b, 0x06, 0x8c, 0x06, 0x9d, 0x06, 0xaf, 0x06, 0xc0, 0x06, 0xd1, + 0x06, 0xe3, 0x06, 0xf5, 0x07, 0x07, 0x07, 0x19, 0x07, 0x2b, 0x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x5e, + 0x0f, 0x7a, 0x0f, 0x96, 0x0f, 0xb3, 0x0f, 0xcf, 0x0f, 0xec, 0x10, 0x09, + 0x10, 0x26, 0x10, 0x43, 0x10, 0x61, 0x10, 0x7e, 0x10, 0x9b, 0x10, 0xb9, + 0x10, 0xd7, 0x10, 0xf5, 0x11, 0x13, 0x11, 0x31, 0x11, 0x4f, 0x11, 0x6d, + 0x11, 0x8c, 0x11, 0xaa, 0x11, 0xc9, 0x11, 0xe8, 0x12, 0x07, 0x12, 0x26, + 0x12, 0x45, 0x12, 0x64, 0x12, 0x84, 0x12, 0xa3, 0x12, 0xc3, 0x12, 0xe3, + 0x13, 0x03, 0x13, 0x23, 0x13, 0x43, 0x13, 0x63, 0x13, 0x83, 0x13, 0xa4, + 0x13, 0xc5, 0x13, 0xe5, 0x14, 0x06, 0x14, 0x27, 0x14, 0x49, 0x14, 0x6a, + 0x14, 0x8b, 0x14, 0xad, 0x14, 0xce, 0x14, 0xf0, 0x15, 0x12, 0x15, 0x34, + 0x15, 0x56, 0x15, 0x78, 0x15, 0x9b, 0x15, 0xbd, 0x15, 0xe0, 0x16, 0x03, + 0x16, 0x26, 0x16, 0x49, 0x16, 0x6c, 0x16, 0x8f, 0x16, 0xb2, 0x16, 0xd6, + 0x16, 0xfa, 0x17, 0x1d, 0x17, 0x41, 0x17, 0x65, 0x17, 0x89, 0x17, 0xae, + 0x17, 0xd2, 0x17, 0xf7, 0x18, 0x1b, 0x18, 0x40, 0x18, 0x65, 0x18, 0x8a, + 0x18, 0xaf, 0x18, 0xd5, 0x18, 0xfa, 0x19, 0x20, 0x19, 0x45, 0x19, 0x6b, + 0x19, 0x91, 0x19, 0xb7, 0x19, 0xdd, 0x1a, 0x04, 0x1a, 0x2a, 0x1a, 0x51, + 0x1a, 0x77, 0x1a, 0x9e, 0x1a, 0xc5, 0x1a, 0xec, 0x1b, 0x14, 0x1b, 0x3b, + 0x1b, 0x63, 0x1b, 0x8a, 0x1b, 0xb2, 0x1b, 0xda, 0x1c, 0x02, 0x1c, 0x2a, + 0x1c, 0x52, 0x1c, 0x7b, 0x1c, 0xa3, 0x1c, 0xcc, 0x1c, 0xf5, 0x1d, 0x1e, + 0x1d, 0x47, 0x1d, 0x70, 0x1d, 0x99, 0x1d, 0xc3, 0x1d, 0xec, 0x1e, 0x16, + 0x1e, 0x40, 0x1e, 0x6a, 0x1e, 0x94, 0x1e, 0xbe, 0x1e, 0xe9, 0x1f, 0x13, + 0x1f, 0x3e, 0x1f, 0x69, 0x1f, 0x94, 0x1f, 0xbf, 0x1f, 0xea, 0x20, 0x15, + 0x20, 0x41, 0x20, 0x6c, 0x20, 0x98, 0x20, 0xc4, 0x20, 0xf0, 0x21, 0x1c, + 0x21, 0x48, 0x21, 0x75, 0x21, 0xa1, 0x21, 0xce, 0x21, 0xfb, 0x22, 0x27, + 0x22, 0x55, 0x22, 0x82, 0x22, 0xaf, 0x22, 0xdd, 0x23, 0x0a, 0x23, 0x38, + 0x23, 0x66, 0x23, 0x94, 0x23, 0xc2, 0x23, 0xf0, 0x24, 0x1f, 0x24, 0x4d, + 0x24, 0x7c, 0x24, 0xab, 0x24, 0xda, 0x25, 0x09, 0x25, 0x38, 0x25, 0x68, + 0x25, 0x97, 0x25, 0xc7, 0x25, 0xf7, 0x26, 0x27, 0x26, 0x57, 0x26, 0x87, + 0x26, 0xb7, 0x26, 0xe8, 0x27, 0x18, 0x27, 0x49, 0x27, 0x7a, 0x27, 0xab, + 0x27, 0xdc, 0x28, 0x0d, 0x28, 0x3f, 0x28, 0x71, 0x28, 0xa2, 0x28, 0xd4, + 0x29, 0x06, 0x29, 0x38, 0x29, 0x6b, 0x29, 0x9d, 0x29, 0xd0, 0x2a, 0x02, + 0x2a, 0x35, 0x2a, 0x68, 0x2a, 0x9b, 0x2a, 0xcf, 0x2b, 0x02, 0x2b, 0x36, + 0x2b, 0x69, 0x2b, 0x9d, 0x2b, 0xd1, 0x2c, 0x05, 0x2c, 0x39, 0x2c, 0x6e, + 0x2c, 0xa2, 0x2c, 0xd7, 0x2d, 0x0c, 0x2d, 0x41, 0x2d, 0x76, 0x2d, 0xab, + 0x2d, 0xe1, 0x2e, 0x16, 0x2e, 0x4c, 0x2e, 0x82, 0x2e, 0xb7, 0x2e, 0xee, + 0x2f, 0x24, 0x2f, 0x5a, 0x2f, 0x91, 0x2f, 0xc7, 0x2f, 0xfe, 0x30, 0x35, + 0x30, 0x6c, 0x30, 0xa4, 0x30, 0xdb, 0x31, 0x12, 0x31, 0x4a, 0x31, 0x82, + 0x31, 0xba, 0x31, 0xf2, 0x32, 0x2a, 0x32, 0x63, 0x32, 0x9b, 0x32, 0xd4, + 0x33, 0x0d, 0x33, 0x46, 0x33, 0x7f, 0x33, 0xb8, 0x33, 0xf1, 0x34, 0x2b, + 0x34, 0x65, 0x34, 0x9e, 0x34, 0xd8, 0x35, 0x13, 0x35, 0x4d, 0x35, 0x87, + 0x35, 0xc2, 0x35, 0xfd, 0x36, 0x37, 0x36, 0x72, 0x36, 0xae, 0x36, 0xe9, + 0x37, 0x24, 0x37, 0x60, 0x37, 0x9c, 0x37, 0xd7, 0x38, 0x14, 0x38, 0x50, + 0x38, 0x8c, 0x38, 0xc8, 0x39, 0x05, 0x39, 0x42, 0x39, 0x7f, 0x39, 0xbc, + 0x39, 0xf9, 0x3a, 0x36, 0x3a, 0x74, 0x3a, 0xb2, 0x3a, 0xef, 0x3b, 0x2d, + 0x3b, 0x6b, 0x3b, 0xaa, 0x3b, 0xe8, 0x3c, 0x27, 0x3c, 0x65, 0x3c, 0xa4, + 0x3c, 0xe3, 0x3d, 0x22, 0x3d, 0x61, 0x3d, 0xa1, 0x3d, 0xe0, 0x3e, 0x20, + 0x3e, 0x60, 0x3e, 0xa0, 0x3e, 0xe0, 0x3f, 0x21, 0x3f, 0x61, 0x3f, 0xa2, + 0x3f, 0xe2, 0x40, 0x23, 0x40, 0x64, 0x40, 0xa6, 0x40, 0xe7, 0x41, 0x29, + 0x41, 0x6a, 0x41, 0xac, 0x41, 0xee, 0x42, 0x30, 0x42, 0x72, 0x42, 0xb5, + 0x42, 0xf7, 0x43, 0x3a, 0x43, 0x7d, 0x43, 0xc0, 0x44, 0x03, 0x44, 0x47, + 0x44, 0x8a, 0x44, 0xce, 0x45, 0x12, 0x45, 0x55, 0x45, 0x9a, 0x45, 0xde, + 0x46, 0x22, 0x46, 0x67, 0x46, 0xab, 0x46, 0xf0, 0x47, 0x35, 0x47, 0x7b, + 0x47, 0xc0, 0x48, 0x05, 0x48, 0x4b, 0x48, 0x91, 0x48, 0xd7, 0x49, 0x1d, + 0x49, 0x63, 0x49, 0xa9, 0x49, 0xf0, 0x4a, 0x37, 0x4a, 0x7d, 0x4a, 0xc4, + 0x4b, 0x0c, 0x4b, 0x53, 0x4b, 0x9a, 0x4b, 0xe2, 0x4c, 0x2a, 0x4c, 0x72, + 0x4c, 0xba, 0x4d, 0x02, 0x4d, 0x4a, 0x4d, 0x93, 0x4d, 0xdc, 0x4e, 0x25, + 0x4e, 0x6e, 0x4e, 0xb7, 0x4f, 0x00, 0x4f, 0x49, 0x4f, 0x93, 0x4f, 0xdd, + 0x50, 0x27, 0x50, 0x71, 0x50, 0xbb, 0x51, 0x06, 0x51, 0x50, 0x51, 0x9b, + 0x51, 0xe6, 0x52, 0x31, 0x52, 0x7c, 0x52, 0xc7, 0x53, 0x13, 0x53, 0x5f, + 0x53, 0xaa, 0x53, 0xf6, 0x54, 0x42, 0x54, 0x8f, 0x54, 0xdb, 0x55, 0x28, + 0x55, 0x75, 0x55, 0xc2, 0x56, 0x0f, 0x56, 0x5c, 0x56, 0xa9, 0x56, 0xf7, + 0x57, 0x44, 0x57, 0x92, 0x57, 0xe0, 0x58, 0x2f, 0x58, 0x7d, 0x58, 0xcb, + 0x59, 0x1a, 0x59, 0x69, 0x59, 0xb8, 0x5a, 0x07, 0x5a, 0x56, 0x5a, 0xa6, + 0x5a, 0xf5, 0x5b, 0x45, 0x5b, 0x95, 0x5b, 0xe5, 0x5c, 0x35, 0x5c, 0x86, + 0x5c, 0xd6, 0x5d, 0x27, 0x5d, 0x78, 0x5d, 0xc9, 0x5e, 0x1a, 0x5e, 0x6c, + 0x5e, 0xbd, 0x5f, 0x0f, 0x5f, 0x61, 0x5f, 0xb3, 0x60, 0x05, 0x60, 0x57, + 0x60, 0xaa, 0x60, 0xfc, 0x61, 0x4f, 0x61, 0xa2, 0x61, 0xf5, 0x62, 0x49, + 0x62, 0x9c, 0x62, 0xf0, 0x63, 0x43, 0x63, 0x97, 0x63, 0xeb, 0x64, 0x40, + 0x64, 0x94, 0x64, 0xe9, 0x65, 0x3d, 0x65, 0x92, 0x65, 0xe7, 0x66, 0x3d, + 0x66, 0x92, 0x66, 0xe8, 0x67, 0x3d, 0x67, 0x93, 0x67, 0xe9, 0x68, 0x3f, + 0x68, 0x96, 0x68, 0xec, 0x69, 0x43, 0x69, 0x9a, 0x69, 0xf1, 0x6a, 0x48, + 0x6a, 0x9f, 0x6a, 0xf7, 0x6b, 0x4f, 0x6b, 0xa7, 0x6b, 0xff, 0x6c, 0x57, + 0x6c, 0xaf, 0x6d, 0x08, 0x6d, 0x60, 0x6d, 0xb9, 0x6e, 0x12, 0x6e, 0x6b, + 0x6e, 0xc4, 0x6f, 0x1e, 0x6f, 0x78, 0x6f, 0xd1, 0x70, 0x2b, 0x70, 0x86, + 0x70, 0xe0, 0x71, 0x3a, 0x71, 0x95, 0x71, 0xf0, 0x72, 0x4b, 0x72, 0xa6, + 0x73, 0x01, 0x73, 0x5d, 0x73, 0xb8, 0x74, 0x14, 0x74, 0x70, 0x74, 0xcc, + 0x75, 0x28, 0x75, 0x85, 0x75, 0xe1, 0x76, 0x3e, 0x76, 0x9b, 0x76, 0xf8, + 0x77, 0x56, 0x77, 0xb3, 0x78, 0x11, 0x78, 0x6e, 0x78, 0xcc, 0x79, 0x2a, + 0x79, 0x89, 0x79, 0xe7, 0x7a, 0x46, 0x7a, 0xa5, 0x7b, 0x04, 0x7b, 0x63, + 0x7b, 0xc2, 0x7c, 0x21, 0x7c, 0x81, 0x7c, 0xe1, 0x7d, 0x41, 0x7d, 0xa1, + 0x7e, 0x01, 0x7e, 0x62, 0x7e, 0xc2, 0x7f, 0x23, 0x7f, 0x84, 0x7f, 0xe5, + 0x80, 0x47, 0x80, 0xa8, 0x81, 0x0a, 0x81, 0x6b, 0x81, 0xcd, 0x82, 0x30, + 0x82, 0x92, 0x82, 0xf4, 0x83, 0x57, 0x83, 0xba, 0x84, 0x1d, 0x84, 0x80, + 0x84, 0xe3, 0x85, 0x47, 0x85, 0xab, 0x86, 0x0e, 0x86, 0x72, 0x86, 0xd7, + 0x87, 0x3b, 0x87, 0x9f, 0x88, 0x04, 0x88, 0x69, 0x88, 0xce, 0x89, 0x33, + 0x89, 0x99, 0x89, 0xfe, 0x8a, 0x64, 0x8a, 0xca, 0x8b, 0x30, 0x8b, 0x96, + 0x8b, 0xfc, 0x8c, 0x63, 0x8c, 0xca, 0x8d, 0x31, 0x8d, 0x98, 0x8d, 0xff, + 0x8e, 0x66, 0x8e, 0xce, 0x8f, 0x36, 0x8f, 0x9e, 0x90, 0x06, 0x90, 0x6e, + 0x90, 0xd6, 0x91, 0x3f, 0x91, 0xa8, 0x92, 0x11, 0x92, 0x7a, 0x92, 0xe3, + 0x93, 0x4d, 0x93, 0xb6, 0x94, 0x20, 0x94, 0x8a, 0x94, 0xf4, 0x95, 0x5f, + 0x95, 0xc9, 0x96, 0x34, 0x96, 0x9f, 0x97, 0x0a, 0x97, 0x75, 0x97, 0xe0, + 0x98, 0x4c, 0x98, 0xb8, 0x99, 0x24, 0x99, 0x90, 0x99, 0xfc, 0x9a, 0x68, + 0x9a, 0xd5, 0x9b, 0x42, 0x9b, 0xaf, 0x9c, 0x1c, 0x9c, 0x89, 0x9c, 0xf7, + 0x9d, 0x64, 0x9d, 0xd2, 0x9e, 0x40, 0x9e, 0xae, 0x9f, 0x1d, 0x9f, 0x8b, + 0x9f, 0xfa, 0xa0, 0x69, 0xa0, 0xd8, 0xa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f9, 0x38, 0xf9, 0xc7, 0xfa, 0x57, 0xfa, 0xe7, 0xfb, 0x77, 0xfc, 0x07, + 0xfc, 0x98, 0xfd, 0x29, 0xfd, 0xba, 0xfe, 0x4b, 0xfe, 0xdc, 0xff, 0x6d, + 0xff, 0xff, 0xff, 0xdb, 0x00, 0x43, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, + 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x04, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x02, 0x02, 0x03, 0x04, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x02, 0x03, 0x05, 0x05, 0x04, 0x04, 0x05, 0x04, 0x04, 0x04, 0x04, 0xff, + 0xdb, 0x00, 0x43, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, + 0x01, 0x02, 0x04, 0x03, 0x02, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0xff, 0xc0, 0x00, 0x11, + 0x08, 0x00, 0x2e, 0x00, 0x2e, 0x03, 0x01, 0x11, 0x00, 0x02, 0x11, 0x01, + 0x03, 0x11, 0x01, 0xff, 0xc4, 0x00, 0x1c, 0x00, 0x00, 0x01, 0x04, 0x03, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x09, 0x05, 0x07, 0x08, 0x0a, 0x01, 0x02, 0x06, 0x03, 0xff, 0xc4, 0x00, + 0x31, 0x10, 0x00, 0x00, 0x06, 0x02, 0x01, 0x03, 0x03, 0x03, 0x03, 0x02, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, + 0x07, 0x08, 0x11, 0x00, 0x09, 0x12, 0x13, 0x14, 0x21, 0x22, 0x31, 0x41, + 0x15, 0x23, 0x32, 0x16, 0x19, 0x35, 0x42, 0x52, 0x61, 0x74, 0x91, 0xb3, + 0xff, 0xc4, 0x00, 0x1e, 0x01, 0x00, 0x02, 0x01, 0x04, 0x03, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x05, + 0x01, 0x04, 0x06, 0x09, 0x02, 0x03, 0x0a, 0x00, 0xff, 0xc4, 0x00, 0x39, + 0x11, 0x00, 0x02, 0x01, 0x03, 0x03, 0x03, 0x02, 0x04, 0x03, 0x05, 0x07, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x11, 0x06, + 0x12, 0x21, 0x00, 0x07, 0x31, 0x08, 0x13, 0x22, 0x32, 0x41, 0x51, 0x14, + 0x23, 0x61, 0x15, 0x42, 0x62, 0x81, 0xb1, 0x09, 0x17, 0x18, 0x24, 0x33, + 0x34, 0x71, 0x52, 0x72, 0x91, 0xa1, 0xd1, 0xff, 0xda, 0x00, 0x0c, 0x03, + 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3f, 0x00, 0x1c, 0x6e, 0xdd, + 0xae, 0x9a, 0xce, 0x4c, 0x77, 0x6b, 0x11, 0x34, 0x94, 0x39, 0x8e, 0xa2, + 0x8e, 0x4c, 0x05, 0x21, 0x4a, 0x22, 0x22, 0x63, 0x18, 0x47, 0xec, 0x00, + 0x1c, 0x88, 0x88, 0xfe, 0x3e, 0x7a, 0xd4, 0xdb, 0x33, 0xef, 0x20, 0x13, + 0xe7, 0xaf, 0x5e, 0x50, 0xc3, 0x1b, 0xa2, 0x05, 0x40, 0x49, 0x03, 0x80, + 0x07, 0x93, 0xf6, 0x03, 0xff, 0x00, 0x40, 0x74, 0xb3, 0x53, 0xae, 0x5e, + 0x6f, 0xd6, 0xa8, 0x5a, 0x1d, 0x0e, 0xb1, 0x71, 0xba, 0xde, 0xec, 0x6e, + 0x45, 0xa4, 0x05, 0x26, 0xb1, 0x0c, 0xee, 0x5e, 0xd7, 0x2c, 0xa1, 0x4b, + 0xe6, 0x72, 0xa4, 0xc4, 0x85, 0xf5, 0x40, 0x0a, 0x41, 0x03, 0x98, 0xe7, + 0x02, 0x90, 0x85, 0x10, 0x31, 0x8c, 0x50, 0x10, 0x11, 0xbd, 0xa0, 0xb6, + 0xdd, 0x2e, 0x95, 0x8b, 0x41, 0x6e, 0x85, 0xe4, 0x99, 0x8e, 0x02, 0xa8, + 0x2c, 0xc7, 0xf9, 0x0c, 0x9f, 0xb9, 0xe3, 0xe8, 0x09, 0xf0, 0x0f, 0x51, + 0xf7, 0x9b, 0xae, 0x9e, 0xd3, 0x76, 0x79, 0xf5, 0x1e, 0xa2, 0xab, 0x82, + 0x96, 0xdd, 0x00, 0xdd, 0x25, 0x44, 0xd2, 0x22, 0x42, 0x80, 0x9c, 0x02, + 0x64, 0x27, 0x6e, 0x49, 0xe0, 0x00, 0x4b, 0x31, 0xc8, 0x00, 0x90, 0x47, + 0x4e, 0x93, 0x0c, 0x13, 0x90, 0x22, 0x32, 0x9d, 0x73, 0x16, 0x67, 0xb7, + 0x32, 0x7a, 0x87, 0xfd, 0x40, 0xba, 0xed, 0x57, 0xc8, 0x3b, 0x23, 0x4e, + 0xb0, 0x54, 0x68, 0xd0, 0x0a, 0x22, 0x82, 0x8a, 0xa6, 0x47, 0x0b, 0x15, + 0xb8, 0x8a, 0x82, 0xb9, 0xc8, 0x54, 0x08, 0x64, 0x44, 0x48, 0x53, 0x28, + 0x06, 0x50, 0xe4, 0x21, 0x4c, 0x60, 0xc8, 0x68, 0xf4, 0x7d, 0xdc, 0x5e, + 0x21, 0xb5, 0x5f, 0xc1, 0xa2, 0x57, 0x24, 0x6f, 0x9d, 0x64, 0x40, 0x30, + 0x09, 0xe7, 0xe0, 0x2d, 0x83, 0x8c, 0x67, 0x6e, 0x39, 0x04, 0x90, 0x32, + 0x46, 0x1d, 0x55, 0xdc, 0x7d, 0x33, 0x59, 0xa3, 0xaa, 0xb5, 0x87, 0x6e, + 0x55, 0x35, 0x27, 0xb2, 0x14, 0x8a, 0x6b, 0x54, 0xf4, 0xd3, 0xd4, 0x48, + 0x19, 0x82, 0x92, 0xa0, 0xc9, 0x85, 0xd8, 0x0e, 0xf6, 0x0c, 0x03, 0x10, + 0x36, 0xa2, 0xb3, 0x90, 0x3a, 0x20, 0x39, 0x0f, 0xb2, 0xae, 0xf0, 0x56, + 0x29, 0x6d, 0x72, 0x36, 0x28, 0x96, 0xc3, 0xbb, 0x51, 0x48, 0x7b, 0x1a, + 0x33, 0x0c, 0xa5, 0x30, 0x3e, 0x41, 0x33, 0x99, 0x49, 0x66, 0xc0, 0x26, + 0x0f, 0x52, 0x39, 0xab, 0xd2, 0x24, 0x83, 0xde, 0x7c, 0x47, 0x80, 0x6a, + 0xe9, 0x43, 0x1b, 0x81, 0x02, 0x94, 0xc3, 0xf1, 0xd1, 0x06, 0xe5, 0xd8, + 0x5d, 0x69, 0x05, 0x17, 0xed, 0x2b, 0x3c, 0xb0, 0xd6, 0x40, 0x40, 0x2a, + 0x61, 0x93, 0x71, 0x23, 0x3c, 0x91, 0xb8, 0x20, 0x60, 0x07, 0x20, 0x26, + 0xe2, 0x7c, 0x01, 0x9e, 0x96, 0xbd, 0x33, 0xeb, 0xe3, 0xd3, 0xed, 0xda, + 0xfc, 0xfa, 0x5b, 0x59, 0x43, 0x5d, 0xa7,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4, 0x1c, 0x73, 0x8e, + 0x9d, 0xcb, 0xe6, 0x7d, 0x9c, 0xcf, 0x30, 0x49, 0xd9, 0xb5, 0xeb, 0x4e, + 0x2a, 0x6d, 0xf2, 0x55, 0xb6, 0x9a, 0xe8, 0xe5, 0x49, 0x86, 0x5c, 0xb7, + 0x49, 0xbe, 0x33, 0x0a, 0x15, 0x29, 0x73, 0x9b, 0x90, 0xf6, 0xef, 0xa4, + 0x13, 0x33, 0x87, 0x60, 0x24, 0x50, 0xbe, 0xdd, 0x88, 0x11, 0x42, 0x0a, + 0x6b, 0x1f, 0xa2, 0x1f, 0x6f, 0x6c, 0xd4, 0x13, 0x4f, 0x5b, 0xaa, 0x6f, + 0x51, 0xfb, 0x94, 0x54, 0x2a, 0x1c, 0xc6, 0x79, 0x12, 0xca, 0xe7, 0x6c, + 0x31, 0x37, 0x04, 0x85, 0x77, 0xe5, 0x8e, 0xd6, 0x1b, 0x12, 0x40, 0x47, + 0x82, 0x02, 0xfd, 0xef, 0xd5, 0x3a, 0xa2, 0x0a, 0x1b, 0x0f, 0x69, 0x7b, + 0x73, 0x52, 0x60, 0xd4, 0xda, 0x9a, 0x67, 0xa4, 0x82, 0x71, 0x92, 0xd4, + 0x54, 0x50, 0xc7, 0xee, 0x5c, 0xab, 0xd4, 0x0c, 0x7e, 0x64, 0x30, 0x10, + 0x90, 0x61, 0x95, 0xbd, 0xd9, 0x37, 0x23, 0x07, 0x41, 0xd1, 0x7a, 0xed, + 0xc9, 0x96, 0xfb, 0x81, 0x63, 0x9b, 0x76, 0xc3, 0x6d, 0xe6, 0x44, 0xed, + 0xf1, 0x98, 0x76, 0x4a, 0xd5, 0xb5, 0x4f, 0x20, 0xe7, 0x8d, 0x93, 0x62, + 0x1c, 0x41, 0xe2, 0xb9, 0x88, 0x78, 0xd6, 0x08, 0x39, 0x21, 0x58, 0x42, + 0x46, 0xc9, 0x01, 0x5f, 0xab, 0x14, 0xa2, 0x4a, 0x47, 0x11, 0xba, 0x64,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 0x14, 0x1a, 0x90, 0x7b, 0x49, 0x8a, 0xa2, 0x5d, 0xb1, 0x98, 0xac, + 0x3f, 0x62, 0x10, 0xf7, 0xf7, 0xcf, 0x21, 0x12, 0xf5, 0x26, 0xb1, 0xb5, + 0xc1, 0xa8, 0x07, 0x91, 0x9f, 0x22, 0x5f, 0x21, 0x8e, 0x5d, 0x42, 0x89, + 0x88, 0xa9, 0x9b, 0x89, 0x0e, 0x0d, 0xdc, 0x28, 0x06, 0xc5, 0x75, 0xc6, + 0x9c, 0xb0, 0xf7, 0x73, 0x48, 0x3e, 0xa8, 0xb1, 0x47, 0xb6, 0xe5, 0x00, + 0x39, 0x5c, 0x7e, 0x66, 0x54, 0x65, 0xa1, 0x70, 0x3e, 0x66, 0xc7, 0x31, + 0x93, 0xe7, 0x81, 0x95, 0x0d, 0x95, 0x28, 0x76, 0x3b, 0xb8, 0xbd, 0xc6, + 0xf4, 0x45, 0xde, 0xc4, 0xec, 0x5f, 0x76, 0xaa, 0x44, 0xda, 0x3e, 0xe2, + 0xe8, 0xd1, 0xcc, 0xad, 0xee, 0x53, 0x2a, 0x4e, 0x71, 0x05, 0xd6, 0x89, + 0xc9, 0xc0, 0x85, 0x8f, 0x15, 0x48, 0xa4, 0x06, 0x41, 0x20, 0x65, 0x33, + 0x44, 0x98, 0xa9, 0xed, 0x49, 0xc2, 0x4e, 0xdc, 0x91, 0xca, 0x22, 0x61, + 0x49, 0xc4, 0x68, 0xac, 0x9f, 0x99, 0x05, 0x33, 0xf0, 0x63, 0x22, 0x20, + 0x06, 0x28, 0xfc, 0x80, 0xfc, 0xfc, 0x80, 0xfc, 0x80, 0xf2, 0x1d, 0x25, + 0x74, 0xc0, 0xac, 0xe5, 0x4f, 0x90, 0x0f, 0xeb, 0xf5, 0x1d, 0x6e, 0x82, + 0xf3, 0x1b, 0xc3, 0x11, 0x89, 0xfe, 0x65, 0x7c, 0x1f, 0xe4, 0x1b, 0xff, + 0x00, 0x23, 0xf5, 0xe8, 0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 0x21, 0x43, 0x35, 0x3c, 0xab, 0x8d, 0xe0, 0xa6, + 0x4b, 0x44, 0x7c, 0x8c, 0xe5, 0x59, 0x70, 0x49, 0x55, 0x90, 0x67, 0x90, + 0x18, 0x32, 0xa1, 0xd9, 0x4d, 0x5b, 0xaa, 0xbd, 0x33, 0x77, 0xba, 0xbf, + 0xb1, 0x3d, 0xdb, 0x80, 0x49, 0xa7, 0x6b, 0xa7, 0x16, 0xeb, 0xcd, 0x03, + 0x9d, 0xf4, 0xef, 0x1c, 0xd8, 0x44, 0xab, 0x8f, 0xc0, 0x0f, 0x1a, 0xba, + 0x4f, 0x14, 0xc9, 0xb5, 0xda, 0x1e, 0x01, 0x52, 0xca, 0x57, 0x39, 0x89, + 0xc4, 0x3f, 0x73, 0x5e, 0xd0, 0x72, 0x19, 0x19, 0x28, 0xf4, 0x62, 0x2d, + 0x19, 0x03, 0x01, 0x06, 0x65, 0xa9, 0x99, 0x98, 0x98, 0x8b, 0x53, 0x2f, + 0x15, 0x74, 0x95, 0x7e, 0x5f, 0xd3, 0xd7, 0x01, 0xf5, 0x13, 0xf4, 0xa5, + 0x22, 0xdd, 0x34, 0x05, 0x4a, 0x20, 0x71, 0x41, 0x63, 0x80, 0xff, 0x00, + 0x23, 0x07, 0x5c, 0x6f, 0x2d, 0x17, 0x70, 0xfb, 0x4e, 0xf7, 0x17, 0x41, + 0xef, 0x34, 0x26, 0x50, 0x17, 0xf7, 0x67, 0x87, 0x3b, 0x82, 0x13, 0xc8, + 0x05, 0xd1, 0xa3, 0xcf, 0x9d, 0x8c, 0x73, 0xe4, 0xf5, 0xf6, 0x87, 0x8a, + 0xb7, 0xd2, 0x77, 0xad, 0xc8, 0xf4, 0xb3, 0x4a, 0x64, 0xa3, 0xa4, 0xb9, + 0x7e, 0x06, 0x6d, 0xc0, 0x11, 0x3d, 0xbe, 0xb0, 0x88, 0xff, 0x00, 0x35, + 0x48, 0xda, 0xc5, 0xa9, 0xa6, 0x49, 0x4a, 0x91, 0xb4, 0x48, 0xaa, 0x47, + 0x80, 0x7a, 0x48, 0xcc, 0x76, 0x98, 0x8d, 0xdc, 0xec, 0x8f, 0x64, 0xc9, + 0x37, 0x99, 0x18, 0xa8, 0x87, 0xb7, 0xcd, 0x42, 0x4b, 0x26, 0x4a, 0x4e, + 0x4c, 0xb9, 0x49, 0xab, 0x18, 0xbb, 0x3d, 0x79, 0x92, 0x72, 0x62, 0xe0, + 0xab, 0x08, 0x00, 0x26, 0x3f, 0xab, 0x44, 0x89, 0x48, 0x21, 0xc0, 0xfe, + 0xe0, 0x14, 0x3e, 0xfc, 0x75, 0xd1, 0x7c, 0x9e, 0x3d, 0x5d, 0xd9, 0x89, + 0xab, 0x6e, 0x25, 0x4b, 0xb5, 0x2f, 0xb8, 0xc4, 0xf0, 0x0c, 0xb0, 0x8d, + 0xc7, 0xfe, 0x03, 0x4a, 0x98, 0x03, 0xec, 0x71, 0xce, 0x71, 0xd5, 0xf6, + 0x84, 0xb4, 0xd6, 0xf6, 0x07, 0xfb, 0x40, 0x29, 0x34, 0xb6, 0x9d, 0x89, + 0xe4, 0x8e, 0x92, 0xf6, 0x69, 0x12, 0x34, 0x04, 0xb3, 0xd1, 0xd5, 0x48, + 0x61, 0x0a, 0x54, 0x64, 0xb7, 0xf9, 0x59, 0xb2, 0xd9, 0xc8, 0xe0, 0x9e, + 0xa9, 0x27, 0x51, 0x50, 0x55, 0x70, 0x9a, 0xa2, 0x45, 0x13, 0x15, 0x63, + 0x05, 0x53, 0x26, 0xb0, 0x88, 0xac, 0x41, 0x39, 0x91, 0x30, 0x81, 0xc4, + 0x7e, 0x7c, 0xb9, 0x11, 0xe4, 0x47, 0xe7, 0x9e, 0x79, 0xe9, 0x00, 0xa6, + 0x18, 0x98, 0xe7, 0xec, 0x7c, 0x7f, 0xc8, 0xeb, 0xd0, 0x15, 0xe9, 0x76, + 0x46, 0x53, 0x20, 0xe1, 0xf1, 0x91, 0xe3, 0x80, 0xc3, 0x8f, 0xd3, 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a6, 0xd0, 0x86, 0x5d, 0xc2, 0x7f, 0x59, 0xce, 0xda, 0x56, 0x6b, + 0xa8, 0xa5, 0xed, 0xac, 0x94, 0xba, 0x1e, 0x81, 0xaa, 0xa9, 0x8c, 0x2d, + 0x11, 0xf8, 0xc3, 0x3d, 0x38, 0x70, 0x54, 0x89, 0x63, 0x20, 0xbb, 0x05, + 0x05, 0xb6, 0xc9, 0x82, 0x8c, 0x14, 0xfb, 0x8c, 0x08, 0x20, 0xea, 0x76, + 0xcd, 0xe9, 0xaa, 0xb8, 0x7a, 0xb0, 0x82, 0xef, 0xea, 0x23, 0x53, 0xc5, + 0x6c, 0xba, 0x3d, 0x74, 0x75, 0xd1, 0x3f, 0xb6, 0xd1, 0x53, 0xde, 0x5a, + 0x39, 0x16, 0x41, 0x25, 0x05, 0x69, 0x2b, 0x4d, 0x14, 0x92, 0xca, 0xa8, + 0x26, 0xa6, 0x94, 0xc7, 0x3c, 0x2d, 0x21, 0x58, 0xa2, 0x6f, 0x84, 0x2b, + 0xd3, 0xdb, 0x5f, 0x35, 0xeb, 0x7e, 0xb5, 0xf6, 0x87, 0x88, 0x97, 0x6d, + 0x9e, 0xf1, 0xed, 0xf1, 0x7c, 0x61, 0x8a, 0x6c, 0xd9, 0x13, 0x22, 0xc4, + 0x30, 0xb2, 0x24, 0x69, 0xda, 0xcc, 0xc4, 0x8a, 0xaf, 0xe5, 0x14, 0xad, + 0x2d, 0x14, 0xb0, 0x95, 0xe2, 0x4e, 0x51, 0x59, 0xd2, 0x2c, 0x0a, 0x45, + 0x12, 0x0f, 0x70, 0xb7, 0xd6, 0x97, 0x9a, 0x6b, 0x26, 0x63, 0x4d, 0x76, + 0xf6, 0xf7, 0xa7, 0xf4, 0xf7, 0x6a, 0x04, 0xc2, 0xba, 0x39, 0x5e, 0x38, + 0xa4, 0x95, 0xd4, 0x30, 0x0c, 0xae, 0xe5, 0x9c, 0x47, 0xb0, 0x90, 0x43, + 0x65, 0x95, 0x06, 0x46, 0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6b, 0xab, 0x7a, + 0xfe, 0x4e, 0x92, 0x31, 0x43, 0xf9, 0x3d, 0x99, 0x84, 0x59, 0x97, 0xb8, + 0x30, 0xf2, 0x22, 0x22, 0xa2, 0x3f, 0x71, 0x11, 0xfb, 0x88, 0xf2, 0x41, + 0xfe, 0xf4, 0xae, 0x95, 0x23, 0x37, 0xab, 0x6d, 0x15, 0x54, 0xad, 0xcb, + 0xcb, 0x24, 0x01, 0x64, 0x63, 0xf7, 0x2d, 0x09, 0x8b, 0x3f, 0xae, 0xec, + 0x9f, 0xd7, 0xa0, 0x44, 0x5e, 0x9c, 0x34, 0xd5, 0x8d, 0x12, 0x97, 0xb6, + 0xfa, 0xbb, 0x51, 0xd8, 0x68, 0xd0, 0x61, 0x69, 0x68, 0xee, 0x8d, 0x2d, + 0x22, 0x0f, 0xb4, 0x70, 0x56, 0x25, 0x46, 0xc0, 0x3c, 0x0d, 0xaf, 0xe3, + 0x8e, 0xb5, 0x2e, 0xfc, 0x65, 0xfa, 0xa0, 0xfa, 0xda, 0xf3, 0x83, 0xb4, + 0xc7, 0x51, 0xa5, 0xce, 0xc9, 0x68, 0xe5, 0x6e, 0xda, 0xff, 0x00, 0xaf, + 0x2c, 0x10, 0xca, 0x7e, 0x8a, 0xe4, 0x14, 0xd4, 0x2a, 0x56, 0x69, 0x63, + 0x3e, 0x72, 0x90, 0xf8, 0x88, 0x80, 0x19, 0x12, 0x90, 0x4b, 0xf7, 0x28, + 0x94, 0xdf, 0x3d, 0x51, 0xbb, 0xa7, 0x7b, 0x80, 0x03, 0x64, 0xa1, 0xa3, + 0xa2, 0x90, 0x64, 0x09, 0x20, 0x80, 0x7b, 0x9b, 0x4f, 0xcc, 0x37, 0xc9, + 0xee, 0x38, 0xcf, 0x8c, 0xab, 0x29, 0x1e, 0x47, 0x23, 0xaa, 0x9f, 0x4d, + 0x7a, 0x22, 0xf1, 0x94, 0xee, 0x66, 0xa1, 0xbf, 0x6a, 0x38, 0x37, 0x2b, + 0x8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9 +}; +unsigned int logo_jpg_len = 7561; diff --git a/esp_jpeg/test/test_logo_rgb888.h b/esp_jpeg/test/test_logo_rgb888.h new file mode 100644 index 0000000..6b08355 --- /dev/null +++ b/esp_jpeg/test/test_logo_rgb888.h @@ -0,0 +1,3 @@ +unsigned char logo_rgb888[] = { + 0xe1, 0x3b, 0x1f, 0xdf, 0x33, 0x16, 0xe1, 0x2f, 0x14, 0xe2, 0x30, 0x16, 0xdf, 0x2e, 0x14, 0xe1, 0x32, 0x16, 0xdf, 0x30, 0x14, 0xe1, 0x30, 0x16, 0xe3, 0x2e, 0x17, 0xdd, 0x33, 0x15, 0xe1, 0x30, 0x16, 0xe1, 0x2f, 0x12, 0xdf, 0x30, 0x14, 0xdc, 0x32, 0x14, 0xdf, 0x30, 0x15, 0xe2, 0x30, 0x15, 0xe0, 0x2f, 0x15, 0xe1, 0x31, 0x15, 0xe0, 0x2f, 0x15, 0xe2, 0x32, 0x16, 0xde, 0x32, 0x13, 0xdf, 0x30, 0x14, 0xe0, 0x31, 0x18, 0xe1, 0x31, 0x15, 0xe2, 0x30, 0x13, 0xdd, 0x30, 0x17, 0xdf, 0x30, 0x17, 0xe2, 0x30, 0x13, 0xe2, 0x30, 0x15, 0xdf, 0x30, 0x14, 0xe1, 0x33, 0x14, 0xe0, 0x30, 0x14, 0xdd, 0x31, 0x15, 0xdf, 0x30, 0x15, 0xe0, 0x30, 0x14, 0xe2, 0x30, 0x15, 0xdf, 0x30, 0x15, 0xdd, 0x31, 0x12, 0xdf, 0x2f, 0x13, 0xe1, 0x30, 0x18, 0xe2, 0x30, 0x16, 0xe1, 0x2f, 0x14, 0xe0, 0x31, 0x16, 0xe1, 0x30, 0x16, 0xe0, 0x30, 0x12, 0xe3, 0x3e, 0x26, 0xe3, 0x24, 0x0d, 0xdf, 0x29, 0x0d, 0xdd, 0x29, 0x0a, 0xdf, 0x26, 0x0b, 0xdf, 0x29, 0x0d, 0xdd, 0x27, 0x0b, 0xdd, 0x24, 0x07,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, 0xe1, 0x32, 0x17, 0xe0, 0x31, 0x15, 0xe2, 0x31, 0x17, 0xe2, 0x30, 0x16, 0xe2, 0x32, 0x14, 0xe0, 0x31, 0x15, 0xe0, 0x31, 0x16, 0xe2, 0x32, 0x14, 0xde, 0x32, 0x16, 0xe3, 0x33, 0x15, 0xdf, 0x33, 0x17, 0xe1, 0x32, 0x17, 0xe1, 0x32, 0x16, 0xe1, 0x32, 0x16, 0xdf, 0x30, 0x15, 0xe2, 0x33, 0x18, 0xe0, 0x31, 0x15, 0xe1, 0x30, 0x18, 0xde, 0x31, 0x18, 0xde, 0x32, 0x16, 0xe3, 0x33, 0x17, 0xde, 0x32, 0x16, 0xde, 0x31, 0x1a, 0xe4, 0x32, 0x18, 0xe1, 0x30, 0x16, 0xe2, 0x31, 0x1b, 0xe1, 0x2f, 0x1c, 0xde, 0x2f, 0x13, 0xe1, 0x32, 0x17, 0xe1, 0x32, 0x16, 0xe1, 0x32, 0x17, 0xe1, 0x32, 0x16, 0xe2, 0x31, 0x17, 0xe1, 0x32, 0x17, 0xe2, 0x31, 0x17, 0xe1, 0x31, 0x15, 0xe0, 0x31, 0x16, 0xe0, 0x31, 0x16, 0xdf, 0x2f, 0x11, 0xe1, 0x3f, 0x24 +}; \ No newline at end of file diff --git a/esp_jpeg/test/tjpgd_test.c b/esp_jpeg/test/tjpgd_test.c new file mode 100644 index 0000000..0cabb05 --- /dev/null +++ b/esp_jpeg/test/tjpgd_test.c @@ -0,0 +1,78 @@ +/* + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Unlicense OR CC0-1.0 + */ +#include +#include +#include +#include +#include "sdkconfig.h" +#include "unity.h" + + +#include "../include/jpeg_decoder.h" +#include "test_logo_jpg.h" +#include "test_logo_rgb888.h" + +#define TESTW 46 +#define TESTH 46 + +TEST_CASE("Test JPEG decompression library", "[esp_jpeg]") +{ + char aapix[] = " .:;+=xX$$"; + unsigned char *decoded, *p, *o; + int x, y, v; + int decoded_outsize = TESTW * TESTH * 3; + + decoded = malloc(decoded_outsize); + for (x = 0; x < decoded_outsize; x += 2) { + decoded[x] = 0; + decoded[x + 1] = 0xff; + } + + /* JPEG decode */ + esp_jpeg_image_cfg_t jpeg_cfg = { + .indata = (uint8_t *)logo_jpg, + .indata_size = sizeof(logo_jpg), + .outbuf = decoded, + .outbuf_size = decoded_outsize, + .out_format = JPEG_IMAGE_FORMAT_RGB888, + .out_scale = JPEG_IMAGE_SCALE_0, + .flags = { + .swap_color_bytes = 0, + } + }; + esp_jpeg_image_output_t outimg; + esp_err_t err = esp_jpeg_decode(&jpeg_cfg, &outimg); + TEST_ASSERT_EQUAL(err, ESP_OK); + + /* Decoded image size */ + TEST_ASSERT_EQUAL(outimg.width, TESTW); + TEST_ASSERT_EQUAL(outimg.height, TESTH); + + p = decoded; + o = logo_rgb888; + for (x = 0; x < outimg.width * outimg.height; x++) { + /* The color can be +- 2 */ + TEST_ASSERT(p[0] >= (o[0] - 2) && p[0] <= (o[0] + 2)); + TEST_ASSERT(p[1] >= (o[1] - 2) && p[1] <= (o[1] + 2)); + TEST_ASSERT(p[2] >= (o[2] - 2) && p[2] <= (o[2] + 2)); + + p += 3; + o += 3; + } + + p = decoded + 2; + for (y = 0; y < outimg.width; y++) { + for (x = 0; x < outimg.height; x++) { + v = ((*p) * (sizeof(aapix) - 2) * 2) / 256; + printf("%c%c", aapix[v / 2], aapix[(v + 1) / 2]); + p += 3; + } + printf("%c%c", ' ', '\n'); + } + + + free(decoded); +} diff --git a/esp_jpeg/tjpgd/tjpgd.c b/esp_jpeg/tjpgd/tjpgd.c new file mode 100644 index 0000000..51856fb --- /dev/null +++ b/esp_jpeg/tjpgd/tjpgd.c @@ -0,0 +1,1297 @@ +/*----------------------------------------------------------------------------/ +/ TJpgDec - Tiny JPEG Decompressor R0.03 (C)ChaN, 2021 +/-----------------------------------------------------------------------------/ +/ The TJpgDec is a generic JPEG decompressor module for tiny embedded systems. +/ This is a free software that opened for education, research and commercial +/ developments under license policy of following terms. +/ +/ Copyright (C) 2021, ChaN, all right reserved. +/ +/ * The TJpgDec module is a free software and there is NO WARRANTY. +/ * No restriction on use. You can use, modify and redistribute it for +/ personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY. +/ * Redistributions of source code must retain the above copyright notice. +/ +/-----------------------------------------------------------------------------/ +/ Oct 04, 2011 R0.01 First release. +/ Feb 19, 2012 R0.01a Fixed decompression fails when scan starts with an escape seq. +/ Sep 03, 2012 R0.01b Added JD_TBLCLIP option. +/ Mar 16, 2019 R0.01c Supprted stdint.h. +/ Jul 01, 2020 R0.01d Fixed wrong integer type usage. +/ May 08, 2021 R0.02 Supprted grayscale image. Separated configuration options. +/ Jun 11, 2021 R0.02a Some performance improvement. +/ Jul 01, 2021 R0.03 Added JD_FASTDECODE option. +/ Some performance improvement. +/----------------------------------------------------------------------------*/ + +#include "tjpgd.h" + + +#if JD_FASTDECODE == 2 +#define HUFF_BIT 10 /* Bit length to apply fast huffman decode */ +#define HUFF_LEN (1 << HUFF_BIT) +#define HUFF_MASK (HUFF_LEN - 1) +#endif + + +/*-----------------------------------------------*/ +/* Zigzag-order to raster-order conversion table */ +/*-----------------------------------------------*/ + +static const uint8_t Zig[64] = { /* Zigzag-order to raster-order conversion table */ + 0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, + 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, + 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, + 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63 +}; + + + +/*-------------------------------------------------*/ +/* Input scale factor of Arai algorithm */ +/* (scaled up 16 bits for fixed point operations) */ +/*-------------------------------------------------*/ + +static const uint16_t Ipsf[64] = { /* See also aa_idct.png */ + (uint16_t)(1.00000 * 8192), (uint16_t)(1.38704 * 8192), (uint16_t)(1.30656 * 8192), (uint16_t)(1.17588 * 8192), (uint16_t)(1.00000 * 8192), (uint16_t)(0.78570 * 8192), (uint16_t)(0.54120 * 8192), (uint16_t)(0.27590 * 8192), + (uint16_t)(1.38704 * 8192), (uint16_t)(1.92388 * 8192), (uint16_t)(1.81226 * 8192), (uint16_t)(1.63099 * 8192), (uint16_t)(1.38704 * 8192), (uint16_t)(1.08979 * 8192), (uint16_t)(0.75066 * 8192), (uint16_t)(0.38268 * 8192), + (uint16_t)(1.30656 * 8192), (uint16_t)(1.81226 * 8192), (uint16_t)(1.70711 * 8192), (uint16_t)(1.53636 * 8192), (uint16_t)(1.30656 * 8192), (uint16_t)(1.02656 * 8192), (uint16_t)(0.70711 * 8192), (uint16_t)(0.36048 * 8192), + (uint16_t)(1.17588 * 8192), (uint16_t)(1.63099 * 8192), (uint16_t)(1.53636 * 8192), (uint16_t)(1.38268 * 8192), (uint16_t)(1.17588 * 8192), (uint16_t)(0.92388 * 8192), (uint16_t)(0.63638 * 8192), (uint16_t)(0.32442 * 8192), + (uint16_t)(1.00000 * 8192), (uint16_t)(1.38704 * 8192), (uint16_t)(1.30656 * 8192), (uint16_t)(1.17588 * 8192), (uint16_t)(1.00000 * 8192), (uint16_t)(0.78570 * 8192), (uint16_t)(0.54120 * 8192), (uint16_t)(0.27590 * 8192), + (uint16_t)(0.78570 * 8192), (uint16_t)(1.08979 * 8192), (uint16_t)(1.02656 * 8192), (uint16_t)(0.92388 * 8192), (uint16_t)(0.78570 * 8192), (uint16_t)(0.61732 * 8192), (uint16_t)(0.42522 * 8192), (uint16_t)(0.21677 * 8192), + (uint16_t)(0.54120 * 8192), (uint16_t)(0.75066 * 8192), (uint16_t)(0.70711 * 8192), (uint16_t)(0.63638 * 8192), (uint16_t)(0.54120 * 8192), (uint16_t)(0.42522 * 8192), (uint16_t)(0.29290 * 8192), (uint16_t)(0.14932 * 8192), + (uint16_t)(0.27590 * 8192), (uint16_t)(0.38268 * 8192), (uint16_t)(0.36048 * 8192), (uint16_t)(0.32442 * 8192), (uint16_t)(0.27590 * 8192), (uint16_t)(0.21678 * 8192), (uint16_t)(0.14932 * 8192), (uint16_t)(0.07612 * 8192) +}; + + + +/*---------------------------------------------*/ +/* Conversion table for fast clipping process */ +/*---------------------------------------------*/ + +#if JD_TBLCLIP + +#define BYTECLIP(v) Clip8[(unsigned int)(v) & 0x3FF] + +static const uint8_t Clip8[1024] = { + /* 0..255 */ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + /* 256..511 */ + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + /* -512..-257 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +#else /* JD_TBLCLIP */ + +static uint8_t BYTECLIP (int val) +{ + if (val < 0) { + return 0; + } + if (val > 255) { + return 255; + } + return (uint8_t)val; +} + +#endif + + + +/*-----------------------------------------------------------------------*/ +/* Allocate a memory block from memory pool */ +/*-----------------------------------------------------------------------*/ + +static void *alloc_pool ( /* Pointer to allocated memory block (NULL:no memory available) */ + JDEC *jd, /* Pointer to the decompressor object */ + size_t ndata /* Number of bytes to allocate */ +) +{ + char *rp = 0; + + + ndata = (ndata + 3) & ~3; /* Align block size to the word boundary */ + + if (jd->sz_pool >= ndata) { + jd->sz_pool -= ndata; + rp = (char *)jd->pool; /* Get start of available memory pool */ + jd->pool = (void *)(rp + ndata); /* Allocate requierd bytes */ + } + + return (void *)rp; /* Return allocated memory block (NULL:no memory to allocate) */ +} + + + + +/*-----------------------------------------------------------------------*/ +/* Create de-quantization and prescaling tables with a DQT segment */ +/*-----------------------------------------------------------------------*/ + +static JRESULT create_qt_tbl ( /* 0:OK, !0:Failed */ + JDEC *jd, /* Pointer to the decompressor object */ + const uint8_t *data, /* Pointer to the quantizer tables */ + size_t ndata /* Size of input data */ +) +{ + unsigned int i, zi; + uint8_t d; + int32_t *pb; + + + while (ndata) { /* Process all tables in the segment */ + if (ndata < 65) { + return JDR_FMT1; /* Err: table size is unaligned */ + } + ndata -= 65; + d = *data++; /* Get table property */ + if (d & 0xF0) { + return JDR_FMT1; /* Err: not 8-bit resolution */ + } + i = d & 3; /* Get table ID */ + pb = alloc_pool(jd, 64 * sizeof (int32_t));/* Allocate a memory block for the table */ + if (!pb) { + return JDR_MEM1; /* Err: not enough memory */ + } + jd->qttbl[i] = pb; /* Register the table */ + for (i = 0; i < 64; i++) { /* Load the table */ + zi = Zig[i]; /* Zigzag-order to raster-order conversion */ + pb[zi] = (int32_t)((uint32_t) * data++ * Ipsf[zi]); /* Apply scale factor of Arai algorithm to the de-quantizers */ + } + } + + return JDR_OK; +} + + + + +/*-----------------------------------------------------------------------*/ +/* Create huffman code tables with a DHT segment */ +/*-----------------------------------------------------------------------*/ + +static JRESULT create_huffman_tbl ( /* 0:OK, !0:Failed */ + JDEC *jd, /* Pointer to the decompressor object */ + const uint8_t *data, /* Pointer to the packed huffman tables */ + size_t ndata /* Size of input data */ +) +{ + unsigned int i, j, b, cls, num; + size_t np; + uint8_t d, *pb, *pd; + uint16_t hc, *ph; + + + while (ndata) { /* Process all tables in the segment */ + if (ndata < 17) { + return JDR_FMT1; /* Err: wrong data size */ + } + ndata -= 17; + d = *data++; /* Get table number and class */ + if (d & 0xEE) { + return JDR_FMT1; /* Err: invalid class/number */ + } + cls = d >> 4; num = d & 0x0F; /* class = dc(0)/ac(1), table number = 0/1 */ + pb = alloc_pool(jd, 16); /* Allocate a memory block for the bit distribution table */ + if (!pb) { + return JDR_MEM1; /* Err: not enough memory */ + } + jd->huffbits[num][cls] = pb; + for (np = i = 0; i < 16; i++) { /* Load number of patterns for 1 to 16-bit code */ + np += (pb[i] = *data++); /* Get sum of code words for each code */ + } + ph = alloc_pool(jd, np * sizeof (uint16_t));/* Allocate a memory block for the code word table */ + if (!ph) { + return JDR_MEM1; /* Err: not enough memory */ + } + jd->huffcode[num][cls] = ph; + hc = 0; + for (j = i = 0; i < 16; i++) { /* Re-build huffman code word table */ + b = pb[i]; + while (b--) { + ph[j++] = hc++; + } + hc <<= 1; + } + + if (ndata < np) { + return JDR_FMT1; /* Err: wrong data size */ + } + ndata -= np; + pd = alloc_pool(jd, np); /* Allocate a memory block for the decoded data */ + if (!pd) { + return JDR_MEM1; /* Err: not enough memory */ + } + jd->huffdata[num][cls] = pd; + for (i = 0; i < np; i++) { /* Load decoded data corresponds to each code word */ + d = *data++; + if (!cls && d > 11) { + return JDR_FMT1; + } + pd[i] = d; + } +#if JD_FASTDECODE == 2 + { /* Create fast huffman decode table */ + unsigned int span, td, ti; + uint16_t *tbl_ac = 0; + uint8_t *tbl_dc = 0; + + if (cls) { + tbl_ac = alloc_pool(jd, HUFF_LEN * sizeof (uint16_t)); /* LUT for AC elements */ + if (!tbl_ac) { + return JDR_MEM1; /* Err: not enough memory */ + } + jd->hufflut_ac[num] = tbl_ac; + memset(tbl_ac, 0xFF, HUFF_LEN * sizeof (uint16_t)); /* Default value (0xFFFF: may be long code) */ + } else { + tbl_dc = alloc_pool(jd, HUFF_LEN * sizeof (uint8_t)); /* LUT for AC elements */ + if (!tbl_dc) { + return JDR_MEM1; /* Err: not enough memory */ + } + jd->hufflut_dc[num] = tbl_dc; + memset(tbl_dc, 0xFF, HUFF_LEN * sizeof (uint8_t)); /* Default value (0xFF: may be long code) */ + } + for (i = b = 0; b < HUFF_BIT; b++) { /* Create LUT */ + for (j = pb[b]; j; j--) { + ti = ph[i] << (HUFF_BIT - 1 - b) & HUFF_MASK; /* Index of input pattern for the code */ + if (cls) { + td = pd[i++] | ((b + 1) << 8); /* b15..b8: code length, b7..b0: zero run and data length */ + for (span = 1 << (HUFF_BIT - 1 - b); span; span--, tbl_ac[ti++] = (uint16_t)td) ; + } else { + td = pd[i++] | ((b + 1) << 4); /* b7..b4: code length, b3..b0: data length */ + for (span = 1 << (HUFF_BIT - 1 - b); span; span--, tbl_dc[ti++] = (uint8_t)td) ; + } + } + } + jd->longofs[num][cls] = i; /* Code table offset for long code */ + } +#endif + } + + return JDR_OK; +} + + + + +/*-----------------------------------------------------------------------*/ +/* Extract a huffman decoded data from input stream */ +/*-----------------------------------------------------------------------*/ + +static int huffext ( /* >=0: decoded data, <0: error code */ + JDEC *jd, /* Pointer to the decompressor object */ + unsigned int id, /* Table ID (0:Y, 1:C) */ + unsigned int cls /* Table class (0:DC, 1:AC) */ +) +{ + size_t dc = jd->dctr; + uint8_t *dp = jd->dptr; + unsigned int d, flg = 0; + +#if JD_FASTDECODE == 0 + uint8_t bm, nd, bl; + const uint8_t *hb = jd->huffbits[id][cls]; /* Bit distribution table */ + const uint16_t *hc = jd->huffcode[id][cls]; /* Code word table */ + const uint8_t *hd = jd->huffdata[id][cls]; /* Data table */ + + + bm = jd->dbit; /* Bit mask to extract */ + d = 0; bl = 16; /* Max code length */ + do { + if (!bm) { /* Next byte? */ + if (!dc) { /* No input data is available, re-fill input buffer */ + dp = jd->inbuf; /* Top of input buffer */ + dc = jd->infunc(jd, dp, JD_SZBUF); + if (!dc) { + return 0 - (int)JDR_INP; /* Err: read error or wrong stream termination */ + } + } else { + dp++; /* Next data ptr */ + } + dc--; /* Decrement number of available bytes */ + if (flg) { /* In flag sequence? */ + flg = 0; /* Exit flag sequence */ + if (*dp != 0) { + return 0 - (int)JDR_FMT1; /* Err: unexpected flag is detected (may be collapted data) */ + } + *dp = 0xFF; /* The flag is a data 0xFF */ + } else { + if (*dp == 0xFF) { /* Is start of flag sequence? */ + flg = 1; continue; /* Enter flag sequence, get trailing byte */ + } + } + bm = 0x80; /* Read from MSB */ + } + d <<= 1; /* Get a bit */ + if (*dp & bm) { + d++; + } + bm >>= 1; + + for (nd = *hb++; nd; nd--) { /* Search the code word in this bit length */ + if (d == *hc++) { /* Matched? */ + jd->dbit = bm; jd->dctr = dc; jd->dptr = dp; + return *hd; /* Return the decoded data */ + } + hd++; + } + bl--; + } while (bl); + +#else + const uint8_t *hb, *hd; + const uint16_t *hc; + unsigned int nc, bl, wbit = jd->dbit % 32; + uint32_t w = jd->wreg & ((1UL << wbit) - 1); + + + while (wbit < 16) { /* Prepare 16 bits into the working register */ + if (jd->marker) { + d = 0xFF; /* Input stream has stalled for a marker. Generate stuff bits */ + } else { + if (!dc) { /* Buffer empty, re-fill input buffer */ + dp = jd->inbuf; /* Top of input buffer */ + dc = jd->infunc(jd, dp, JD_SZBUF); + if (!dc) { + return 0 - (int)JDR_INP; /* Err: read error or wrong stream termination */ + } + } + d = *dp++; dc--; + if (flg) { /* In flag sequence? */ + flg = 0; /* Exit flag sequence */ + if (d != 0) { + jd->marker = d; /* Not an escape of 0xFF but a marker */ + } + d = 0xFF; + } else { + if (d == 0xFF) { /* Is start of flag sequence? */ + flg = 1; continue; /* Enter flag sequence, get trailing byte */ + } + } + } + w = w << 8 | d; /* Shift 8 bits in the working register */ + wbit += 8; + } + jd->dctr = dc; jd->dptr = dp; + jd->wreg = w; + +#if JD_FASTDECODE == 2 + /* Table serch for the short codes */ + d = (unsigned int)(w >> (wbit - HUFF_BIT)); /* Short code as table index */ + if (cls) { /* AC element */ + d = jd->hufflut_ac[id][d]; /* Table decode */ + if (d != 0xFFFF) { /* It is done if hit in short code */ + jd->dbit = wbit - (d >> 8); /* Snip the code length */ + return d & 0xFF; /* b7..0: zero run and following data bits */ + } + } else { /* DC element */ + d = jd->hufflut_dc[id][d]; /* Table decode */ + if (d != 0xFF) { /* It is done if hit in short code */ + jd->dbit = wbit - (d >> 4); /* Snip the code length */ + return d & 0xF; /* b3..0: following data bits */ + } + } + + /* Incremental serch for the codes longer than HUFF_BIT */ + hb = jd->huffbits[id][cls] + HUFF_BIT; /* Bit distribution table */ + hc = jd->huffcode[id][cls] + jd->longofs[id][cls]; /* Code word table */ + hd = jd->huffdata[id][cls] + jd->longofs[id][cls]; /* Data table */ + bl = HUFF_BIT + 1; +#else + /* Incremental serch for all codes */ + hb = jd->huffbits[id][cls]; /* Bit distribution table */ + hc = jd->huffcode[id][cls]; /* Code word table */ + hd = jd->huffdata[id][cls]; /* Data table */ + bl = 1; +#endif + for ( ; bl <= 16; bl++) { /* Incremental search */ + nc = *hb++; + if (nc) { + d = w >> (wbit - bl); + do { /* Search the code word in this bit length */ + if (d == *hc++) { /* Matched? */ + jd->dbit = wbit - bl; /* Snip the huffman code */ + return *hd; /* Return the decoded data */ + } + hd++; + } while (--nc); + } + } +#endif + + return 0 - (int)JDR_FMT1; /* Err: code not found (may be collapted data) */ +} + + + + +/*-----------------------------------------------------------------------*/ +/* Extract N bits from input stream */ +/*-----------------------------------------------------------------------*/ + +static int bitext ( /* >=0: extracted data, <0: error code */ + JDEC *jd, /* Pointer to the decompressor object */ + unsigned int nbit /* Number of bits to extract (1 to 16) */ +) +{ + size_t dc = jd->dctr; + uint8_t *dp = jd->dptr; + unsigned int d, flg = 0; + +#if JD_FASTDECODE == 0 + uint8_t mbit = jd->dbit; + + d = 0; + do { + if (!mbit) { /* Next byte? */ + if (!dc) { /* No input data is available, re-fill input buffer */ + dp = jd->inbuf; /* Top of input buffer */ + dc = jd->infunc(jd, dp, JD_SZBUF); + if (!dc) { + return 0 - (int)JDR_INP; /* Err: read error or wrong stream termination */ + } + } else { + dp++; /* Next data ptr */ + } + dc--; /* Decrement number of available bytes */ + if (flg) { /* In flag sequence? */ + flg = 0; /* Exit flag sequence */ + if (*dp != 0) { + return 0 - (int)JDR_FMT1; /* Err: unexpected flag is detected (may be collapted data) */ + } + *dp = 0xFF; /* The flag is a data 0xFF */ + } else { + if (*dp == 0xFF) { /* Is start of flag sequence? */ + flg = 1; continue; /* Enter flag sequence */ + } + } + mbit = 0x80; /* Read from MSB */ + } + d <<= 1; /* Get a bit */ + if (*dp & mbit) { + d |= 1; + } + mbit >>= 1; + nbit--; + } while (nbit); + + jd->dbit = mbit; jd->dctr = dc; jd->dptr = dp; + return (int)d; + +#else + unsigned int wbit = jd->dbit % 32; + uint32_t w = jd->wreg & ((1UL << wbit) - 1); + + + while (wbit < nbit) { /* Prepare nbit bits into the working register */ + if (jd->marker) { + d = 0xFF; /* Input stream stalled, generate stuff bits */ + } else { + if (!dc) { /* Buffer empty, re-fill input buffer */ + dp = jd->inbuf; /* Top of input buffer */ + dc = jd->infunc(jd, dp, JD_SZBUF); + if (!dc) { + return 0 - (int)JDR_INP; /* Err: read error or wrong stream termination */ + } + } + d = *dp++; dc--; + if (flg) { /* In flag sequence? */ + flg = 0; /* Exit flag sequence */ + if (d != 0) { + jd->marker = d; /* Not an escape of 0xFF but a marker */ + } + d = 0xFF; + } else { + if (d == 0xFF) { /* Is start of flag sequence? */ + flg = 1; continue; /* Enter flag sequence, get trailing byte */ + } + } + } + w = w << 8 | d; /* Get 8 bits into the working register */ + wbit += 8; + } + jd->wreg = w; jd->dbit = wbit - nbit; + jd->dctr = dc; jd->dptr = dp; + + return (int)(w >> ((wbit - nbit) % 32)); +#endif +} + + + + +/*-----------------------------------------------------------------------*/ +/* Process restart interval */ +/*-----------------------------------------------------------------------*/ + +static JRESULT restart ( + JDEC *jd, /* Pointer to the decompressor object */ + uint16_t rstn /* Expected restert sequense number */ +) +{ + unsigned int i; + uint8_t *dp = jd->dptr; + size_t dc = jd->dctr; + +#if JD_FASTDECODE == 0 + uint16_t d = 0; + + /* Get two bytes from the input stream */ + for (i = 0; i < 2; i++) { + if (!dc) { /* No input data is available, re-fill input buffer */ + dp = jd->inbuf; + dc = jd->infunc(jd, dp, JD_SZBUF); + if (!dc) { + return JDR_INP; + } + } else { + dp++; + } + dc--; + d = d << 8 | *dp; /* Get a byte */ + } + jd->dptr = dp; jd->dctr = dc; jd->dbit = 0; + + /* Check the marker */ + if ((d & 0xFFD8) != 0xFFD0 || (d & 7) != (rstn & 7)) { + return JDR_FMT1; /* Err: expected RSTn marker is not detected (may be collapted data) */ + } + +#else + uint16_t marker; + + + if (jd->marker) { /* Generate a maker if it has been detected */ + marker = 0xFF00 | jd->marker; + jd->marker = 0; + } else { + marker = 0; + for (i = 0; i < 2; i++) { /* Get a restart marker */ + if (!dc) { /* No input data is available, re-fill input buffer */ + dp = jd->inbuf; + dc = jd->infunc(jd, dp, JD_SZBUF); + if (!dc) { + return JDR_INP; + } + } + marker = (marker << 8) | *dp++; /* Get a byte */ + dc--; + } + jd->dptr = dp; jd->dctr = dc; + } + + /* Check the marker */ + if ((marker & 0xFFD8) != 0xFFD0 || (marker & 7) != (rstn & 7)) { + return JDR_FMT1; /* Err: expected RSTn marker was not detected (may be collapted data) */ + } + + jd->dbit = 0; /* Discard stuff bits */ +#endif + + jd->dcv[2] = jd->dcv[1] = jd->dcv[0] = 0; /* Reset DC offset */ + return JDR_OK; +} + + + + +/*-----------------------------------------------------------------------*/ +/* Apply Inverse-DCT in Arai Algorithm (see also aa_idct.png) */ +/*-----------------------------------------------------------------------*/ + +static void block_idct ( + int32_t *src, /* Input block data (de-quantized and pre-scaled for Arai Algorithm) */ + jd_yuv_t *dst /* Pointer to the destination to store the block as byte array */ +) +{ + const int32_t M13 = (int32_t)(1.41421 * 4096), M2 = (int32_t)(1.08239 * 4096), M4 = (int32_t)(2.61313 * 4096), M5 = (int32_t)(1.84776 * 4096); + int32_t v0, v1, v2, v3, v4, v5, v6, v7; + int32_t t10, t11, t12, t13; + int i; + + /* Process columns */ + for (i = 0; i < 8; i++) { + v0 = src[8 * 0]; /* Get even elements */ + v1 = src[8 * 2]; + v2 = src[8 * 4]; + v3 = src[8 * 6]; + + t10 = v0 + v2; /* Process the even elements */ + t12 = v0 - v2; + t11 = (v1 - v3) * M13 >> 12; + v3 += v1; + t11 -= v3; + v0 = t10 + v3; + v3 = t10 - v3; + v1 = t11 + t12; + v2 = t12 - t11; + + v4 = src[8 * 7]; /* Get odd elements */ + v5 = src[8 * 1]; + v6 = src[8 * 5]; + v7 = src[8 * 3]; + + t10 = v5 - v4; /* Process the odd elements */ + t11 = v5 + v4; + t12 = v6 - v7; + v7 += v6; + v5 = (t11 - v7) * M13 >> 12; + v7 += t11; + t13 = (t10 + t12) * M5 >> 12; + v4 = t13 - (t10 * M2 >> 12); + v6 = t13 - (t12 * M4 >> 12) - v7; + v5 -= v6; + v4 -= v5; + + src[8 * 0] = v0 + v7; /* Write-back transformed values */ + src[8 * 7] = v0 - v7; + src[8 * 1] = v1 + v6; + src[8 * 6] = v1 - v6; + src[8 * 2] = v2 + v5; + src[8 * 5] = v2 - v5; + src[8 * 3] = v3 + v4; + src[8 * 4] = v3 - v4; + + src++; /* Next column */ + } + + /* Process rows */ + src -= 8; + for (i = 0; i < 8; i++) { + v0 = src[0] + (128L << 8); /* Get even elements (remove DC offset (-128) here) */ + v1 = src[2]; + v2 = src[4]; + v3 = src[6]; + + t10 = v0 + v2; /* Process the even elements */ + t12 = v0 - v2; + t11 = (v1 - v3) * M13 >> 12; + v3 += v1; + t11 -= v3; + v0 = t10 + v3; + v3 = t10 - v3; + v1 = t11 + t12; + v2 = t12 - t11; + + v4 = src[7]; /* Get odd elements */ + v5 = src[1]; + v6 = src[5]; + v7 = src[3]; + + t10 = v5 - v4; /* Process the odd elements */ + t11 = v5 + v4; + t12 = v6 - v7; + v7 += v6; + v5 = (t11 - v7) * M13 >> 12; + v7 += t11; + t13 = (t10 + t12) * M5 >> 12; + v4 = t13 - (t10 * M2 >> 12); + v6 = t13 - (t12 * M4 >> 12) - v7; + v5 -= v6; + v4 -= v5; + + /* Descale the transformed values 8 bits and output a row */ +#if JD_FASTDECODE >= 1 + dst[0] = (int16_t)((v0 + v7) >> 8); + dst[7] = (int16_t)((v0 - v7) >> 8); + dst[1] = (int16_t)((v1 + v6) >> 8); + dst[6] = (int16_t)((v1 - v6) >> 8); + dst[2] = (int16_t)((v2 + v5) >> 8); + dst[5] = (int16_t)((v2 - v5) >> 8); + dst[3] = (int16_t)((v3 + v4) >> 8); + dst[4] = (int16_t)((v3 - v4) >> 8); +#else + dst[0] = BYTECLIP((v0 + v7) >> 8); + dst[7] = BYTECLIP((v0 - v7) >> 8); + dst[1] = BYTECLIP((v1 + v6) >> 8); + dst[6] = BYTECLIP((v1 - v6) >> 8); + dst[2] = BYTECLIP((v2 + v5) >> 8); + dst[5] = BYTECLIP((v2 - v5) >> 8); + dst[3] = BYTECLIP((v3 + v4) >> 8); + dst[4] = BYTECLIP((v3 - v4) >> 8); +#endif + + dst += 8; src += 8; /* Next row */ + } +} + + + + +/*-----------------------------------------------------------------------*/ +/* Load all blocks in an MCU into working buffer */ +/*-----------------------------------------------------------------------*/ + +static JRESULT mcu_load ( + JDEC *jd /* Pointer to the decompressor object */ +) +{ + int32_t *tmp = (int32_t *)jd->workbuf; /* Block working buffer for de-quantize and IDCT */ + int d, e; + unsigned int blk, nby, i, bc, z, id, cmp; + jd_yuv_t *bp; + const int32_t *dqf; + + + nby = jd->msx * jd->msy; /* Number of Y blocks (1, 2 or 4) */ + bp = jd->mcubuf; /* Pointer to the first block of MCU */ + + for (blk = 0; blk < nby + 2; blk++) { /* Get nby Y blocks and two C blocks */ + cmp = (blk < nby) ? 0 : blk - nby + 1; /* Component number 0:Y, 1:Cb, 2:Cr */ + + if (cmp && jd->ncomp != 3) { /* Clear C blocks if not exist (monochrome image) */ + for (i = 0; i < 64; bp[i++] = 128) ; + + } else { /* Load Y/C blocks from input stream */ + id = cmp ? 1 : 0; /* Huffman table ID of this component */ + + /* Extract a DC element from input stream */ + d = huffext(jd, id, 0); /* Extract a huffman coded data (bit length) */ + if (d < 0) { + return (JRESULT)(0 - d); /* Err: invalid code or input */ + } + bc = (unsigned int)d; + d = jd->dcv[cmp]; /* DC value of previous block */ + if (bc) { /* If there is any difference from previous block */ + e = bitext(jd, bc); /* Extract data bits */ + if (e < 0) { + return (JRESULT)(0 - e); /* Err: input */ + } + bc = 1 << (bc - 1); /* MSB position */ + if (!(e & bc)) { + e -= (bc << 1) - 1; /* Restore negative value if needed */ + } + d += e; /* Get current value */ + jd->dcv[cmp] = (int16_t)d; /* Save current DC value for next block */ + } + dqf = jd->qttbl[jd->qtid[cmp]]; /* De-quantizer table ID for this component */ + tmp[0] = d * dqf[0] >> 8; /* De-quantize, apply scale factor of Arai algorithm and descale 8 bits */ + + /* Extract following 63 AC elements from input stream */ + memset(&tmp[1], 0, 63 * sizeof (int32_t)); /* Initialize all AC elements */ + z = 1; /* Top of the AC elements (in zigzag-order) */ + do { + d = huffext(jd, id, 1); /* Extract a huffman coded value (zero runs and bit length) */ + if (d == 0) { + break; /* EOB? */ + } + if (d < 0) { + return (JRESULT)(0 - d); /* Err: invalid code or input error */ + } + bc = (unsigned int)d; + z += bc >> 4; /* Skip leading zero run */ + if (z >= 64) { + return JDR_FMT1; /* Too long zero run */ + } + if (bc &= 0x0F) { /* Bit length? */ + d = bitext(jd, bc); /* Extract data bits */ + if (d < 0) { + return (JRESULT)(0 - d); /* Err: input device */ + } + bc = 1 << (bc - 1); /* MSB position */ + if (!(d & bc)) { + d -= (bc << 1) - 1; /* Restore negative value if needed */ + } + i = Zig[z]; /* Get raster-order index */ + tmp[i] = d * dqf[i] >> 8; /* De-quantize, apply scale factor of Arai algorithm and descale 8 bits */ + } + } while (++z < 64); /* Next AC element */ + + if (JD_FORMAT != 2 || !cmp) { /* C components may not be processed if in grayscale output */ + if (z == 1 || (JD_USE_SCALE && jd->scale == 3)) { /* If no AC element or scale ratio is 1/8, IDCT can be ommited and the block is filled with DC value */ + d = (jd_yuv_t)((*tmp / 256) + 128); + if (JD_FASTDECODE >= 1) { + for (i = 0; i < 64; bp[i++] = d) ; + } else { + memset(bp, d, 64); + } + } else { + block_idct(tmp, bp); /* Apply IDCT and store the block to the MCU buffer */ + } + } + } + + bp += 64; /* Next block */ + } + + return JDR_OK; /* All blocks have been loaded successfully */ +} + + + + +/*-----------------------------------------------------------------------*/ +/* Output an MCU: Convert YCrCb to RGB and output it in RGB form */ +/*-----------------------------------------------------------------------*/ + +static JRESULT mcu_output ( + JDEC *jd, /* Pointer to the decompressor object */ + int (*outfunc)(JDEC *, void *, JRECT *), /* RGB output function */ + unsigned int x, /* MCU location in the image */ + unsigned int y /* MCU location in the image */ +) +{ + const int CVACC = (sizeof (int) > 2) ? 1024 : 128; /* Adaptive accuracy for both 16-/32-bit systems */ + unsigned int ix, iy, mx, my, rx, ry; + int yy, cb, cr; + jd_yuv_t *py, *pc; + uint8_t *pix; + JRECT rect; + + + mx = jd->msx * 8; my = jd->msy * 8; /* MCU size (pixel) */ + rx = (x + mx <= jd->width) ? mx : jd->width - x; /* Output rectangular size (it may be clipped at right/bottom end of image) */ + ry = (y + my <= jd->height) ? my : jd->height - y; + if (JD_USE_SCALE) { + rx >>= jd->scale; ry >>= jd->scale; + if (!rx || !ry) { + return JDR_OK; /* Skip this MCU if all pixel is to be rounded off */ + } + x >>= jd->scale; y >>= jd->scale; + } + rect.left = x; rect.right = x + rx - 1; /* Rectangular area in the frame buffer */ + rect.top = y; rect.bottom = y + ry - 1; + + + if (!JD_USE_SCALE || jd->scale != 3) { /* Not for 1/8 scaling */ + pix = (uint8_t *)jd->workbuf; + + if (JD_FORMAT != 2) { /* RGB output (build an RGB MCU from Y/C component) */ + for (iy = 0; iy < my; iy++) { + pc = py = jd->mcubuf; + if (my == 16) { /* Double block height? */ + pc += 64 * 4 + (iy >> 1) * 8; + if (iy >= 8) { + py += 64; + } + } else { /* Single block height */ + pc += mx * 8 + iy * 8; + } + py += iy * 8; + for (ix = 0; ix < mx; ix++) { + cb = pc[0] - 128; /* Get Cb/Cr component and remove offset */ + cr = pc[64] - 128; + if (mx == 16) { /* Double block width? */ + if (ix == 8) { + py += 64 - 8; /* Jump to next block if double block heigt */ + } + pc += ix & 1; /* Step forward chroma pointer every two pixels */ + } else { /* Single block width */ + pc++; /* Step forward chroma pointer every pixel */ + } + yy = *py++; /* Get Y component */ + *pix++ = /*R*/ BYTECLIP(yy + ((int)(1.402 * CVACC) * cr) / CVACC); + *pix++ = /*G*/ BYTECLIP(yy - ((int)(0.344 * CVACC) * cb + (int)(0.714 * CVACC) * cr) / CVACC); + *pix++ = /*B*/ BYTECLIP(yy + ((int)(1.772 * CVACC) * cb) / CVACC); + } + } + } else { /* Monochrome output (build a grayscale MCU from Y comopnent) */ + for (iy = 0; iy < my; iy++) { + py = jd->mcubuf + iy * 8; + if (my == 16) { /* Double block height? */ + if (iy >= 8) { + py += 64; + } + } + for (ix = 0; ix < mx; ix++) { + if (mx == 16) { /* Double block width? */ + if (ix == 8) { + py += 64 - 8; /* Jump to next block if double block height */ + } + } + *pix++ = (uint8_t) * py++; /* Get and store a Y value as grayscale */ + } + } + } + + /* Descale the MCU rectangular if needed */ + if (JD_USE_SCALE && jd->scale) { + unsigned int x, y, r, g, b, s, w, a; + uint8_t *op; + + /* Get averaged RGB value of each square correcponds to a pixel */ + s = jd->scale * 2; /* Number of shifts for averaging */ + w = 1 << jd->scale; /* Width of square */ + a = (mx - w) * (JD_FORMAT != 2 ? 3 : 1); /* Bytes to skip for next line in the square */ + op = (uint8_t *)jd->workbuf; + for (iy = 0; iy < my; iy += w) { + for (ix = 0; ix < mx; ix += w) { + pix = (uint8_t *)jd->workbuf + (iy * mx + ix) * (JD_FORMAT != 2 ? 3 : 1); + r = g = b = 0; + for (y = 0; y < w; y++) { /* Accumulate RGB value in the square */ + for (x = 0; x < w; x++) { + r += *pix++; /* Accumulate R or Y (monochrome output) */ + if (JD_FORMAT != 2) { /* RGB output? */ + g += *pix++; /* Accumulate G */ + b += *pix++; /* Accumulate B */ + } + } + pix += a; + } /* Put the averaged pixel value */ + *op++ = (uint8_t)(r >> s); /* Put R or Y (monochrome output) */ + if (JD_FORMAT != 2) { /* RGB output? */ + *op++ = (uint8_t)(g >> s); /* Put G */ + *op++ = (uint8_t)(b >> s); /* Put B */ + } + } + } + } + + } else { /* For only 1/8 scaling (left-top pixel in each block are the DC value of the block) */ + + /* Build a 1/8 descaled RGB MCU from discrete comopnents */ + pix = (uint8_t *)jd->workbuf; + pc = jd->mcubuf + mx * my; + cb = pc[0] - 128; /* Get Cb/Cr component and restore right level */ + cr = pc[64] - 128; + for (iy = 0; iy < my; iy += 8) { + py = jd->mcubuf; + if (iy == 8) { + py += 64 * 2; + } + for (ix = 0; ix < mx; ix += 8) { + yy = *py; /* Get Y component */ + py += 64; + if (JD_FORMAT != 2) { + *pix++ = /*R*/ BYTECLIP(yy + ((int)(1.402 * CVACC) * cr / CVACC)); + *pix++ = /*G*/ BYTECLIP(yy - ((int)(0.344 * CVACC) * cb + (int)(0.714 * CVACC) * cr) / CVACC); + *pix++ = /*B*/ BYTECLIP(yy + ((int)(1.772 * CVACC) * cb / CVACC)); + } else { + *pix++ = yy; + } + } + } + } + + /* Squeeze up pixel table if a part of MCU is to be truncated */ + mx >>= jd->scale; + if (rx < mx) { /* Is the MCU spans rigit edge? */ + uint8_t *s, *d; + unsigned int x, y; + + s = d = (uint8_t *)jd->workbuf; + for (y = 0; y < ry; y++) { + for (x = 0; x < rx; x++) { /* Copy effective pixels */ + *d++ = *s++; + if (JD_FORMAT != 2) { + *d++ = *s++; + *d++ = *s++; + } + } + s += (mx - rx) * (JD_FORMAT != 2 ? 3 : 1); /* Skip truncated pixels */ + } + } + + /* Convert RGB888 to RGB565 if needed */ + if (JD_FORMAT == 1) { + uint8_t *s = (uint8_t *)jd->workbuf; + uint16_t w, *d = (uint16_t *)s; + unsigned int n = rx * ry; + + do { + w = (*s++ & 0xF8) << 8; /* RRRRR----------- */ + w |= (*s++ & 0xFC) << 3; /* -----GGGGGG----- */ + w |= *s++ >> 3; /* -----------BBBBB */ + *d++ = w; + } while (--n); + } + + /* Output the rectangular */ + return outfunc(jd, jd->workbuf, &rect) ? JDR_OK : JDR_INTR; +} + + + + +/*-----------------------------------------------------------------------*/ +/* Analyze the JPEG image and Initialize decompressor object */ +/*-----------------------------------------------------------------------*/ + +#define LDB_WORD(ptr) (uint16_t)(((uint16_t)*((uint8_t*)(ptr))<<8)|(uint16_t)*(uint8_t*)((ptr)+1)) + + +JRESULT jd_prepare ( + JDEC *jd, /* Blank decompressor object */ + size_t (*infunc)(JDEC *, uint8_t *, size_t), /* JPEG strem input function */ + void *pool, /* Working buffer for the decompression session */ + size_t sz_pool, /* Size of working buffer */ + void *dev /* I/O device identifier for the session */ +) +{ + uint8_t *seg, b; + uint16_t marker; + unsigned int n, i, ofs; + size_t len; + JRESULT rc; + + + memset(jd, 0, sizeof (JDEC)); /* Clear decompression object (this might be a problem if machine's null pointer is not all bits zero) */ + jd->pool = pool; /* Work memroy */ + jd->sz_pool = sz_pool; /* Size of given work memory */ + jd->infunc = infunc; /* Stream input function */ + jd->device = dev; /* I/O device identifier */ + + jd->inbuf = seg = alloc_pool(jd, JD_SZBUF); /* Allocate stream input buffer */ + if (!seg) { + return JDR_MEM1; + } + + ofs = marker = 0; /* Find SOI marker */ + do { + if (jd->infunc(jd, seg, 1) != 1) { + return JDR_INP; /* Err: SOI was not detected */ + } + ofs++; + marker = marker << 8 | seg[0]; + } while (marker != 0xFFD8); + + for (;;) { /* Parse JPEG segments */ + /* Get a JPEG marker */ + if (jd->infunc(jd, seg, 4) != 4) { + return JDR_INP; + } + marker = LDB_WORD(seg); /* Marker */ + len = LDB_WORD(seg + 2); /* Length field */ + if (len <= 2 || (marker >> 8) != 0xFF) { + return JDR_FMT1; + } + len -= 2; /* Segent content size */ + ofs += 4 + len; /* Number of bytes loaded */ + + switch (marker & 0xFF) { + case 0xC0: /* SOF0 (baseline JPEG) */ + if (len > JD_SZBUF) { + return JDR_MEM2; + } + if (jd->infunc(jd, seg, len) != len) { + return JDR_INP; /* Load segment data */ + } + + jd->width = LDB_WORD(&seg[3]); /* Image width in unit of pixel */ + jd->height = LDB_WORD(&seg[1]); /* Image height in unit of pixel */ + jd->ncomp = seg[5]; /* Number of color components */ + if (jd->ncomp != 3 && jd->ncomp != 1) { + return JDR_FMT3; /* Err: Supports only Grayscale and Y/Cb/Cr */ + } + + /* Check each image component */ + for (i = 0; i < jd->ncomp; i++) { + b = seg[7 + 3 * i]; /* Get sampling factor */ + if (i == 0) { /* Y component */ + if (b != 0x11 && b != 0x22 && b != 0x21) { /* Check sampling factor */ + return JDR_FMT3; /* Err: Supports only 4:4:4, 4:2:0 or 4:2:2 */ + } + jd->msx = b >> 4; jd->msy = b & 15; /* Size of MCU [blocks] */ + } else { /* Cb/Cr component */ + if (b != 0x11) { + return JDR_FMT3; /* Err: Sampling factor of Cb/Cr must be 1 */ + } + } + jd->qtid[i] = seg[8 + 3 * i]; /* Get dequantizer table ID for this component */ + if (jd->qtid[i] > 3) { + return JDR_FMT3; /* Err: Invalid ID */ + } + } + break; + + case 0xDD: /* DRI - Define Restart Interval */ + if (len > JD_SZBUF) { + return JDR_MEM2; + } + if (jd->infunc(jd, seg, len) != len) { + return JDR_INP; /* Load segment data */ + } + + jd->nrst = LDB_WORD(seg); /* Get restart interval (MCUs) */ + break; + + case 0xC4: /* DHT - Define Huffman Tables */ + if (len > JD_SZBUF) { + return JDR_MEM2; + } + if (jd->infunc(jd, seg, len) != len) { + return JDR_INP; /* Load segment data */ + } + + rc = create_huffman_tbl(jd, seg, len); /* Create huffman tables */ + if (rc) { + return rc; + } + break; + + case 0xDB: /* DQT - Define Quaitizer Tables */ + if (len > JD_SZBUF) { + return JDR_MEM2; + } + if (jd->infunc(jd, seg, len) != len) { + return JDR_INP; /* Load segment data */ + } + + rc = create_qt_tbl(jd, seg, len); /* Create de-quantizer tables */ + if (rc) { + return rc; + } + break; + + case 0xDA: /* SOS - Start of Scan */ + if (len > JD_SZBUF) { + return JDR_MEM2; + } + if (jd->infunc(jd, seg, len) != len) { + return JDR_INP; /* Load segment data */ + } + + if (!jd->width || !jd->height) { + return JDR_FMT1; /* Err: Invalid image size */ + } + if (seg[0] != jd->ncomp) { + return JDR_FMT3; /* Err: Wrong color components */ + } + + /* Check if all tables corresponding to each components have been loaded */ + for (i = 0; i < jd->ncomp; i++) { + b = seg[2 + 2 * i]; /* Get huffman table ID */ + if (b != 0x00 && b != 0x11) { + return JDR_FMT3; /* Err: Different table number for DC/AC element */ + } + n = i ? 1 : 0; /* Component class */ + if (!jd->huffbits[n][0] || !jd->huffbits[n][1]) { /* Check huffman table for this component */ + return JDR_FMT1; /* Err: Nnot loaded */ + } + if (!jd->qttbl[jd->qtid[i]]) { /* Check dequantizer table for this component */ + return JDR_FMT1; /* Err: Not loaded */ + } + } + + /* Allocate working buffer for MCU and pixel output */ + n = jd->msy * jd->msx; /* Number of Y blocks in the MCU */ + if (!n) { + return JDR_FMT1; /* Err: SOF0 has not been loaded */ + } + len = n * 64 * 2 + 64; /* Allocate buffer for IDCT and RGB output */ + if (len < 256) { + len = 256; /* but at least 256 byte is required for IDCT */ + } + jd->workbuf = alloc_pool(jd, len); /* and it may occupy a part of following MCU working buffer for RGB output */ + if (!jd->workbuf) { + return JDR_MEM1; /* Err: not enough memory */ + } + jd->mcubuf = alloc_pool(jd, (n + 2) * 64 * sizeof (jd_yuv_t)); /* Allocate MCU working buffer */ + if (!jd->mcubuf) { + return JDR_MEM1; /* Err: not enough memory */ + } + + /* Align stream read offset to JD_SZBUF */ + if (ofs %= JD_SZBUF) { + jd->dctr = jd->infunc(jd, seg + ofs, (size_t)(JD_SZBUF - ofs)); + } + jd->dptr = seg + ofs - (JD_FASTDECODE ? 0 : 1); + + return JDR_OK; /* Initialization succeeded. Ready to decompress the JPEG image. */ + + case 0xC1: /* SOF1 */ + case 0xC2: /* SOF2 */ + case 0xC3: /* SOF3 */ + case 0xC5: /* SOF5 */ + case 0xC6: /* SOF6 */ + case 0xC7: /* SOF7 */ + case 0xC9: /* SOF9 */ + case 0xCA: /* SOF10 */ + case 0xCB: /* SOF11 */ + case 0xCD: /* SOF13 */ + case 0xCE: /* SOF14 */ + case 0xCF: /* SOF15 */ + case 0xD9: /* EOI */ + return JDR_FMT3; /* Unsuppoted JPEG standard (may be progressive JPEG) */ + + default: /* Unknown segment (comment, exif or etc..) */ + /* Skip segment data (null pointer specifies to remove data from the stream) */ + if (jd->infunc(jd, 0, len) != len) { + return JDR_INP; + } + } + } +} + + + + +/*-----------------------------------------------------------------------*/ +/* Start to decompress the JPEG picture */ +/*-----------------------------------------------------------------------*/ + +JRESULT jd_decomp ( + JDEC *jd, /* Initialized decompression object */ + int (*outfunc)(JDEC *, void *, JRECT *), /* RGB output function */ + uint8_t scale /* Output de-scaling factor (0 to 3) */ +) +{ + unsigned int x, y, mx, my; + uint16_t rst, rsc; + JRESULT rc; + + + if (scale > (JD_USE_SCALE ? 3 : 0)) { + return JDR_PAR; + } + jd->scale = scale; + + mx = jd->msx * 8; my = jd->msy * 8; /* Size of the MCU (pixel) */ + + jd->dcv[2] = jd->dcv[1] = jd->dcv[0] = 0; /* Initialize DC values */ + rst = rsc = 0; + + rc = JDR_OK; + for (y = 0; y < jd->height; y += my) { /* Vertical loop of MCUs */ + for (x = 0; x < jd->width; x += mx) { /* Horizontal loop of MCUs */ + if (jd->nrst && rst++ == jd->nrst) { /* Process restart interval if enabled */ + rc = restart(jd, rsc++); + if (rc != JDR_OK) { + return rc; + } + rst = 1; + } + rc = mcu_load(jd); /* Load an MCU (decompress huffman coded stream, dequantize and apply IDCT) */ + if (rc != JDR_OK) { + return rc; + } + rc = mcu_output(jd, outfunc, x, y); /* Output the MCU (YCbCr to RGB, scaling and output) */ + if (rc != JDR_OK) { + return rc; + } + } + } + + return rc; +} diff --git a/esp_jpeg/tjpgd/tjpgd.h b/esp_jpeg/tjpgd/tjpgd.h new file mode 100644 index 0000000..4e4857e --- /dev/null +++ b/esp_jpeg/tjpgd/tjpgd.h @@ -0,0 +1,102 @@ +/*----------------------------------------------------------------------------/ +/ TJpgDec - Tiny JPEG Decompressor R0.03 include file (C)ChaN, 2021 +/----------------------------------------------------------------------------*/ +#ifndef DEF_TJPGDEC +#define DEF_TJPGDEC + +#ifdef __cplusplus +extern "C" { +#endif + +#include "tjpgdcnf.h" +#include + +#if defined(_WIN32) /* VC++ or some compiler without stdint.h */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef short int16_t; +typedef unsigned long uint32_t; +typedef long int32_t; +#else /* Embedded platform */ +#include +#endif + +#if JD_FASTDECODE >= 1 +typedef int16_t jd_yuv_t; +#else +typedef uint8_t jd_yuv_t; +#endif + + +/* Error code */ +typedef enum { + JDR_OK = 0, /* 0: Succeeded */ + JDR_INTR, /* 1: Interrupted by output function */ + JDR_INP, /* 2: Device error or wrong termination of input stream */ + JDR_MEM1, /* 3: Insufficient memory pool for the image */ + JDR_MEM2, /* 4: Insufficient stream input buffer */ + JDR_PAR, /* 5: Parameter error */ + JDR_FMT1, /* 6: Data format error (may be broken data) */ + JDR_FMT2, /* 7: Right format but not supported */ + JDR_FMT3 /* 8: Not supported JPEG standard */ +} JRESULT; + + + +/* Rectangular region in the output image */ +typedef struct { + uint16_t left; /* Left end */ + uint16_t right; /* Right end */ + uint16_t top; /* Top end */ + uint16_t bottom; /* Bottom end */ +} JRECT; + + + +/* Decompressor object structure */ +typedef struct JDEC JDEC; +struct JDEC { + size_t dctr; /* Number of bytes available in the input buffer */ + uint8_t *dptr; /* Current data read ptr */ + uint8_t *inbuf; /* Bit stream input buffer */ + uint8_t dbit; /* Number of bits availavble in wreg or reading bit mask */ + uint8_t scale; /* Output scaling ratio */ + uint8_t msx, msy; /* MCU size in unit of block (width, height) */ + uint8_t qtid[3]; /* Quantization table ID of each component, Y, Cb, Cr */ + uint8_t ncomp; /* Number of color components 1:grayscale, 3:color */ + int16_t dcv[3]; /* Previous DC element of each component */ + uint16_t nrst; /* Restart inverval */ + uint16_t width, height; /* Size of the input image (pixel) */ + uint8_t *huffbits[2][2]; /* Huffman bit distribution tables [id][dcac] */ + uint16_t *huffcode[2][2]; /* Huffman code word tables [id][dcac] */ + uint8_t *huffdata[2][2]; /* Huffman decoded data tables [id][dcac] */ + int32_t *qttbl[4]; /* Dequantizer tables [id] */ +#if JD_FASTDECODE >= 1 + uint32_t wreg; /* Working shift register */ + uint8_t marker; /* Detected marker (0:None) */ +#if JD_FASTDECODE == 2 + uint8_t longofs[2][2]; /* Table offset of long code [id][dcac] */ + uint16_t *hufflut_ac[2]; /* Fast huffman decode tables for AC short code [id] */ + uint8_t *hufflut_dc[2]; /* Fast huffman decode tables for DC short code [id] */ +#endif +#endif + void *workbuf; /* Working buffer for IDCT and RGB output */ + jd_yuv_t *mcubuf; /* Working buffer for the MCU */ + void *pool; /* Pointer to available memory pool */ + size_t sz_pool; /* Size of momory pool (bytes available) */ + size_t (*infunc)(JDEC *, uint8_t *, size_t); /* Pointer to jpeg stream input function */ + void *device; /* Pointer to I/O device identifiler for the session */ +}; + + + +/* TJpgDec API functions */ +JRESULT jd_prepare (JDEC *jd, size_t (*infunc)(JDEC *, uint8_t *, size_t), void *pool, size_t sz_pool, void *dev); +JRESULT jd_decomp (JDEC *jd, int (*outfunc)(JDEC *, void *, JRECT *), uint8_t scale); + + +#ifdef __cplusplus +} +#endif + +#endif /* _TJPGDEC */ diff --git a/esp_jpeg/tjpgd/tjpgdcnf.h b/esp_jpeg/tjpgd/tjpgdcnf.h new file mode 100644 index 0000000..ff977b5 --- /dev/null +++ b/esp_jpeg/tjpgd/tjpgdcnf.h @@ -0,0 +1,35 @@ +/*----------------------------------------------*/ +/* TJpgDec System Configurations R0.03 */ +/*----------------------------------------------*/ + +#include "sdkconfig.h" + +#define JD_SZBUF CONFIG_JD_SZBUF +/* Specifies size of stream input buffer */ + +#define JD_FORMAT CONFIG_JD_FORMAT +/* Specifies output pixel format. +/ 0: RGB888 (24-bit/pix) +/ 1: RGB565 (16-bit/pix) +/ 2: Grayscale (8-bit/pix) +*/ + +#define JD_USE_SCALE CONFIG_JD_USE_SCALE +/* Switches output descaling feature. +/ 0: Disable +/ 1: Enable +*/ + +#define JD_TBLCLIP CONFIG_JD_TBLCLIP +/* Use table conversion for saturation arithmetic. A bit faster, but increases 1 KB of code size. +/ 0: Disable +/ 1: Enable +*/ + +#define JD_FASTDECODE CONFIG_JD_FASTDECODE +/* Optimization level +/ 0: Basic optimization. Suitable for 8/16-bit MCUs. +/ 1: + 32-bit barrel shifter. Suitable for 32-bit MCUs. +/ 2: + Table conversion for huffman decoding (wants 6 << HUFF_BIT bytes of RAM) +*/ + diff --git a/test_app/CMakeLists.txt b/test_app/CMakeLists.txt index 0083df6..f4588cf 100644 --- a/test_app/CMakeLists.txt +++ b/test_app/CMakeLists.txt @@ -9,7 +9,7 @@ set(EXTRA_COMPONENT_DIRS ../libsodium ../expat ../cbor ../jsmn ../qrcode ../coap # 2. Add here if the component is compatible with IDF >= v4.4 if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "4.4") - list(APPEND EXTRA_COMPONENT_DIRS ../pid_ctrl ../esp_encrypted_img ../pcap) + list(APPEND EXTRA_COMPONENT_DIRS ../pid_ctrl ../esp_encrypted_img ../pcap ../esp_jpeg) endif() # 3. Add here if the component is compatible with IDF >= v5.0