OpenCL 视频处理 [英] OpenCL Video Processing

查看:76
本文介绍了OpenCL 视频处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我即将编写一个堆叠软件.因此,我想将一个或多个视频文件的帧提取到 opencl 缓冲区,然后使用 opencl 内核 处理它们.

但我不知道如何加载视频帧,因为我从未处理过视频.当我使用 opencl 时,我的主要关注点显然是高性能

我知道有诸如 ffmpegopencv 之类的库,但由于我不喜欢它,所以我不知道哪个最适合我的需求.

那么您能给我建议使用哪个库/函数,哪个库/函数与 opencl 结合使用效果最好(最快)?

我还没有发现任何有用的东西.我可以从哪里开始?(像简短的文档或教程之类的东西会很好)

提前致谢!

我使用 nvidia 卡在 Linux 下工作(不需要跨平台),我的(首选)编程语言是 c++.我更喜欢 h264 作为视频格式,但 avimovmp4、...也是可能的.

解决方案

我的一个朋友很高兴在带有 OpenGL 的图像处理框架中使用 ffmpeg,因此 OpenCL 也不应该有任何问题.我会选择它而不是供应商特定的库.如果您使用 OpenCV,请记住您的应用程序可能必须附带 OpenCV 共享库,即使它不需要所有额外的东西,即浪费用户计算机上的硬盘空间.大约 2 年前,我发现 ffmpeg 易于使用.

使用 OpenCV 读取帧的唯一原因是您是否还需要它的一些图像处理功能.如果没有,那么我会使用 ffmpeg.

I'm about to write a stacking software. Therefore I want to extract the frames of one or more videofiles to an opencl buffer and then process them with an opencl kernel.

But I don't know how to load the video frames as I never worked with videos. As I use opencl my main focus is obviously high performance!

I know there are libraries like ffmpeg or opencv and more, but as I'm not into it I don't know which fits my needs best.

So can you give me advice which library/function to use which works best (fastest) in conjunction with opencl?

I haven't found something useful about this yet. Where could I start? (something like a short ducumentation or tutorial would be kind)

Thanks in advance!

I'm working under Linux (cross platform is not a need) with a nvidia card and my (preferred) programming language is c++. I prefer h264 as video format, but avi, mov, mp4, ... are also possible.

解决方案

A friend of mine has been happy using ffmpeg in an image processing framework with OpenGL, so there shouldn't any problem with OpenCL either. I'd choose that over a vendor-specific library. If you use OpenCV then keep in mind that your application may have to be shipped with an OpenCV shared library even if it doesn't need all the extra stuff, i.e. wasting HDD space on a user's computer. I found ffmpeg easy to use about 2 years back.

The only reason for using OpenCV for reading in frames is if you also need some of its image processing functions. If not, then I'd use ffmpeg.

这篇关于OpenCL 视频处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