diff --git a/mpp/codec/enc/jpeg/jpege_api.c b/mpp/codec/enc/jpeg/jpege_api.c index 92ad95fe..17d97d77 100644 --- a/mpp/codec/enc/jpeg/jpege_api.c +++ b/mpp/codec/enc/jpeg/jpege_api.c @@ -46,7 +46,7 @@ typedef struct { MppEncCfgSet *set; } JpegeCtx; -MPP_RET jpege_callback(void *ctx, void *feedback) +static MPP_RET jpege_callback(void *ctx, void *feedback) { JpegeCtx *p = (JpegeCtx *)ctx; JpegeFeedback *result = &p->feedback; @@ -63,7 +63,7 @@ MPP_RET jpege_callback(void *ctx, void *feedback) return MPP_OK; } -MPP_RET jpege_init(void *ctx, ControllerCfg *cfg) +static MPP_RET jpege_init(void *ctx, ControllerCfg *cfg) { JpegeCtx *p = (JpegeCtx *)ctx; @@ -80,14 +80,14 @@ MPP_RET jpege_init(void *ctx, ControllerCfg *cfg) return MPP_OK; } -MPP_RET jpege_deinit(void *ctx) +static MPP_RET jpege_deinit(void *ctx) { jpege_dbg_func("enter ctx %p\n", ctx); jpege_dbg_func("leave ctx %p\n", ctx); return MPP_OK; } -MPP_RET jpege_encode(void *ctx, HalEncTask *task) +static MPP_RET jpege_encode(void *ctx, HalEncTask *task) { jpege_dbg_func("enter ctx %p\n", ctx); @@ -98,21 +98,21 @@ MPP_RET jpege_encode(void *ctx, HalEncTask *task) return MPP_OK; } -MPP_RET jpege_reset(void *ctx) +static MPP_RET jpege_reset(void *ctx) { jpege_dbg_func("enter ctx %p\n", ctx); jpege_dbg_func("leave ctx %p\n", ctx); return MPP_OK; } -MPP_RET jpege_flush(void *ctx) +static MPP_RET jpege_flush(void *ctx) { jpege_dbg_func("enter ctx %p\n", ctx); jpege_dbg_func("leave ctx %p\n", ctx); return MPP_OK; } -MPP_RET jpege_config(void *ctx, RK_S32 cmd, void *param) +static MPP_RET jpege_config(void *ctx, RK_S32 cmd, void *param) { MPP_RET ret = MPP_OK; @@ -122,15 +122,15 @@ MPP_RET jpege_config(void *ctx, RK_S32 cmd, void *param) } const ControlApi api_jpege_controller = { - "jpege_control", - MPP_VIDEO_CodingMJPEG, - sizeof(JpegeCtx), - 0, - jpege_init, - jpege_deinit, - jpege_encode, - jpege_reset, - jpege_flush, - jpege_config, - jpege_callback, + .name = "jpege_control", + .coding = MPP_VIDEO_CodingMJPEG, + .ctx_size = sizeof(JpegeCtx), + .flag = 0, + .init = jpege_init, + .deinit = jpege_deinit, + .encode = jpege_encode, + .reset = jpege_reset, + .flush = jpege_flush, + .config = jpege_config, + .callback = jpege_callback, }; diff --git a/mpp/hal/vpu/jpege/hal_jpege_api.c b/mpp/hal/vpu/jpege/hal_jpege_api.c index 261a06a5..7432b926 100644 --- a/mpp/hal/vpu/jpege/hal_jpege_api.c +++ b/mpp/hal/vpu/jpege/hal_jpege_api.c @@ -142,5 +142,3 @@ const MppHalApi hal_api_jpege = { .flush = hal_jpege_flush, .control = hal_jpege_control, }; - - diff --git a/mpp/hal/vpu/jpege/hal_jpege_hdr.c b/mpp/hal/vpu/jpege/hal_jpege_hdr.c index 8198a269..41a81d12 100644 --- a/mpp/hal/vpu/jpege/hal_jpege_hdr.c +++ b/mpp/hal/vpu/jpege/hal_jpege_hdr.c @@ -749,7 +749,7 @@ static void write_jpeg_dqt_header(JpegeBits *bits, const RK_U8 *qtables[2]) } } -void write_jpeg_SOFO_header(JpegeBits *bits, JpegeSyntax *syntax) +static void write_jpeg_SOFO_header(JpegeBits *bits, JpegeSyntax *syntax) { RK_S32 i; RK_U32 width = syntax->width; diff --git a/mpp/hal/vpu/jpege/hal_jpege_hdr.h b/mpp/hal/vpu/jpege/hal_jpege_hdr.h index 73230c7c..2953a55a 100644 --- a/mpp/hal/vpu/jpege/hal_jpege_hdr.h +++ b/mpp/hal/vpu/jpege/hal_jpege_hdr.h @@ -35,7 +35,8 @@ RK_U8 *jpege_bits_get_buf(JpegeBits ctx); RK_S32 jpege_bits_get_bitpos(JpegeBits ctx); RK_S32 jpege_bits_get_bytepos(JpegeBits ctx); -MPP_RET write_jpeg_header(JpegeBits *bits, JpegeSyntax *syntax, const RK_U8 *qtable[2]); +MPP_RET write_jpeg_header(JpegeBits *bits, JpegeSyntax *syntax, + const RK_U8 *qtable[2]); #ifdef __cplusplus }