最近在使用TQ210做linux下的MFC硬件解码部分,目前android2.3下使用硬件播放视频是没有问题的,我参照android的处理顺序移植到linux上,卡在SsbSipMfcDecInit初始化上面,总是报
mfc_irq: mfc_irq() : Interrupt !! : 32,中断错误,以下是我的处理流程:
SSBSIP_MFC_DEC_OUTBUF_STATUS status;
SSBSIP_MFC_DEC_OUTPUT_INFO outputInfo;
int bufWidth = 0;
int bufHeight = 0;
SSBSIP_MFC_ERROR_CODE code;
void *pCTX = NULL;
//pCTX->codec_type = H264_DEC;
SSBIP_MFC_BUFFER_TYPE buf_type = CACHE;
pCTX = SsbSipMfcDecOpen();
void *virStrmBuf;
void *phyStrmBuf;
virStrmBuf = SsbSipMfcDecGetInBuf(pCTX, &phyStrmBuf, DEFAULT_MFC_INPUT_BUFFER_SIZE);
if (virStrmBuf == NULL)
{
printf("SsbSipMfcDecGetInBuf error\n");
}
code = SsbSipMfcDecSetInBuf(pCTX, phyStrmBuf, virStrmBuf,DEFAULT_MFC_INPUT_BUFFER_SIZE);
/* Set the number of extra buffer to prevent tearing */
int configValue = 5;
SsbSipMfcDecSetConfig(pCTX, MFC_DEC_SETCONF_EXTRA_BUFFER_NUM, &configValue);
/* Set mpeg4 deblocking filter enable */
// configValue = 1;
// SsbSipMfcDecSetConfig(pCTX, MFC_DEC_SETCONF_POST_ENABLE, &configValue);
FILE *fp = fopen("/girl.mp4", "rb");
问题可能在s5p要求nv12的输入格式,你用的可能是yuv/yuy2之类。转换一下试试
编绎的时候要求nv12的格式,yadr和caddr直接赋值就可以了