diff --git a/mpp/codec/enc/jpeg/jpege_api_v2.c b/mpp/codec/enc/jpeg/jpege_api_v2.c index e0b372b5..69d960c6 100644 --- a/mpp/codec/enc/jpeg/jpege_api_v2.c +++ b/mpp/codec/enc/jpeg/jpege_api_v2.c @@ -76,14 +76,21 @@ static MPP_RET jpege_init_v2(void *ctx, EncImplCfg *cfg) mpp_assert(cfg->coding = MPP_VIDEO_CodingMJPEG); cfg->task_count = 1; - /* init default fps config */ - MppEncRcCfg *rc = &p->cfg->rc; - rc->fps_in_flex = 0; - rc->fps_in_num = 30; - rc->fps_in_denorm = 1; - rc->fps_out_flex = 0; - rc->fps_out_num = 30; - rc->fps_out_denorm = 1; + { + /* init default rc config */ + MppEncRcCfg *rc = &p->cfg->rc; + MppEncJpegCfg *jpeg_cfg = &p->cfg->codec.jpeg; + + rc->fps_in_flex = 0; + rc->fps_in_num = 30; + rc->fps_in_denorm = 1; + rc->fps_out_flex = 0; + rc->fps_out_num = 30; + rc->fps_out_denorm = 1; + rc->rc_mode = MPP_ENC_RC_MODE_FIXQP; + /* init default quant */ + jpeg_cfg->quant = 10; + } jpege_dbg_func("leave ctx %p\n", ctx); return MPP_OK;