Advertisement
Guest User

3.8.3 Rate control

a guest
Aug 26th, 2018
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.04 KB | None | 0 0
  1. NVIDIA Video Codec SDK 8.2.15 の NVENC_VideoEncoder_API_ProgGuide.pdf より
  2. 「3.8.3 Rate control」を抜粋。
  3.  
  4. ---
  5.  
  6. 3.8.3 Rate control
  7.  
  8. NVENC supports several rate control modes and provides control over various parameters
  9. related to the rate control algorithm via structure NV_ENC_INITIALIZE_PARAMS::encodeConfig::rcParams.
  10. The rate control algorithm is implemented in NVENC firmware.
  11.  
  12. NVENC supports 1-pass (NV_ENC_PARAMS_RC_VBR and NV_ENC_PARAMS_RC_CBR),
  13. 2-pass (NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ, NV_ENC_PARAMS_RC_CBR_HQ and NV_ENC_PARAMS_RC_VBR_HQ),
  14. constant QP and Constant quality rate control modes.
  15.  
  16. In 1-pass rate control mode,NVENC estimates the required QP for the macroblock
  17. and immediately encodes the macroblock.
  18.  
  19. In 2-pass rate control modes, NVENC estimates the complexity of the frame to be encoded
  20. and determines bit distribution across the frame in the first pass.
  21. In the second pass, NVENC encodes macroblocks in the frame using the distribution determined in the first pass.
  22. As a result, quality of the encoded bitstream is generally better with 2-pass encoding, at the cost of some performance.
  23.  
  24. At a high level, NVENC supports following rate control modes:
  25.  
  26. ➢ Constant bitrate (CBR):
  27. Constant bitrate is specified by setting rateControlMode to
  28. NV_ENC_PARAMS_RC_CBR, NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ or NV_ENC_PARAMS_RC_CBR_HQ.
  29. In this mode, only averageBitRate is required and used as the target output bitrate by the rate control algorithm.
  30.  
  31. ➢ Variable bitrate (VBR):
  32. Variable bitrate is specified by setting rateControlMode to NV_ENC_PARAMS_RC_VBR or NV_ENC_PARAMS_RC_VBR_HQ.
  33. The encoder tries to conform to average bitrate of averageBitRate over the long term
  34. while not exceeding maxBitRate any time during the encoding.
  35. In this mode, averageBitRate must be specified.
  36. If maxBitRate isn’t specified, NVENC will set it to an internally determined default value.
  37. It is recommended that the client specify both parameters maxBitRate and averageBitRate for better control.
  38.  
  39. ➢ Constant QP:
  40. This mode is specified by setting rateControlMode to NV_ENC_PARAMS_RC_CONSTQP.
  41. In this mode, the entire frame is encoded using QP specified in NV_ENC_RC_PARAMS::constQP.
  42.  
  43. ➢ Target quality:
  44. This mode is specified by setting rateControlMode to one of the VBR modes and desired target quality in targetQuality.
  45. The range of this target quality is 0 to 51(fractional values are also supported in Video Codec SDK 8.0 and above).
  46. In this mode, the encoder tries to maintain constant quality for each frame,
  47. by allowing the bitrate to vary subject to the bitrate parameter specified in maxBitRate.
  48. The resulting average bitrate can, therefore, vary significantly depending on the video content being encoded.
  49. If maxBitRate is not specified, the encoder will use as many bits as needed to achieve the target quality.
  50. However, if maxBitRate is set, it will form an upper bound on the actual bitrate.
  51. If maxBitRate is set too low in this mode, the bitrate may become constrained,
  52. resulting in the desired target quality possibly not being achieved.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement