mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 17:16:50 +08:00
[jpegd]: add implementation of jpegd_parser_control.
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1180 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
@@ -100,6 +100,7 @@ typedef enum {
|
|||||||
MPP_DEC_GET_STREAM_COUNT,
|
MPP_DEC_GET_STREAM_COUNT,
|
||||||
MPP_DEC_GET_VPUMEM_USED_COUNT,
|
MPP_DEC_GET_VPUMEM_USED_COUNT,
|
||||||
MPP_DEC_SET_VC1_EXTRA_DATA,
|
MPP_DEC_SET_VC1_EXTRA_DATA,
|
||||||
|
MPP_DEC_SET_OUTPUT_FORMAT,
|
||||||
MPP_DEC_CMD_END,
|
MPP_DEC_CMD_END,
|
||||||
|
|
||||||
MPP_ENC_CMD_BASE = CMD_MODULE_CODEC | CMD_CTX_ID_ENC,
|
MPP_ENC_CMD_BASE = CMD_MODULE_CODEC | CMD_CTX_ID_ENC,
|
||||||
|
@@ -2859,7 +2859,7 @@ MPP_RET jpegd_init(void *ctx, ParserCfg *parser_cfg)
|
|||||||
memset(&(JpegParserCtx->imageInfo), 0, sizeof(JpegDecImageInfo));
|
memset(&(JpegParserCtx->imageInfo), 0, sizeof(JpegDecImageInfo));
|
||||||
JpegParserCtx->decImageType = JPEGDEC_IMAGE; /* FULL MODEs */
|
JpegParserCtx->decImageType = JPEGDEC_IMAGE; /* FULL MODEs */
|
||||||
JpegParserCtx->sliceMbSet = 0; /* will be changed when over 16MB*/
|
JpegParserCtx->sliceMbSet = 0; /* will be changed when over 16MB*/
|
||||||
JpegParserCtx->color_conv = 1;
|
JpegParserCtx->color_conv = 0;
|
||||||
|
|
||||||
/* max */
|
/* max */
|
||||||
JpegParserCtx->maxSupportedWidth = JPEGDEC_MAX_WIDTH_8190;
|
JpegParserCtx->maxSupportedWidth = JPEGDEC_MAX_WIDTH_8190;
|
||||||
@@ -2906,11 +2906,25 @@ MPP_RET jpegd_reset(void *ctx)
|
|||||||
MPP_RET jpegd_control(void *ctx, RK_S32 cmd, void *param)
|
MPP_RET jpegd_control(void *ctx, RK_S32 cmd, void *param)
|
||||||
{
|
{
|
||||||
FUN_TEST("Enter");
|
FUN_TEST("Enter");
|
||||||
(void)ctx;
|
|
||||||
(void)cmd;
|
MPP_RET ret = MPP_OK;
|
||||||
(void)param;
|
JpegParserContext *JpegParserCtx = (JpegParserContext *)ctx;
|
||||||
|
if (NULL == JpegParserCtx) {
|
||||||
|
JPEGD_ERROR_LOG("NULL pointer");
|
||||||
|
return MPP_ERR_NULL_PTR;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (cmd) {
|
||||||
|
case MPP_DEC_SET_OUTPUT_FORMAT: {
|
||||||
|
JpegParserCtx->color_conv = *((RK_U32 *)param);
|
||||||
|
JPEGD_INFO_LOG("output_format:%d\n", JpegParserCtx->color_conv);
|
||||||
|
} break;
|
||||||
|
default :
|
||||||
|
ret = MPP_NOK;
|
||||||
|
}
|
||||||
|
|
||||||
FUN_TEST("Exit");
|
FUN_TEST("Exit");
|
||||||
return MPP_OK;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
MPP_RET jpegd_callback(void *ctx, void *err_info)
|
MPP_RET jpegd_callback(void *ctx, void *err_info)
|
||||||
|
@@ -638,6 +638,9 @@ MPP_RET Mpp::control_dec(MpiCmd cmd, MppParam param)
|
|||||||
case MPP_DEC_GET_VPUMEM_USED_COUNT: {
|
case MPP_DEC_GET_VPUMEM_USED_COUNT: {
|
||||||
ret = mpp_dec_control(mDec, cmd, param);
|
ret = mpp_dec_control(mDec, cmd, param);
|
||||||
} break;
|
} break;
|
||||||
|
case MPP_DEC_SET_OUTPUT_FORMAT: {
|
||||||
|
ret = mpp_dec_control(mDec, cmd, param);
|
||||||
|
} break;
|
||||||
default : {
|
default : {
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user