Bouffalo SDK
1.0
Bouffalolab Software Development Kit
|
![]() |
Modules | |
mjpeg format definition | |
mjpeg interrupt status definition | |
mjpeg interrupt clear definition | |
mjpeg feature control cmd definition | |
Data Structures | |
struct | bflb_mjpeg_config_s |
MJPEG configuration structure. More... | |
Macros | |
#define | MJPEG_MAX_FRAME_COUNT 4 |
Functions | |
void | bflb_mjpeg_init (struct bflb_device_s *dev, const struct bflb_mjpeg_config_s *config) |
Initialize mjpeg. More... | |
void | bflb_mjpeg_start (struct bflb_device_s *dev) |
Start mjpeg compression with camera. More... | |
void | bflb_mjpeg_stop (struct bflb_device_s *dev) |
Stop mjpeg compression with camera. More... | |
void | bflb_mjpeg_sw_run (struct bflb_device_s *dev, uint8_t frame_count) |
Start mjpeg compression without camera. More... | |
void | bflb_mjpeg_kick_run (struct bflb_device_s *dev, uint16_t kick_count) |
Start mjpeg kick mode compression without camera. More... | |
void | bflb_mjpeg_kick_stop (struct bflb_device_s *dev) |
Stop mjpeg kick mode compression without camera. More... | |
void | bflb_mjpeg_kick (struct bflb_device_s *dev) |
kick one times compression without camera. More... | |
void | bflb_mjpeg_tcint_mask (struct bflb_device_s *dev, bool mask) |
Enable or disable mjpeg one frame compression completion interrupt. More... | |
void | bflb_mjpeg_errint_mask (struct bflb_device_s *dev, bool mask) |
Enable or disable mjpeg error interrupt. More... | |
uint32_t | bflb_mjpeg_get_intstatus (struct bflb_device_s *dev) |
Get mjpeg interrupt status. More... | |
void | bflb_mjpeg_int_clear (struct bflb_device_s *dev, uint32_t int_clear) |
Clear mjpeg interrupt status. More... | |
uint8_t | bflb_mjpeg_get_frame_count (struct bflb_device_s *dev) |
Get number of frame count that has compressed. More... | |
void | bflb_mjpeg_pop_one_frame (struct bflb_device_s *dev) |
Drop one frame that has compressed. More... | |
uint32_t | bflb_mjpeg_get_frame_info (struct bflb_device_s *dev, uint8_t **pic) |
Get one frame information. More... | |
void | bflb_mjpeg_calculate_quantize_table (uint8_t quality, uint16_t *input_table, uint16_t *output_table) |
Calculate jpeg quantize table. More... | |
void | bflb_mjpeg_fill_quantize_table (struct bflb_device_s *dev, uint16_t *input_yy, uint16_t *input_uv) |
Fill quantize table into mjpeg register. More... | |
void | bflb_mjpeg_fill_jpeg_header_tail (struct bflb_device_s *dev, uint8_t *header, uint32_t header_len) |
Fill jpeg header into mjpeg register and enable hardware auto adding jpeg tail. More... | |
void | bflb_mjpeg_set_yuv420sp_cam_input (struct bflb_device_s *dev, uint8_t yy, uint8_t uv) |
Set mjpeg input when uses camera with yuv402sp. More... | |
int | bflb_mjpeg_feature_control (struct bflb_device_s *dev, int cmd, size_t arg) |
Control mjpeg feature. More... | |
void | bflb_mjpeg_update_input_output_buff (struct bflb_device_s *dev, void *input_buf0, void *input_buf1, void *output_buff, size_t output_buff_size) |
Control mjpeg feature. More... | |
#define MJPEG_MAX_FRAME_COUNT 4 |
Definition at line 55 of file bflb_mjpeg.h.
void bflb_mjpeg_calculate_quantize_table | ( | uint8_t | quality, |
uint16_t * | input_table, | ||
uint16_t * | output_table | ||
) |
Calculate jpeg quantize table.
[in] | quality | image quality |
[in] | input_table | pointer to save input table |
[in] | output_table | pointer to save output table |
void bflb_mjpeg_errint_mask | ( | struct bflb_device_s * | dev, |
bool | mask | ||
) |
Enable or disable mjpeg error interrupt.
[in] | dev | device handle |
[in] | mask | true means disable, false means enable |
int bflb_mjpeg_feature_control | ( | struct bflb_device_s * | dev, |
int | cmd, | ||
size_t | arg | ||
) |
Control mjpeg feature.
[in] | dev | device handle |
[in] | cmd | feature command |
[in] | arg | user data |
void bflb_mjpeg_fill_jpeg_header_tail | ( | struct bflb_device_s * | dev, |
uint8_t * | header, | ||
uint32_t | header_len | ||
) |
Fill jpeg header into mjpeg register and enable hardware auto adding jpeg tail.
[in] | dev | device handle |
[in] | header | pointer to jpeg header |
[in] | header_len | jpeg header length |
void bflb_mjpeg_fill_quantize_table | ( | struct bflb_device_s * | dev, |
uint16_t * | input_yy, | ||
uint16_t * | input_uv | ||
) |
Fill quantize table into mjpeg register.
[in] | dev | device handle |
[in] | input_yy | yy quantize table |
[in] | input_uv | uv quantize table |
uint8_t bflb_mjpeg_get_frame_count | ( | struct bflb_device_s * | dev | ) |
Get number of frame count that has compressed.
[in] | dev | device handle |
uint32_t bflb_mjpeg_get_frame_info | ( | struct bflb_device_s * | dev, |
uint8_t ** | pic | ||
) |
Get one frame information.
[in] | dev | device handle |
[in] | pic | pointer to save frame address. |
uint32_t bflb_mjpeg_get_intstatus | ( | struct bflb_device_s * | dev | ) |
Get mjpeg interrupt status.
[in] | dev | device handle |
void bflb_mjpeg_init | ( | struct bflb_device_s * | dev, |
const struct bflb_mjpeg_config_s * | config | ||
) |
Initialize mjpeg.
[in] | dev | device handle |
[in] | config | pointer to save mjpeg config |
void bflb_mjpeg_int_clear | ( | struct bflb_device_s * | dev, |
uint32_t | int_clear | ||
) |
Clear mjpeg interrupt status.
[in] | dev | device handle |
[in] | int_clear | clear value |
void bflb_mjpeg_kick | ( | struct bflb_device_s * | dev | ) |
kick one times compression without camera.
[in] | dev | device handle |
void bflb_mjpeg_kick_run | ( | struct bflb_device_s * | dev, |
uint16_t | kick_count | ||
) |
Start mjpeg kick mode compression without camera.
[in] | dev | device handle |
[in] | kick_count | kick block horizontal count to compress |
void bflb_mjpeg_kick_stop | ( | struct bflb_device_s * | dev | ) |
Stop mjpeg kick mode compression without camera.
[in] | dev | device handle |
void bflb_mjpeg_pop_one_frame | ( | struct bflb_device_s * | dev | ) |
Drop one frame that has compressed.
[in] | dev | device handle |
void bflb_mjpeg_set_yuv420sp_cam_input | ( | struct bflb_device_s * | dev, |
uint8_t | yy, | ||
uint8_t | uv | ||
) |
Set mjpeg input when uses camera with yuv402sp.
[in] | dev | device handle |
[in] | yy | camera id for yy |
[in] | uv | camera id for uv |
void bflb_mjpeg_start | ( | struct bflb_device_s * | dev | ) |
Start mjpeg compression with camera.
[in] | dev | device handle |
void bflb_mjpeg_stop | ( | struct bflb_device_s * | dev | ) |
Stop mjpeg compression with camera.
[in] | dev | device handle |
void bflb_mjpeg_sw_run | ( | struct bflb_device_s * | dev, |
uint8_t | frame_count | ||
) |
Start mjpeg compression without camera.
[in] | dev | device handle |
[in] | frame_count | frame count to compress |
void bflb_mjpeg_tcint_mask | ( | struct bflb_device_s * | dev, |
bool | mask | ||
) |
Enable or disable mjpeg one frame compression completion interrupt.
[in] | dev | device handle |
[in] | mask | true means disable, false means enable |
void bflb_mjpeg_update_input_output_buff | ( | struct bflb_device_s * | dev, |
void * | input_buf0, | ||
void * | input_buf1, | ||
void * | output_buff, | ||
size_t | output_buff_size | ||
) |
Control mjpeg feature.
[in] | dev | device handle |
[in] | input_buf0 | input buffer 0 |
[in] | input_buf1 | input buffer 1 |
[in] | output_buff | output buffer |
[in] | output_buff_size | size of output buffer |