×

签到

分享到微信

打开微信,使用扫一扫进入页面后,点击右上角菜单,

点击“发送给朋友”或“分享到朋友圈”完成分享

cncodec解码相同内容的不同分辨率视频出现错误 已完结 有你的世界2021-12-15 22:34:21 回复 3 查看 使用求助
cncodec解码相同内容的不同分辨率视频出现错误
分享到:

当视频分辨率为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;

}


版权所有 © 2024 寒武纪 Cambricon.com 备案/许可证号:京ICP备17003415号-1
关闭