mirror of
https://github.com/rzeldent/esp32cam-rtsp.git
synced 2025-11-20 15:08:01 +00:00
WIP
This commit is contained in:
@@ -7,8 +7,8 @@ class jpg
|
||||
public:
|
||||
bool decode(const uint8_t *jpg, size_t size);
|
||||
|
||||
const jpg_section_t *quantization_table_luminance_;
|
||||
const jpg_section_t *quantization_table_chrominance_;
|
||||
const jpg_section_dqt_t *quantization_table_luminance_;
|
||||
const jpg_section_dqt_t *quantization_table_chrominance_;
|
||||
|
||||
const uint8_t *jpeg_data_start;
|
||||
const uint8_t *jpeg_data_end;
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// http://www.ietf.org/rfc/rfc2345.txt Each table is an array of 64 values given in zig-zag order, identical to the format used in a JFIF DQT marker segment.
|
||||
constexpr size_t jpeg_quantization_table_length = 64;
|
||||
|
||||
typedef struct __attribute__((packed))
|
||||
{
|
||||
enum jpg_section_flag : uint8_t
|
||||
@@ -99,5 +103,5 @@ typedef struct __attribute__((packed)) // 0xffe0
|
||||
typedef struct __attribute__((packed)) // 0xffdb
|
||||
{
|
||||
uint8_t id; // 0= quantLuminance, 1= quantChrominance
|
||||
uint8_t data[64];
|
||||
uint8_t data[jpeg_quantization_table_length];
|
||||
} jpg_section_dqt_t;
|
||||
Reference in New Issue
Block a user