[jpege]: fix some compiler warnings

Although it is just a stub parser.

Change-Id: I56723e3288b6cba36156d9683229edcf574bd064
Signed-off-by: Randy Li <randy.li@rock-chips.com>
This commit is contained in:
Randy Li
2017-03-10 14:11:01 +08:00
parent 137dc9d5fb
commit b79cfe525f
4 changed files with 21 additions and 22 deletions

View File

@@ -46,7 +46,7 @@ typedef struct {
MppEncCfgSet *set; MppEncCfgSet *set;
} JpegeCtx; } JpegeCtx;
MPP_RET jpege_callback(void *ctx, void *feedback) static MPP_RET jpege_callback(void *ctx, void *feedback)
{ {
JpegeCtx *p = (JpegeCtx *)ctx; JpegeCtx *p = (JpegeCtx *)ctx;
JpegeFeedback *result = &p->feedback; JpegeFeedback *result = &p->feedback;
@@ -63,7 +63,7 @@ MPP_RET jpege_callback(void *ctx, void *feedback)
return MPP_OK; return MPP_OK;
} }
MPP_RET jpege_init(void *ctx, ControllerCfg *cfg) static MPP_RET jpege_init(void *ctx, ControllerCfg *cfg)
{ {
JpegeCtx *p = (JpegeCtx *)ctx; JpegeCtx *p = (JpegeCtx *)ctx;
@@ -80,14 +80,14 @@ MPP_RET jpege_init(void *ctx, ControllerCfg *cfg)
return MPP_OK; 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("enter ctx %p\n", ctx);
jpege_dbg_func("leave ctx %p\n", ctx); jpege_dbg_func("leave ctx %p\n", ctx);
return MPP_OK; 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); jpege_dbg_func("enter ctx %p\n", ctx);
@@ -98,21 +98,21 @@ MPP_RET jpege_encode(void *ctx, HalEncTask *task)
return MPP_OK; 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("enter ctx %p\n", ctx);
jpege_dbg_func("leave ctx %p\n", ctx); jpege_dbg_func("leave ctx %p\n", ctx);
return MPP_OK; 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("enter ctx %p\n", ctx);
jpege_dbg_func("leave ctx %p\n", ctx); jpege_dbg_func("leave ctx %p\n", ctx);
return MPP_OK; 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; 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 = { const ControlApi api_jpege_controller = {
"jpege_control", .name = "jpege_control",
MPP_VIDEO_CodingMJPEG, .coding = MPP_VIDEO_CodingMJPEG,
sizeof(JpegeCtx), .ctx_size = sizeof(JpegeCtx),
0, .flag = 0,
jpege_init, .init = jpege_init,
jpege_deinit, .deinit = jpege_deinit,
jpege_encode, .encode = jpege_encode,
jpege_reset, .reset = jpege_reset,
jpege_flush, .flush = jpege_flush,
jpege_config, .config = jpege_config,
jpege_callback, .callback = jpege_callback,
}; };

View File

@@ -142,5 +142,3 @@ const MppHalApi hal_api_jpege = {
.flush = hal_jpege_flush, .flush = hal_jpege_flush,
.control = hal_jpege_control, .control = hal_jpege_control,
}; };

View File

@@ -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_S32 i;
RK_U32 width = syntax->width; RK_U32 width = syntax->width;

View File

@@ -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_bitpos(JpegeBits ctx);
RK_S32 jpege_bits_get_bytepos(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 #ifdef __cplusplus
} }