What resources do I need to register in FRUC? How to register decoded frames from NVDEC?

When I decode a frame with NVDEC I want to send it to the FRUC library and interpolate with the previously sent one. Do I have to register it each time I get the decoded frame?

What would be my solution:

  1. Allocate memory for output frame
  2. Decode frame
  3. Register the output and currently decoded and previous frame
  4. Process
  5. Copy the result out from the output
  6. Unregister resources
  7. Go to 2.

Is the repeated register/unregister cycle OK?

Looking at the NvOFFRUCSample I understand that an option is to:

  1. Allocate the memory for input frames and output ones
  2. Register them
  3. Decode frame and copy it to the registered memory
  4. Process
  5. Copy the result out from the output
  6. Go to 3.

Can I avoid the copies? At least for the input? Just passing the CUdeviceptr of the decoded frame to FRUC?

Seems like my suggested solution is working in my implementation for anyone interested. Not sure if it’s optimal but…

1 Like