elFarto / nvidia-vaapi-driver

A VA-API implemention using NVIDIA's NVDEC
Other
1.15k stars 53 forks source link

src: Increase num_render_targets to 32 for Chromium #270

Closed antkir closed 5 months ago

antkir commented 5 months ago

Without this change, nvEndpicture fails in cv->cuvidDecodePicture(nvCtx->decoder, picParams) when Chromium's VaapiVideoDecoder is used.

elFarto commented 5 months ago

Sorry, I meant to get to this earlier. Is 32 really required? Does any number >16 and <32 work? I'm just slightly concerned that NVDEC will allocate all those frames up front, and 32 is going to start taking a lot of memory, esp. at 4k resolutions.

antkir commented 5 months ago

The maximum surface index I saw in logs was 24, but I only ever tested a single YouTube video playing for no more than 5 minutes at a time and this number seemed to have a tendency to increase a bit while the video was playing, so I decided 32 would be a safer bet.

elFarto commented 5 months ago

Ok, I'll merge this in as-is but we may have to revisit it at some point.