sec_mm: codec_type goes codecType

This commit is contained in:
codeworkx 2011-07-10 07:09:57 -07:00
parent 02c2a34a7f
commit d0e726ae55
2 changed files with 35 additions and 35 deletions

View File

@ -117,7 +117,7 @@ void *SsbSipMfcDecOpen(void)
return (void *)pCTX;
}
SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE codec_type, int Frameleng)
SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE codecType, int Frameleng)
{
int ret_code;
int packedPB = MFC_UNPACKED_PB;
@ -132,34 +132,34 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c
pCTX = (_MFCLIB *)openHandle;
memset(&DecArg, 0x00, sizeof(DecArg));
if ((codec_type != MPEG4_DEC) &&
(codec_type != H264_DEC) &&
(codec_type != H263_DEC) &&
(codec_type != MPEG1_DEC) &&
(codec_type != MPEG2_DEC) &&
(codec_type != FIMV1_DEC) &&
(codec_type != FIMV2_DEC) &&
(codec_type != FIMV3_DEC) &&
(codec_type != FIMV4_DEC) &&
(codec_type != XVID_DEC) &&
(codec_type != VC1RCV_DEC) &&
(codec_type != VC1_DEC)) {
if ((codecType != MPEG4_DEC) &&
(codecType != H264_DEC) &&
(codecType != H263_DEC) &&
(codecType != MPEG1_DEC) &&
(codecType != MPEG2_DEC) &&
(codecType != FIMV1_DEC) &&
(codecType != FIMV2_DEC) &&
(codecType != FIMV3_DEC) &&
(codecType != FIMV4_DEC) &&
(codecType != XVID_DEC) &&
(codecType != VC1RCV_DEC) &&
(codecType != VC1_DEC)) {
LOGE("SsbSipMfcDecOpen: Undefined codec type.\n");
return MFC_RET_INVALID_PARAM;
}
pCTX->codec_type = codec_type;
pCTX->codecType = codecType;
if ((pCTX->codec_type == MPEG4_DEC) ||
(pCTX->codec_type == FIMV1_DEC) ||
(pCTX->codec_type == FIMV2_DEC) ||
(pCTX->codec_type == FIMV3_DEC) ||
(pCTX->codec_type == FIMV4_DEC) ||
(pCTX->codec_type == XVID_DEC))
if ((pCTX->codecType == MPEG4_DEC) ||
(pCTX->codecType == FIMV1_DEC) ||
(pCTX->codecType == FIMV2_DEC) ||
(pCTX->codecType == FIMV3_DEC) ||
(pCTX->codecType == FIMV4_DEC) ||
(pCTX->codecType == XVID_DEC))
packedPB = isPBPacked(pCTX, Frameleng);
/* init args */
DecArg.args.dec_init.in_codec_type = pCTX->codec_type;
DecArg.args.dec_init.in_codec_type = pCTX->codecType;
DecArg.args.dec_init.in_strm_size = Frameleng;
DecArg.args.dec_init.in_strm_buf = pCTX->phyStrmBuf;
DecArg.args.dec_init.in_packed_PB = packedPB;
@ -217,7 +217,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill)
pCTX = (_MFCLIB *)openHandle;
memset(&DecArg, 0x00, sizeof(DecArg));
DecArg.args.dec_exe.in_codec_type = pCTX->codec_type;
DecArg.args.dec_exe.in_codec_type = pCTX->codecType;
DecArg.args.dec_exe.in_strm_buf = pCTX->phyStrmBuf;
DecArg.args.dec_exe.in_strm_size = lengthBufFill;
DecArg.args.dec_exe.in_frm_buf.luma = pCTX->phyFrmBuf.luma;
@ -306,7 +306,7 @@ void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSiz
pCTX = (_MFCLIB *)openHandle;
user_addr_arg.args.mem_alloc.codec_type = pCTX->codec_type;
user_addr_arg.args.mem_alloc.codec_type = pCTX->codecType;
user_addr_arg.args.mem_alloc.buff_size = inputBufferSize;
user_addr_arg.args.mem_alloc.mapped_addr = pCTX->mapped_addr;
ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_GET_IN_BUF, &user_addr_arg);

