当前位置: 首页 > news >正文

华为昇腾310B1平台视频解码失败[ERROR] Send frame to vdec failed, errorno:507018

目录

1 [ERROR] Send frame to vdec failed, errorno:507018

2 bug解决尝试1

3 bug解决尝试2

4 最终解决方法

参考文献:


1 [ERROR] Send frame to vdec failed, errorno:507018

某项目中的代码运行报错 [ERROR] Send frame to vdec failed, errorno:507018

    AclLiteError VdecHelper::Process(shared_ptr<FrameData> frameData, void* userData) {// create input descAclLiteError atlRet = CreateInputStreamDesc(frameData);if (atlRet != ACLLITE_OK) {ACLLITE_LOG_ERROR("Create stream desc failed");return atlRet;}if (!frameData->isFinished) {// create out descatlRet = CreateOutputPicDesc(outputPicSize_.load());if (atlRet != ACLLITE_OK) {ACLLITE_LOG_ERROR("Create pic desc failed");return atlRet;}}else {outputPicDesc_ = acldvppCreatePicDesc();if (outputPicDesc_ == nullptr) {ACLLITE_LOG_ERROR("Create vdec output pic desc failed");return ACLLITE_ERROR_CREATE_PIC_DESC;}}// send data to dvpp vdec to decoderet = aclvdecSendFrame(vdecChannelDesc_, inputStreamDesc_,outputPicDesc_, nullptr, userData);if (ret != ACL_SUCCESS) {ACLLITE_LOG_ERROR("Send frame to vdec failed, errorno:%d", ret);return ACLLITE_ERROR_VDEC_SEND_FRAME;}return ACLLITE_OK;}void VdecHelper::SetOutputPicSize(uint32_t picSize) {if (picSize < outputPicSize_.load()) {outputPicSize_.store(picSize);}}

用vscode调试发现

发现正常和报错时的一些变量也没什么区别,

2 bug解决尝试1

然后网上搜507018的错误码,找到如下链接昇腾社区-官网丨昇腾万里 让智能无所不及

这上面就是说每次都要重新配置描述类型,但是我看了下我的代码里面已经是每次都重新配置描述类型了,该方法行不通。

3 bug解决尝试2

不知道怎么做了,去下载华为官方的sample,然后先跑demo试试,去下载samples: CANN Samples - Gitee.com

https://gitee.com/ascend/samples/tree/master/cplusplus/level2_simple_inference/0_data_process

然后编译运行这个samples-master/cplusplus/level2_simple_inference/0_data_process/vdec

在代码中增加这一行打印

    while (restLen > 0) {//INFO_LOG("------------------------- ");// inBufferDev means the memory for input video data by Device, and inBufferSize means the memory sizeret = acldvppSetStreamDescData(streamInputDesc_, inBufferDev);ret = acldvppSetStreamDescSize(streamInputDesc_, inBufferSize);// Device memory g_picOutBufferDev is used to store output data decoded by VDECret = acldvppMalloc(&g_picOutBufferDev, dataSize);// Create output image description information, set the image description information properties// picOutputDesc_ is acldvppPicDescpicOutputDesc_ = acldvppCreatePicDesc();ret = acldvppSetPicDescData(picOutputDesc_, g_picOutBufferDev);ret = acldvppSetPicDescSize(picOutputDesc_, dataSize);ret = acldvppSetPicDescFormat(picOutputDesc_, static_cast<acldvppPixelFormat>(format_));/* Perform video stream decoding. After decoding each frame of data, the system automaticallycalls callback callback function to write the decoded data to the file, and then timely releaserelevant resources */ret = aclvdecSendFrame(vdecChannelDesc_, streamInputDesc_, picOutputDesc_, nullptr, nullptr);printf("ret  =================%d\n", ret);restLen = restLen - 1;}

运行结果如下

demo报同样的错误,但是我发现如果原视频用华为的std::string filePath =  "../data/vdec_h265_1frame_rabbit_1280x720.h265"就不报错,换成我自己的几个视频就报错。

4 最终解决方法

华为技术支持让试试:samples: CANN Samples - Gitee.com

https://gitee.com/ascend/samples/tree/master/cplusplus/level1_single_api/7_dvpp/vdec_sample

 我试了下这个,发现是可以,没报错,那么需要将我的工程中的解码代码全都替换成这个sample的这些接口,需要把解码代码重写。

另外下图是这个sample对应的解码原理

参考文献:

华为云论坛_云计算论坛_开发者论坛_技术论坛-华为云

samples: CANN Samples - Gitee.com

samples: CANN Samples - Gitee.com

昇腾社区-官网丨昇腾万里 让智能无所不及

http://www.lryc.cn/news/349648.html

相关文章:

  • Flutter 中的 SwitchListTile 小部件:全面指南
  • 详细分析Vue3中的defineExpose(附Demo)
  • 合合信息:TextIn文档解析技术与高精度文本向量化模型再加速
  • Git与Gitlab
  • MySQL数据库从入门到精通(下)
  • 从融媒到智媒,小程序框架可助力传媒企业在AI实践下的服务变现
  • MES系统在电线电缆行业生产上的应用
  • 怎么把图片上的字去掉
  • BFS和DFS优先搜索算法
  • python将两张图片对齐
  • Linux修炼之路之初识操作系统+基础指令(1)
  • Flink中基于Chandy-Lamport算法的分布式快照实现详解
  • 软件3班20240513
  • 【小程序】怎么优化小程序的性能
  • 告别信用卡绑定烦恼:探索这个全功能的Azure语音替代品,包含AI视频制作!(微软Azure语音替代方案)
  • 酷开科技依托酷开系统“硬件+内容”产业布局,抢占全球机遇!
  • 从离线到实时:无锡锡商银行基于 Apache Doris 的数据仓库演进实践
  • 网易云如何改ip地址到另外城市
  • Golang 开发实战day13 - Reciver Functions
  • ZL-016D多通道小鼠主动跑轮系统主要研究动物生活节律
  • 基于 LlaMA 3 + LangGraph 在windows本地部署大模型 (九)
  • 计算机类的英语
  • 深⼊理解指针(5)
  • baomidou dynamic-datasource 强制查询sql走主库
  • FPGA ov5640视频以太网传输
  • 论Java和C++方向选择
  • 交通灯-设计说明书
  • [前端] vue2的/deep/转化为vue3语法(笔记)
  • JavaScript基础(七)
  • 【DevOps】Linux 内核网络子系统全面指南与性能调优