nvenc: Add support for more encoding option
nvenc: Add properties to support bframe encoding if device supports it Note that bframe encoding capability varies with GPU architecture
nvenc: Refactoring internal buffer pool structure To support rc-lookahead and bframe encoding, nvenc needs one more staging queue, because NvEncEncodePicture can return NV_ENC_ERR_NEED_MORE_INPUT but which was not considered so far. As documented by NVENC programming guide, pending buffers should wait other inputs until NvEncEncodePicture returns success. New encoding flow is - Submit raw picture buffer to encoder with NvEncEncodePicture - The submitted input/output buffer pair will be queued to pending_queue - If NvEncEncodePicture returned success, then move all pair in pending_queue to final stage - Otherwise, wait more input raw pictures. Another change is dropping NV_ENC_LOCK_INPUT_BUFFER usage. So now nvenc always uses CUDA memory input buffer. As a result, both opengl and system memory handling are unified.
nvenc: Remove pointless iteration and cleanup some code * The number of iteration is always one so the iteration is useless and that makes code complicated. * Also defining named structure can make code more readable. * g_free is null safe
nvenc: Add more rate-control options New rate-control modes are introduced (if device can support) * cbr-ld-hr: CBR low-delay high quality * cbr-hq: CBR high quality * vbr-hq: VBR high quality Also, various configurable rate-control related properties are added.
nvenc: Add support for weighted prediction option If device can support the weighted prediction option, the allowed maximum value of "weighted-pred" property will be set to 1. Users can inspect the availability of this option via GParamSpec
nvenc: Add property for AUD insertion Make AUD insertion configurable option