资源简介
对于nvidia显卡的编解码开发的 demo,还有一种sample比较清楚的实现了nvidia编码解码的方法.可以编码,解码出H265,H264
代码片段和文件信息
/*
* Copyright 1993-2017 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use reproduction disclosure or distribution of
* this software and related documentation outside the terms of the EULA
* is strictly prohibited.
*
*/
/* CUmoduleManager manages loading CUBIN initializing CUBIN kernel function
* initializating CUDA kernel function pointers and obtaining global memory
* addresses (i.e. constants).
*/
#include
#include
#include
#include
#include “dynlink_cuda.h“
#include “dynlink_builtin_types.h“
#include “helper_cuda_drvapi.h“
#include “cudaModuleMgr.h“
#define ERROR_BUFFER_SIZE 256
using namespace std;
// CUDA Module Manager (C implementation)
// filename_module - CUDA or PTX file path
// exec_path - execution path
// nKernels - total # of different CUDA kernel functions in the CUBIN/OTX
// nGlobalMem - total # of Global Memory arrays defined in the CUBIN/PTX (i.e. constants)
// nTexRef - total # of Texture References arrays defined in the CUBIN/PTX (i.e. texture arrays)
extern “C“
bool modInitCTX(sCtxModule *pCtx const char *filename const char *exec_path int nKernels int nGlobalMem int nTexRef)
{
pCtx->nMaxKernels_ = nKernels;
pCtx->nMaxGlobalMem_ = nGlobalMem;
pCtx->nMaxTexRef_ = nTexRef;
pCtx->mModuleName = filename;
CUresult cuStatus;
string module_path;
string ptx_source;
char *actual_path = sdkFindFilePath(pCtx->mModuleName.c_str() exec_path);
if (actual_path)
{
module_path = actual_path;
}
else
{
printf(“>> modInitCTX() <%36s> not found!\n“ pCtx->mModuleName.c_str());
return false;
}
if (module_path.empty())
{
printf(“>> modInitCTX() <%36s> not found!\n“ pCtx->mModuleName.c_str());
return false;
}
else
{
FILE *fp = fopen(module_path.c_str() “rb“);
fseek(fp 0 SEEK_END);
int file_size = ftell(fp);
char *buf = new char[file_size+1];
fseek(fp 0 SEEK_SET);
fread(buf sizeof(char) file_size fp);
fclose(fp);
buf[file_size] = ‘\0‘;
ptx_source = buf;
delete [] buf;
}
if (pCtx->mModuleName.rfind(“.ptx“) != string::npos)
{
// in this branch we use compilation with parameters
const unsigned int jitNumOptions = 3;
CUjit_option *jitOptions = new CUjit_option[jitNumOptions];
void **jitOptVals = new void *[jitNumOptions];
// set up size of compilation log buffer
jitOptions[0] = CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES;
int jitLogBufferSize = 1024;
jitOptVals[0] = (void *)(size_t)jitLogBufferSize;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-03-23 13:42 Video_Codec_SDK_8.1.24\
文件 1489 2018-03-23 13:39 Video_Codec_SDK_8.1.24\deprecation_notices.txt
目录 0 2018-03-23 13:42 Video_Codec_SDK_8.1.24\doc\
文件 762113 2018-03-23 13:39 Video_Codec_SDK_8.1.24\doc\NVDEC_Application_Note.pdf
文件 818832 2018-03-23 13:39 Video_Codec_SDK_8.1.24\doc\NVDEC_VideoDecoder_API_ProgGuide.pdf
文件 629795 2018-03-23 13:39 Video_Codec_SDK_8.1.24\doc\NVENC_Application_Note.pdf
文件 1133974 2018-03-23 13:39 Video_Codec_SDK_8.1.24\doc\NVENC_VideoEncoder_API_ProgGuide.pdf
文件 831936 2018-03-23 13:39 Video_Codec_SDK_8.1.24\doc\Using_FFmpeg_with_NVIDIA_GPU_Hardware_Acceleration.pdf
目录 0 2018-03-23 13:42 Video_Codec_SDK_8.1.24\LegacySamples\
目录 0 2018-03-23 13:42 Video_Codec_SDK_8.1.24\LegacySamples\common\
目录 0 2018-03-23 13:42 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\
文件 4132 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\cudaModuleMgr.h
文件 11356 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\drvapi_error_string.h
文件 28370 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\dynli
文件 548 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\dynli
文件 8573 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\dynli
文件 13172 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\dynli
文件 9100 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\dynli
文件 5897 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\dynli
文件 73291 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\dynli
文件 5236 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\dynli
文件 1643 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\dynli
文件 5262 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\exception.h
目录 0 2018-03-23 13:42 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\GL\
文件 703 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\GL\freeglut.h
文件 10682 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\GL\freeglut_ext.h
文件 27750 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\GL\freeglut_std.h
文件 70198 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\GL\gl.h
文件 943450 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\GL\glew.h
文件 691298 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\GL\glext.h
文件 19252 2018-03-23 13:39 Video_Codec_SDK_8.1.24\LegacySamples\common\inc\GL\glu.h
............此处省略346个文件信息
相关资源
- cuda9.0 win7 64 for tensorflow 1.5
- cudnn-10.1-windows10-x64-v7.6.3.30.zip
- curand64_100.dll
- Programming Massively Parallel Processors 3rd
- cudnn 7.6.4 linux
- CUDA并行程序设计 GPU编程指南[中文版
- CUDA JPEG编码
- cudnn 7.3.1
- opencv420_cuda_dnn编译_缓存文件.zip
- nccl_2.4.8-1+cuda10.0_x86_64.txz
- cudnn-10.2-windows10-x64-v7.6.5.32.zip
- libcudnn.so.6
- cudnn-10.2-windows10-x64-v7.6.5.32.7z
- opencv420_cuda_dnn编译_install文件.zip
- cudnn7.5for cuda 10 win10
- cuDnn-win10-Cuda10.0(亲测)
- cudnn7.0 for win64 and cuda9.0
- cudnn-10.0-windows10-x64-v7.4.1.5
- cuDNN v7.1.32018年4月17日,用于CUDA 9.0
- cudnn7.6.5 cuda 10 dll
- cusolver64_100.dll,cusparse64_100.dll
- 支持CUDA10的tensorflow-gpu轮子
- CUDA并行程序设计 GPU编程指南 高清扫
- CUDA C 编程权威指南
- cuda_9.0.176.2补丁就是他.zip
- CUDA C编程权威指南 (完整版).pdf
- GPU编程与优化 大众高性能计算(高清
- cuDNN7.1 Win10 搭配 CUDA9.0 Nvidia
- libcudnn7_7.0.5.13-1+cuda9.0_arm64.deb
- cuda toolkit 工具包 3.1 win7 64版
评论
共有 条评论