When image quality is set to "Best", switch hardware encoders (nvenc/qsv/amf)
to Constant QP (CQP) mode and VPX to Constrained Quality (CQ) mode, instead
of the default CBR. This gives the encoder direct quantization control for
consistently higher image quality at the cost of variable bitrate.
changes:
- Add unified QP model: piecewise-linear interpolation mapping bitrate ratio
to QP/qmin/qmax (working range 18-44), shared across all encoder backends
- Upgrade hwcodec to 0.8.0 with dynamic QP reconfigure support
- Add ffmpeg patches for nvenc dynamic constQP and amfenc dynamic QP/qmin/qmax
reconfiguration
- Replace EncoderApi::bitrate() with rc_state() to expose full rate control
state (bitrate, qp, qp_min, qp_max, qp_mode)
- Add rc_changed() to detect rate control mode switch, triggering encoder
re-creation when user toggles image quality
- Adapt QoS: in CQP mode, limit QP decrease to 1 step per adjustment period;
hide target bitrate in quality monitor when not applicable
Signed-off-by: 21pages <sunboeasy@gmail.com>