feat(jpeg_decode): Add support for default Huffman tables

- In case of a missing Huffman table, while decoding a JPEG image
    - Define a default Huff table and add it to JPEG image header
This commit is contained in:
peter.marcisovsky
2025-02-14 18:55:34 +01:00
parent 4cdd5087ef
commit 146c1d72c0
6 changed files with 85 additions and 1 deletions

View File

@@ -162,6 +162,8 @@ esp_err_t jpeg_parse_dht_marker(jpeg_dec_header_info_t *header_info)
num_left -= (1 + JPEG_HUFFMAN_BITS_LEN_TABLE_LEN + np);
}
// Record, that Huffman table present in JPEG header
header_info->dht_marker = true;
return ESP_OK;
}