View Single Post
Old 2nd June 2015, 11:19   #13  |  Link
l35633
Registered User
 
Join Date: Oct 2014
Posts: 43
hi, now I want to use the GTX980 to decode 264, then there is a decoding sample named cudaDecodeGL in CUDA samples, there is no error when making.
When I ran cudaDecodeGL, the error showed below, why is it, would you please give me some advices? Thank you very much!

> Device 0: < GeForce GTX 980 >, Compute SM 5.2 detected
>> initGL() creating window [1280 x 720]
MapSMtoCores for SM 5.2 is undefined. Default to use 128 Cores/SM
> Using CUDA/GL Device [0]: GeForce GTX 980
> Using GPU Device: GeForce GTX 980 has SM 5.2 compute capability
Total amount of global memory: 4095.3125 MB
>> modInitCTX<NV12ToARGB_drvapi64.ptx > initialized OK
>> modGetCudaFunction< CUDA file: NV12ToARGB_drvapi64.ptx >
CUDA Kernel Function (0x027f5940) = < NV12ToARGB_drvapi >
>> modGetCudaFunction< CUDA file: NV12ToARGB_drvapi64.ptx >
CUDA Kernel Function (0x027f3050) = < Passthru_drvapi >
cuvidCtxLockCreate failed: 100
cudaDecodeGL: videoDecodeGL.cpp:1039: void initCudaVideo(): Assertion `0' failed.
Aborted (core dumped)


// and the function source code is below
void
initCudaVideo()
{
// bind the context lock to the CUDA context
CUresult result = cuvidCtxLockCreate(&g_CtxLock, g_oContext);

if (result != CUDA_SUCCESS)
{
printf("cuvidCtxLockCreate failed: %d\n", result);
assert(0);
}

size_t totalGlobalMem;
size_t freeMem;

cuMemGetInfo(&freeMem,&totalGlobalMem);
printf(" Free memory: %4.4f MB\n", (float)freeMem/(1024*1024));

std::auto_ptr<VideoDecoder> apVideoDecoder(new VideoDecoder(g_pVideoSource->format(), g_oContext, g_eVideoCreateFlags, g_CtxLock));
std::auto_ptr<VideoParser> apVideoParser(new VideoParser(apVideoDecoder.get(), g_pFrameQueue, &g_oContext));
g_pVideoSource->setParser(*apVideoParser.get());

g_pVideoParser = apVideoParser.release();
g_pVideoDecoder = apVideoDecoder.release();

// Create a Stream ID for handling Readback
if (g_bReadback)
{
checkCudaErrors(cuStreamCreate(&g_ReadbackSID, 0));
checkCudaErrors(cuStreamCreate(&g_KernelSID, 0));
printf(">> initCudaVideo()\n");
printf(" CUDA Streams (%s) <g_ReadbackSID = %p>\n", ((g_ReadbackSID == 0) ? "Disabled" : "Enabled"), g_ReadbackSID);
printf(" CUDA Streams (%s) <g_KernelSID = %p>\n", ((g_KernelSID == 0) ? "Disabled" : "Enabled"), g_KernelSID);
}
}
l35633 is offline   Reply With Quote