[FFmpeg-devel] nvenc: missing slice offsets in NV_ENC_LOCK_BITSTREAM::sliceOffsets

Timo Rothenpieler timo at rothenpieler.org
Sat Sep 2 21:57:35 EEST 2017


I am currently dealing with an issue regarding interlaced encoding with 
NVENC uses field mode encoding, which means there are two slices(or 
rather, double the amount than usual, depending on 
sliceMode/sliceModeData) per input frame and output packet.

Now I had hoped I could just use the sliceOffsets returned in the 
So I turned on reportSliceOffsets in the init encode params.
And numSlices does indeed go from 1 to 2 when doing an interlaced 
encode. But all the reported sliceOffsets remain 0.
If I increase the sliceModeData to 4, so it creates multiple slices for 
testing, only the first 4 array fields get populated, and the other 4 
remain 0, while the reported slice count in numSlices is 8.

Thus it is impossible to split the returned data into multiple packets, 
which is necessary to give each packet its own timestamp, as is required 
for field mode interlaced encoding to work properly.

Is this indeed a driver bug, or is there some other way to get the 
required offset?

Timo Rothenpieler

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3994 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170902/426ad517/attachment.bin>

More information about the ffmpeg-devel mailing list