Hardware JPEGDEC APIs
JPEGDEC API Categories
- JPEGDEC APIs:
bk_jpeg_dec_driver_init()
- init jpeg decode hardware modulebk_jpeg_dec_driver_deinit()
- deinit jpeg decode hardware modulebk_jpeg_dec_hw_start()
- start jpeg decodebk_jpeg_dec_stop()
- stop jpeg decodebk_jpeg_dec_isr_register()
- register jpeg dec complete callback
HW JPEG DECODE Config
API Reference
Header File
Functions
-
bk_err_t bk_jpeg_dec_line_int_en(uint32_t line_num)
this api used for jpeg decode config
Usage example:
if x pixel 320, you set bk_jpeg_dec_line_int_en(32), every 32 line will enter isr, in all ten times if x pixel 240, you set bk_jpeg_dec_line_int_en(24), every 24 line will enter isr, in all ten times
- 参数
xpixel – jpeg decode picture x pixel
input_buf decode input data addr
output_buf decode output data addr
lin_num – decode line num ,should multiple of 8,
- 返回
BK_OK: succeed
others: other errors.
this api used for jpeg decode line interrupt config decode can select a frame complete done isr(defult) , or this decode lin_num enter int isr
- 返回
BK_OK: succeed
others: other errors.
-
bk_err_t bk_jpeg_dec_line_int_dis(void)
this api used for disable jpeg decode line num int
- 返回
BK_OK: succeed
others: other errors.
-
bk_err_t bk_jpeg_dec_hw_start(uint32_t length, unsigned char *input_buf, unsigned char *output_buf)
this api start jpeg decode
- 参数
length – jpeg length
input_buf jpeg data src addr
output_buf jpeg decode output addr
- 返回
0: jpeg decode ok; others: error
API Typedefs
Header File
Structures
-
struct jpeg_dec_res_t
jpeg dec isr return value
Macros
-
USE_JPEG_DEC_COMPLETE_CALLBACKS
set 1, register jpeg decode complete callback, set 0, register jpeg dec cpu isr
Type Definitions
-
typedef void (*jpeg_dec_isr_cb_t)(jpeg_dec_res_t *result)
refistrer type jpeg decode complete isr function
param return jpeg x pixel , y pixel , and jpeg size
- Return
BK_OK: succeed
others: other errors.jpegdec int isr register func type
Enumerations
-
enum JRESULT
Error code
Values:
-
enumerator JDR_OK
0: Succeeded
-
enumerator JDR_INTR
1: Interrupted by output function
-
enumerator JDR_INP
2: Device error or wrong termination of input stream
-
enumerator JDR_MEM1
3: Insufficient memory pool for the image
-
enumerator JDR_MEM2
4: Insufficient stream input buffer
-
enumerator JDR_PAR
5: Parameter error
-
enumerator JDR_FMT1
6: Data format error (may be damaged data)
-
enumerator JDR_FMT2
7: Right format but not supported
-
enumerator JDR_FMT3
8: Not supported JPEG standard
-
enumerator JDR_OK