Hi,
I’m using latest NVIDIA Video Codec SDK 8.2.15 to decode H264 RAW file, but found something weird.
The decoder was initialized as this, nothing else, try to decode full HD at low latency mode.
m_nv_decoder.reset(new NvDecoder(m_cu_ctx,
1920,
1080,
false,
cudaVideoCodec_H264,
NULL,
true, // Enable Low Latency
true));
Since I know exact size of each NAL packet, so I could see how many frames the nvdecoder generates at each frame. First column is the size of packet which is filled to the decoder.
Quadro K4000
24 USED 0.016717 ms GOT 0 FRAMES
512486 Session Initialization Time: 36 ms
USED 38.4174 ms GOT 0 FRAMES
The first packet has 24 bytes, that’s the header of the NAL stream. After it that’s IDR frame, which is big, almost 512k, and NvDecoder spent 36ms to initialize the session, seems okay.
Then I got strange output
72667 USED 0.164528 ms GOT 0 FRAMES
39816 USED 0.112324 ms GOT 0 FRAMES
27041 USED 0.097954 ms GOT 0 FRAMES
86387 USED 7.14801 ms GOT 0 FRAMES
30537 USED 4.89243 ms GOT 0 FRAMES
17412 USED 4.07976 ms GOT 0 FRAMES
16959 USED 3.63545 ms GOT 0 FRAMES
16283 USED 5.54467 ms GOT 0 FRAMES
16169 USED 4.56718 ms GOT 0 FRAMES
15433 USED 4.1563 ms GOT 0 FRAMES
30526 USED 4.56542 ms GOT 0 FRAMES
51047 USED 4.39122 ms GOT 0 FRAMES
61002 USED 6.50779 ms GOT 1 FRAMES
47014 USED 3.17647 ms GOT 1 FRAMES
45105 USED 4.45603 ms GOT 1 FRAMES
31550 USED 5.04728 ms GOT 1 FRAMES
30662 USED 5.35434 ms GOT 1 FRAMES
30436 USED 3.4586 ms GOT 1 FRAMES
30131 USED 4.3264 ms GOT 1 FRAMES
43660 USED 4.71265 ms GOT 1 FRAMES
44534 USED 4.34987 ms GOT 1 FRAMES
44803 USED 3.1841 ms GOT 1 FRAMES
45012 USED 4.39855 ms GOT 1 FRAMES
31626 USED 4.36482 ms GOT 1 FRAMES
The decoder accepted the frame data, but didn’t return the frame, until the 13th times.
At the end
0 USED 26.3687 ms GOT 13 FRAMES
It returns the 13 frames.
So my question is is that possible to return the frame immediately rather than cached frame ? My application requires to reduce the latency as much as possible, I don’t want to get the 13 frames at once. Is there anything I have to setup for the parameter ?
Thank you very much !!!