打开微信,使用扫一扫进入页面后,点击右上角菜单,
点击“发送给朋友”或“分享到朋友圈”完成分享
当视频分辨率为1280x720时解码图像正常,当视频分辨率为880x720时解码的图像就失真了。
程序为mlu220 soc自带例子video_decode_sample
回调函数为:
int DecoderCallBack(cncodecCbEventType event, void* context, void* data)
{
//cout<<"DecoderCallBack event = "<<event<<endl;
Decoder* thiz = (Decoder*)context;
if(CNCODEC_CB_EVENT_SEQUENCE==event)
{
cnvideoDecSequenceInfo* seqInfo = (cnvideoDecSequenceInfo*)data;
cout<
thiz->_info.width = seqInfo->width;
thiz->_info.height = seqInfo->height;
thiz->_info.inputBufNum = max(seqInfo->minInputBufNum,thiz->_info.inputBufNum);
thiz->_info.outputBufNum = max(seqInfo->minOutputBufNum,thiz->_info.outputBufNum);
cnvideoDecStart(thiz->_decoder, &(thiz->_info));
printf("cnvideoDecStart !!!\n");
}
else if(CNCODEC_CB_EVENT_NEW_ ==event)
{
cnrtSetCurrentDevice(thiz->_dev);
thiz->process((cnvideoDecOutput*)data);
}
else if(CNCODEC_CB_EVENT_EOS==event)
{
cnvideoDecStop(thiz->_decoder);
sem_post(&thiz->_finish);
printf("count :%d \n", thiz->count);
}
return 0;
}
热门帖子
精华帖子