NVGetSPSPPS(), Invalid nal returned , and decoding surfaces Repost from probably wrong forum.

Three questions on gpu decoding:

To create some global nal sps/pps frames I would need to get the generic SPS/PPS nal unit from for an encoded H264 stream encoded with the Cuda encoding API.

The encoding part works fine. However, when I ask for the SPS/PPS Nals using NVGetSPSPPS() I get a Nal that contains (37 bytes)…

00 1d 67 42 c0 0d f4 0a 0f d0 80 00 01 f4 80 00 75 30 70 00 00 5d c0 00 01 e8 48 dd e5 c1 40 00 4 68 ce 3c 80

That can never be valid (first byte can’t be 0), and the whole Nal is indeed bogus. The call to NVGetSPSPPS() succeeds with an S_OK. Its a low H264 profile encoding. Note that GPUOffloadLevel indicates I can only offload estimators.

Long shot, but anyone has an idea (before I construct them myself)? A google for NVGetSPSPPS() gives me 3 hits, directly to the NV docs. Seems like not a lot of people are using this part of the api.

  1. I have seen the VC1 parser/decoder throw away the first 5 seconds of a valid stream, and outputting some strange timestamps. The decoder cycles through surfaces, but the mapped content of the first 100 frames or so is empty. I am guessing it has to do with the parser, since I see that once CUVIDPARSERDISPINFO::top_field_first is set by the display callback, the content is valid. I have a couple of mpegts streams that show this behavior (and they decode fine with ege ffmpeg or a bluray decoder)

  2. The H264 parser/decoder seems to be messing up when the number of reference surfaces is set low (ege 1). It is kinda expected, but is there a correlation to be set with reference surface count and decoder surfaces?

Driver version 263.06 (win 7), cuda 3.2.16.

Thanks for any response.