Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8590081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:12:44+00:00 2026-06-11T23:12:44+00:00

I am trying to develop multi-streaming H.264 video player based on cudaDecodeD3D9 example from

  • 0

I am trying to develop multi-streaming H.264 video player based on cudaDecodeD3D9 example from NVIDIA GPU Computing SDK 4.2.

Application works correctly with a few streams but it raises assertion (CUDA_ERROR_OUT_OF_MEMORY) in cuvidCreateDecoder function for 12 streams with resolution 800×600 or 9 streams with resolution 1920×1080. cudaMemGetInfo returns 387MB (for video card with 1GB) and 1.3Gb (for video card with 2GB) available memory. Does memory fragmentation cause this? How can I use available memory?

VideoDecoder::VideoDecoder(const CUVIDEOFORMAT & rVideoFormat, 
                       CUcontext &rContext, 
                       cudaVideoCreateFlags eCreateFlags, 
                       CUvideoctxlock &vidCtxLock) 
: m_VidCtxLock(vidCtxLock)
{
// get a copy of the CUDA context
m_Context          = rContext;
m_VideoCreateFlags = eCreateFlags;

// Fill the decoder-create-info struct from the given video-format struct.
memset(&oVideoDecodeCreateInfo_, 0, sizeof(CUVIDDECODECREATEINFO));
        // Create video decoder
oVideoDecodeCreateInfo_.CodecType           = rVideoFormat.codec;
oVideoDecodeCreateInfo_.ulWidth             = rVideoFormat.coded_width;
oVideoDecodeCreateInfo_.ulHeight            = rVideoFormat.coded_height;
oVideoDecodeCreateInfo_.ulNumDecodeSurfaces = FrameQueue::cnMaximumSize;

        // Limit decode memory to 24MB (16M pixels at 4:2:0 = 24M bytes)
while (oVideoDecodeCreateInfo_.ulNumDecodeSurfaces * rVideoFormat.coded_width * rVideoFormat.coded_height > 16*1024*1024)
{
    oVideoDecodeCreateInfo_.ulNumDecodeSurfaces--;
}
oVideoDecodeCreateInfo_.ChromaFormat        = rVideoFormat.chroma_format;
oVideoDecodeCreateInfo_.OutputFormat        = cudaVideoSurfaceFormat_NV12;
oVideoDecodeCreateInfo_.DeinterlaceMode     = cudaVideoDeinterlaceMode_Adaptive;

        // No scaling
oVideoDecodeCreateInfo_.ulTargetWidth       = oVideoDecodeCreateInfo_.ulWidth;
oVideoDecodeCreateInfo_.ulTargetHeight      = oVideoDecodeCreateInfo_.ulHeight;
oVideoDecodeCreateInfo_.ulNumOutputSurfaces = MAX_FRAME_COUNT;  // We won't simultaneously map more than 8 surfaces
oVideoDecodeCreateInfo_.ulCreationFlags     = m_VideoCreateFlags;
oVideoDecodeCreateInfo_.vidLock             = m_VidCtxLock;

size_t available, total;
cudaMemGetInfo(&available, &total);

        // create the decoder
CUresult oResult = cuvidCreateDecoder(&oDecoder_, &oVideoDecodeCreateInfo_);
assert(CUDA_SUCCESS == oResult);
}

Can cuvidCreateDecoder work with resolution over 1920×1080? When I try 2560×1920 stream cuvidCreateDecoder asserts CUDA_ERROR_INVALID_SOURCE.

My environment

  • Hardware: NVidia GTX 550 Ti 1Gb, NVidia GT 610 2Gb, driver version 306.23
  • Windows 7 x64
  • Visual Studio 2010 SP1
  • Windows SDK 7.1
  • NVIDIA GPU Computing Toolkit v.4.2, v.5.0
  • NVIDIA GPU Computing SDK 4.2.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T23:12:45+00:00Added an answer on June 11, 2026 at 11:12 pm

    For the memory issue, see this answer.

    For the question on resolution, Compute Capability 2.0 and earlier GPUs do not support larger than HD resolution for cudaDecodeD3D9. This is why you can’t decode a 2560×1920 stream.

    Kepler GPUs can support much larger resolutions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was trying to develop a video management software for which I was evaluating
I am trying to develop the XMPP Gateway which can send/receive from standard XMPP
I am trying to develop a multi-screen app for the Google TV platform using
I am trying to develop a game in Unity where you jump from 2D
I'm currently trying to develop a project based upon Firemonkey. I'm using Firemonkey for
I am trying to develop a BlackBerry application that will show data from an
I am trying to develop a multi-threaded activemq consumer. The messages get processed in
Im trying to develop a small site which retrieves a results from a database
Im trying to develop a simple java code which will upload some contents from
I am trying to develop a app for my country's elderly. In a multi-racial

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.