Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
Encode images with the use of the JPEG encoding. More...
#include "jpeg.h"
Go to the source code of this file.
Data Structures | |
struct | JPEG_ENCODER_STRUCTURE |
Macros | |
#define | JPEG_BLOCK_SIZE 64 |
#define | PUTBITS |
Typedefs | |
typedef struct JPEG_ENCODER_STRUCTURE | JPEG_ENCODER_STRUCTURE |
Variables | |
static const uint16_t | luminance_dc_code_table [] |
static const uint16_t | luminance_dc_size_table [] |
static const uint16_t | chrominance_dc_code_table [] |
static const uint16_t | chrominance_dc_size_table [] |
static const uint16_t | luminance_ac_code_table [] |
static const uint16_t | luminance_ac_size_table [] |
static const uint16_t | chrominance_ac_code_table [] |
static const uint16_t | chrominance_ac_size_table [] |
static const uint8_t | bitsize [] |
static const uint8_t | markerdata [] |
static const uint8_t | zigzag_table [] |
void(* | read_format )(JPEG_ENCODER_STRUCTURE *jpeg_encoder_structure, uint8_t *input_ptr) |
static const int | jpeg_luma_quantizer [64] |
static const int | jpeg_chroma_quantizer [64] |
Encode images with the use of the JPEG encoding.
Definition in file jpeg.c.
struct JPEG_ENCODER_STRUCTURE |
Data Fields | ||
---|---|---|
uint16_t | bitindex | |
int16_t | CB[JPEG_BLOCK_SIZE] | |
uint16_t | cols | |
uint16_t | cols_in_right_mcus | |
uint8_t | Cqt[JPEG_BLOCK_SIZE] | |
int16_t | CR[JPEG_BLOCK_SIZE] | |
uint16_t | horizontal_mcus | |
uint16_t | ICqt[JPEG_BLOCK_SIZE] | |
uint16_t | ILqt[JPEG_BLOCK_SIZE] | |
uint16_t | incr | |
uint32_t | lcode | |
int16_t | ldc1 | |
int16_t | ldc2 | |
int16_t | ldc3 | |
uint16_t | length_minus_mcu_width | |
uint16_t | length_minus_width | |
uint8_t | Lqt[JPEG_BLOCK_SIZE] | |
uint16_t | mcu_height | |
uint16_t | mcu_width | |
uint16_t | mcu_width_size | |
uint16_t | offset | |
uint16_t | rows | |
uint16_t | rows_in_bottom_mcus | |
int16_t | Temp[JPEG_BLOCK_SIZE] | |
uint16_t | vertical_mcus | |
int16_t | Y1[JPEG_BLOCK_SIZE] | |
int16_t | Y2[JPEG_BLOCK_SIZE] |
#define PUTBITS |
Definition at line 597 of file jpeg.c.
Referenced by jpeg_huffman().
typedef struct JPEG_ENCODER_STRUCTURE JPEG_ENCODER_STRUCTURE |
|
static |
Definition at line 718 of file jpeg.c.
References JPEG_ENCODER_STRUCTURE::bitindex, and JPEG_ENCODER_STRUCTURE::lcode.
Referenced by jpeg_encode_image().
int jpeg_create_svs_header | ( | unsigned char * | jpegbuf, |
int32_t | size, | ||
int | w | ||
) |
Definition at line 44 of file jpeg.c.
References p, s, and svs_size_code().
|
static |
void jpeg_encode_image | ( | struct image_t * | in, |
struct image_t * | out, | ||
uint32_t | quality_factor, | ||
bool | add_dri_header | ||
) |
Encode an YUV422 image.
[in] | *in | The input image |
[out] | *out | The output JPEG image |
[in] | quality_factor | Quality factor of the encoding (0-99) |
[in] | add_dri_header | Add the DRI header (needed for full JPEG) |
Definition at line 408 of file jpeg.c.
References image_t::buf, image_t::buf_size, JPEG_ENCODER_STRUCTURE::cols, JPEG_ENCODER_STRUCTURE::cols_in_right_mcus, FOUR_TWO_TWO, FOUR_ZERO_ZERO, image_t::h, JPEG_ENCODER_STRUCTURE::horizontal_mcus, IMAGE_GRAYSCALE, IMAGE_YUV422, JPEG_ENCODER_STRUCTURE::incr, jpeg_close_bitstream(), jpeg_encodeMCU(), jpeg_initialization(), jpeg_write_markers(), JPEG_ENCODER_STRUCTURE::length_minus_mcu_width, JPEG_ENCODER_STRUCTURE::length_minus_width, MakeTables(), JPEG_ENCODER_STRUCTURE::mcu_height, JPEG_ENCODER_STRUCTURE::mcu_width, JPEG_ENCODER_STRUCTURE::mcu_width_size, JPEG_ENCODER_STRUCTURE::offset, read_format, JPEG_ENCODER_STRUCTURE::rows, JPEG_ENCODER_STRUCTURE::rows_in_bottom_mcus, image_t::type, JPEG_ENCODER_STRUCTURE::vertical_mcus, and image_t::w.
Referenced by save_shot_on_disk(), video_capture_save(), and viewvideo_function().
|
static |
Definition at line 472 of file jpeg.c.
References JPEG_ENCODER_STRUCTURE::CB, JPEG_ENCODER_STRUCTURE::CR, FOUR_TWO_TWO, JPEG_ENCODER_STRUCTURE::ICqt, JPEG_ENCODER_STRUCTURE::ILqt, jpeg_DCT(), jpeg_huffman(), jpeg_levelshift(), jpeg_quantization(), JPEG_ENCODER_STRUCTURE::Y1, and JPEG_ENCODER_STRUCTURE::Y2.
Referenced by jpeg_encode_image().
|
static |
Definition at line 621 of file jpeg.c.
References bitsize, chrominance_ac_code_table, chrominance_ac_size_table, chrominance_dc_code_table, chrominance_dc_size_table, JPEG_ENCODER_STRUCTURE::ldc1, JPEG_ENCODER_STRUCTURE::ldc2, JPEG_ENCODER_STRUCTURE::ldc3, luminance_ac_code_table, luminance_ac_size_table, luminance_dc_code_table, luminance_dc_size_table, PUTBITS, and JPEG_ENCODER_STRUCTURE::Temp.
Referenced by jpeg_encodeMCU().
|
static |
Definition at line 288 of file jpeg.c.
References JPEG_ENCODER_STRUCTURE::bitindex, JPEG_ENCODER_STRUCTURE::cols_in_right_mcus, FOUR_ZERO_ZERO, JPEG_ENCODER_STRUCTURE::horizontal_mcus, jpeg_read_400_format(), jpeg_read_422_format(), JPEG_ENCODER_STRUCTURE::lcode, JPEG_ENCODER_STRUCTURE::ldc1, JPEG_ENCODER_STRUCTURE::ldc2, JPEG_ENCODER_STRUCTURE::ldc3, JPEG_ENCODER_STRUCTURE::length_minus_mcu_width, JPEG_ENCODER_STRUCTURE::length_minus_width, JPEG_ENCODER_STRUCTURE::mcu_height, JPEG_ENCODER_STRUCTURE::mcu_width, JPEG_ENCODER_STRUCTURE::mcu_width_size, JPEG_ENCODER_STRUCTURE::offset, read_format, JPEG_ENCODER_STRUCTURE::rows_in_bottom_mcus, and JPEG_ENCODER_STRUCTURE::vertical_mcus.
Referenced by jpeg_encode_image().
|
static |
Definition at line 499 of file jpeg.c.
Referenced by jpeg_encodeMCU().
|
static |
Definition at line 932 of file jpeg.c.
References JPEG_ENCODER_STRUCTURE::Temp, and zigzag_table.
Referenced by jpeg_encodeMCU().
|
static |
Definition at line 945 of file jpeg.c.
References JPEG_ENCODER_STRUCTURE::cols, JPEG_ENCODER_STRUCTURE::incr, JPEG_ENCODER_STRUCTURE::rows, and JPEG_ENCODER_STRUCTURE::Y1.
Referenced by jpeg_initialization().
|
static |
Definition at line 975 of file jpeg.c.
References JPEG_ENCODER_STRUCTURE::CB, JPEG_ENCODER_STRUCTURE::cols, JPEG_ENCODER_STRUCTURE::CR, JPEG_ENCODER_STRUCTURE::incr, JPEG_ENCODER_STRUCTURE::rows, JPEG_ENCODER_STRUCTURE::Y1, and JPEG_ENCODER_STRUCTURE::Y2.
Referenced by jpeg_initialization().
|
static |
Definition at line 744 of file jpeg.c.
References JPEG_ENCODER_STRUCTURE::Cqt, FOUR_TWO_TWO, FOUR_ZERO_ZERO, JPEG_ENCODER_STRUCTURE::Lqt, and markerdata.
Referenced by jpeg_encode_image().
void MakeTables | ( | JPEG_ENCODER_STRUCTURE * | jpeg_encoder_structure, |
int | q | ||
) |
Definition at line 369 of file jpeg.c.
References JPEG_ENCODER_STRUCTURE::Cqt, JPEG_ENCODER_STRUCTURE::ICqt, JPEG_ENCODER_STRUCTURE::ILqt, jpeg_chroma_quantizer, jpeg_luma_quantizer, and JPEG_ENCODER_STRUCTURE::Lqt.
Referenced by jpeg_encode_image().
|
inlinestatic |
Definition at line 23 of file jpeg.c.
Referenced by jpeg_create_svs_header().
|
static |
Definition at line 228 of file jpeg.c.
Referenced by jpeg_huffman().
|
static |
Definition at line 186 of file jpeg.c.
Referenced by jpeg_huffman().
|
static |
Definition at line 207 of file jpeg.c.
Referenced by jpeg_huffman().
|
static |
Definition at line 134 of file jpeg.c.
Referenced by jpeg_huffman().
|
static |
Definition at line 139 of file jpeg.c.
Referenced by jpeg_huffman().
|
static |
Definition at line 354 of file jpeg.c.
Referenced by MakeTables().
|
static |
Definition at line 340 of file jpeg.c.
Referenced by MakeTables().
|
static |
Definition at line 144 of file jpeg.c.
Referenced by jpeg_huffman().
|
static |
Definition at line 165 of file jpeg.c.
Referenced by jpeg_huffman().
|
static |
Definition at line 124 of file jpeg.c.
Referenced by jpeg_huffman().
|
static |
Definition at line 129 of file jpeg.c.
Referenced by jpeg_huffman().
|
static |
Definition at line 263 of file jpeg.c.
Referenced by jpeg_write_markers().
void(* read_format)(JPEG_ENCODER_STRUCTURE *jpeg_encoder_structure, uint8_t *input_ptr) |
Definition at line 286 of file jpeg.c.
Referenced by jpeg_encode_image(), and jpeg_initialization().
|
static |
Definition at line 274 of file jpeg.c.
Referenced by jpeg_quantization().