JPEGDEC APIs

[English]

重要

The JPEGDEC API v1.0 is the lastest stable JPEGDEC APIs. All new applications should use JPEGDEC API v1.0. This component is software decode not hardware decode

JPEGDEC API Categories

Most of JPEGDEC APIs can be categoried as:

  • JPEGDEC APIs

    The common APIs are prefixed with bk_jpeg_dec_sw, e.g. bk_jpeg_dec_sw_init() etc.

JPEGDEC APIs:
  • bk_jpeg_dec_sw_init() - init jpeg decode software module

  • bk_jpeg_dec_sw_deinit() - deinit jpeg decode software module

  • bk_jpeg_sw_decoder_fun() - excute jpeg decode

  • bk_jpeg_decode_sw_register_finish_callback() - register jpeg decode finish callback

API Reference

Header File

Functions

bk_err_t bk_jpeg_dec_sw_init(void)

JPEG_DEC APIs Version 1.0.

Init the jpeg_dec

This API init the jpeg_dec

  • config jpeg_dec image resoult, and simple_rate

  • malloc buffer for jpeg_dec

Attention

1. only for software jpeg_dec

参数
  • src_buf – input image address

  • dst_buf – output decode image address

返回

  • kNoErr: succeed

  • other: errors.

bk_err_t bk_jpeg_dec_sw_deinit(void)

Deinit the jpeg_dec.

This API deinit the jpeg_dec

  • clear all configure for jpeg_dec

  • free buffer for jpeg_dec

Attention

1. only for software jpeg_dec

返回

  • kNoErr: succeed

  • other: errors.

bk_err_t bk_jpeg_dec_sw_start(uint32_t frame_size, uint8_t *src_buf, uint8_t *dst_buf, sw_jpeg_dec_res_t *result)

jpeg_decoder_fun

This API jpeg_decoder_fun

  • jpeg_prepare for jpeg_dec

  • start jpeg_dec

Attention

1. only for software jpeg_dec

参数

frame_size – input image size

返回

  • kNoErr: succeed

  • other: errors.

bk_err_t bk_jpeg_get_img_info(uint32_t frame_size, uint8_t *src_buf, sw_jpeg_dec_res_t *result)

jpeg_decoder_fun

This API is used to get img width and size

Attention

1. only for software jpeg_dec

参数

frame_size – input image size

返回

  • kNoErr: succeed

  • other: errors.

void bk_jpeg_dec_sw_register_finish_callback(void *cb)

jpegdec register finish icallback_func

This API jpeg_decoder_fun, the callback function wiil execute when decode success

Attention

1. only for software jpeg_dec

参数

cb – finish jpeg_dec callback function

返回

Structures

struct sw_jpeg_dec_res_t

Public Members

bool ok

jpeg decoder success

uint16_t pixel_x

jpeg x pixel

uint16_t pixel_y

jpeg y pixel

uint32_t size

jpeg size

API Typedefs