TX2上硬件编解码加速CSI接口摄像头

1.TX2上的CSI硬件

  1. 1.官方的开发板把所为的六路CSI接到了一个60*2的接口的所谓camera development给了一个板载摄像头,毛病。如果你想自己把这六个接口用起来,一个转接口145☹再见。所以你不得不花点钱买个拓展版。
    在这里插入图片描述
    在这里插入图片描述

  2. 关于摄像头驱动
    Nvidia官方会有一个TX2 deriver package,里面有提供一部分的摄像头驱动可以在NVL4T docs文档里查看。
    在这里插入图片描述
    可以根据这些型号来购买摄像头。虽然都便宜。在这里插入图片描述
    NVidia提供了一个方便的库使得我们可以方便的自己安装对应sensor的驱动。作为请学生只买的48一个的ov。研究了一下how to add a module。
    在这里插入图片描述

In applications that support a direct V4L2 interface, use this interface to communicate to the NVIDIA V4L2 driver without having to use the camera core user mode library. Use this path for capturing RAW data from sensor or for validating sensor drivers.
The application uses the kernel mode V4L2 drivers as follows:

在这里插入图片描述

  • To add one or more camera modules to a device tree
  • 1Locate or create a tegra-camera-platform device node in the kernel source tree at:

/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/tegra194-camera-imx185-a00.dtsi

  • 2In a Tegra-camera-platform device node, create a module table (modules) with one or more modules.
    Each module must contain its basic information and the definition of the devices that are inside that module.

2.关于硬件编解码。

  • 1.视频编解码流程
  • 在这里插入图片描述
  • 2.Deepstream上的硬件编解码例程。

在deepstream userGuide里有关于这个例程的介绍。Nvidia拥有独立的硬件解码模块DEC
samples里的DECPERF是关于硬件编解码的例程。

工作流程:

  1. 将数据包喂给流水线
  2. 添加解码任务
  3. 分析解码性能
    在这里插入图片描述
    1.第一步:创建一个DeviceWorker.

DeviceWorker负责整个DeepStream工作流程。它包括多通道解码和分析流水线维护。DeviceWorker由createDeviceWorker函数创建,具有多个通道(g_nChannels)和GPU ID(g_devID)作为参数。`

IDeviceWorker *pDeviceWorker = createDeviceWorker(g_nChannels, g_devID, g_maxBatchSize); 
 

2.第二步:数据输入

more data can be load. 
bool getData(uint8_t **ppBuf, int *pnBuf);
 // reset the dataProvider to reload from the video file from the beginning. 
void reload(); 

3.第三步:添加解码任务

// Add decode task, the parameter is the format of codec. 
pDeviceWorker->addDecodeTask(cudaVideoCodec_H264); 
 

4运行DeviceWorker

// Start and stop the DeviceWorker. 
pDeviceWorker->start();
 pDeviceWorker->stop(); 
  • 1
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值