Bouffalo SDK  1.0
Bouffalolab Software Development Kit
bflb_mjpeg.h File Reference
#include "bflb_core.h"
Include dependency graph for bflb_mjpeg.h:

Go to the source code of this file.

Data Structures

struct  bflb_mjpeg_config_s
 MJPEG configuration structure. More...
 

Macros

#define MJPEG_FORMAT_YUV422_YUYV   0
 
#define MJPEG_FORMAT_YUV422_YVYU   1
 
#define MJPEG_FORMAT_YUV422_UYVY   2
 
#define MJPEG_FORMAT_YUV422_VYUY   3
 
#define MJPEG_FORMAT_YUV422SP_NV16   4
 
#define MJPEG_FORMAT_YUV422SP_NV61   5
 
#define MJPEG_FORMAT_YUV420SP_NV12   6
 
#define MJPEG_FORMAT_YUV420SP_NV21   7
 
#define MJPEG_FORMAT_GRAY   8
 
#define MJPEG_INTSTS_ONE_FRAME   (1 << 4)
 
#define MJPEG_INTCLR_ONE_FRAME   (1 << 8)
 
#define MJPEG_CMD_SET_INPUTADDR0   0x00
 
#define MJPEG_CMD_SET_INPUTADDR1   0x01
 
#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...