View File

@ -76,7 +76,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
SSBSIP_MFC_ENC_H264_PARAM *h264_arg;
SSBSIP_MFC_ENC_MPEG4_PARAM *mpeg4_arg;
SSBSIP_MFC_ENC_H263_PARAM *h263_arg;
SSBSIP_MFC_CODEC_TYPE codec_type;
SSBSIP_MFC_CODEC_TYPE codecType;
pCTX = (_MFCLIB *)openHandle;
memset(&EncArg, 0, sizeof(mfc_common_args));
@ -84,18 +84,18 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
LOGV("SsbSipMfcEncInit: Encode Init start\n");
mpeg4_arg = (SSBSIP_MFC_ENC_MPEG4_PARAM *)param;
codec_type = mpeg4_arg->codecType;
codecType = mpeg4_arg->codecType;
if ((codec_type != MPEG4_ENC) &&
(codec_type != H264_ENC) &&
(codec_type != H263_ENC)) {
if ((codecType != MPEG4_ENC) &&
(codecType != H264_ENC) &&
(codecType != H263_ENC)) {
LOGE("SsbSipMfcEncOpen: Undefined codec type.\n");
return MFC_RET_INVALID_PARAM;
}
pCTX->codec_type = codec_type;
pCTX->codecType = codecType;
switch (pCTX->codec_type) {
switch (pCTX->codecType) {
case MPEG4_ENC:
LOGV("SsbSipMfcEncInit: MPEG4 Encode\n");
mpeg4_arg = (SSBSIP_MFC_ENC_MPEG4_PARAM *)param;
@ -124,11 +124,11 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
break;
}
switch (pCTX->codec_type) {
switch (pCTX->codecType) {
case MPEG4_ENC:
mpeg4_arg = (SSBSIP_MFC_ENC_MPEG4_PARAM*)param;
EncArg.args.enc_init_mpeg4.in_codec_type = pCTX->codec_type;
EncArg.args.enc_init_mpeg4.in_codec_type = pCTX->codecType;
EncArg.args.enc_init_mpeg4.in_profile_level = ENC_PROFILE_LEVEL(mpeg4_arg->ProfileIDC, mpeg4_arg->LevelIDC);
EncArg.args.enc_init_mpeg4.in_width = mpeg4_arg->SourceWidth;
@ -191,7 +191,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param)
case H263_ENC:
h263_arg = (SSBSIP_MFC_ENC_H263_PARAM *)param;
EncArg.args.enc_init_mpeg4.in_codec_type = pCTX->codec_type;
EncArg.args.enc_init_mpeg4.in_codec_type = pCTX->codecType;
EncArg.args.enc_init_mpeg4.in_profile_level = ENC_PROFILE_LEVEL(66, 40);
EncArg.args.enc_init_mpeg4.in_width = h263_arg->SourceWidth;
EncArg.args.enc_init_mpeg4.in_height = h263_arg->SourceHeight;
@ -363,7 +363,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle)
memset(&EncArg, 0x00, sizeof(mfc_common_args));
EncArg.args.enc_exe.in_codec_type = pCTX->codec_type;
EncArg.args.enc_exe.in_codec_type = pCTX->codecType;
EncArg.args.enc_exe.in_Y_addr = (unsigned int)pCTX->phyFrmBuf.luma;
EncArg.args.enc_exe.in_CbCr_addr = (unsigned int)pCTX->phyFrmBuf.chroma;
EncArg.args.enc_exe.in_Y_addr_vir = (unsigned int)pCTX->virFrmBuf.luma;
@ -437,7 +437,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU
pCTX = (_MFCLIB *)openHandle;
user_addr_arg.args.mem_alloc.codec_type = pCTX->codec_type;
user_addr_arg.args.mem_alloc.codec_type = pCTX->codecType;
y_size = pCTX->width * pCTX->height;
c_size = (pCTX->width * pCTX->height) >> 1;