ezipa_dec.h

eZIP-A Decoder

Author

Sifli software development team

Unnamed Group

EZIPA_LARGE_BUF_MALLOC(size)

Large buffer allocate

EZIPA_LARGE_BUF_FREE(ptr)

Large buffer free

enum ezipa_color_fmt_t

Values:

enumerator EZIPA_RGB565
enumerator EZIPA_RGB888
ezipa_obj_t *ezipa_open(const void *data, ezipa_color_fmt_t output_color_fmt)

Allocate ezipa drawing object.

Read the ezipa data, allocate the resource and prepare for the drawing

参数:
  • data[in] ezipa const data or file name

  • output_color_fmt[in] output buffer color format

返回值:

ezipa – object instance

int32_t ezipa_close(ezipa_obj_t *obj)

Free ezipa drawing object.

参数:
  • obj[in] ezipa object instance

返回值:

0 – no error, < 0: error code

int32_t ezipa_draw(ezipa_obj_t *obj, ezipa_canvas_t *canvas, bool next)

Draw one frame on the canvas.

参数:
  • obj[in] ezipa object instance

  • canvas[in] canvas

  • next[in] true: draw next frame on the canvas, false: draw current frame on the canvas

返回值:

0 – no error, < 0: error code

struct ezipa_obj_t

Public Members

uint8_t *ezipa_data
uint8_t *output_buf
uint8_t *region_area_bak_buf
uint8_t output_color_fmt
bool alpha_enabled
uint8_t epic_color_fmt
uint8_t pixel_size
uint16_t frame_delay_ms
uint32_t play_idx
EZIP_HandleTypeDef *ezip_handle
EZIP_EZIPAHeaderTypeDef header
EZIP_EZIPAFrameInfoTypeDef curr_frame
EZIP_EZIPAFrameInfoTypeDef next_frame
bool valid_curr_frame
struct rt_semaphore sem
int fd
const char *filename
uint32_t file_size
uint32_t ezipa_hdr_size
uint32_t max_frame_size
uint32_t *org_frame_offset_tbl
uint32_t *fake_frame_offset_tbl
uint32_t frame_num
struct ezipa_canvas_t

Public Members

uint8_t *buf

canvas buffer

uint8_t color_fmt

canvas buffer color format, EPIC color format, e.g. EPIC_COLOR_ARGB8565

uint16_t width

canvas width

uint16_t height

canvas height

int16_t x_offset

x offset where ezipa frame is drawn on canvas

int16_t y_offset

y offset where ezipa frame is drawn on canvas

int32_t mask_x_offset
int32_t mask_y_offset
int32_t mask_width
int32_t mask_height