mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-05 07:40:01 +00:00
va: encoders: don't assert at target percentage when QVBR
Instead of asserting, just get the max value between the current value and 10, which is the minimum required by QVBR. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6465>
This commit is contained in:
parent
cd14db923e
commit
4b5e930bc8
4 changed files with 4 additions and 4 deletions
|
@ -2692,7 +2692,7 @@ _av1_ensure_rate_control (GstVaAV1Enc * self)
|
|||
self->rc.base_qindex = DEFAULT_BASE_QINDEX;
|
||||
/* Fall through. */
|
||||
case VA_RC_QVBR:
|
||||
g_assert (self->rc.target_percentage >= 10);
|
||||
self->rc.target_percentage = MAX (10, self->rc.target_percentage);
|
||||
self->rc.max_bitrate = (guint) gst_util_uint64_scale_int (bitrate,
|
||||
100, self->rc.target_percentage);
|
||||
self->rc.target_bitrate = bitrate;
|
||||
|
|
|
@ -653,7 +653,7 @@ _ensure_rate_control (GstVaH264Enc * self)
|
|||
/* Fall through. */
|
||||
case VA_RC_QVBR:
|
||||
self->rc.qp_p = self->rc.qp_b = 26;
|
||||
g_assert (self->rc.target_percentage >= 10);
|
||||
self->rc.target_percentage = MAX (10, self->rc.target_percentage);
|
||||
self->rc.max_bitrate = (guint) gst_util_uint64_scale_int (bitrate,
|
||||
100, self->rc.target_percentage);
|
||||
self->rc.target_bitrate = bitrate;
|
||||
|
|
|
@ -3396,7 +3396,7 @@ _h265_ensure_rate_control (GstVaH265Enc * self)
|
|||
/* Fall through. */
|
||||
case VA_RC_QVBR:
|
||||
self->rc.qp_p = self->rc.qp_b = 26;
|
||||
g_assert (self->rc.target_percentage >= 10);
|
||||
self->rc.target_percentage = MAX (10, self->rc.target_percentage);
|
||||
self->rc.max_bitrate = (guint) gst_util_uint64_scale_int (bitrate,
|
||||
100, self->rc.target_percentage);
|
||||
self->rc.target_bitrate = bitrate;
|
||||
|
|
|
@ -2023,7 +2023,7 @@ _vp9_ensure_rate_control (GstVaVp9Enc * self)
|
|||
self->rc.base_qindex = DEFAULT_BASE_QINDEX;
|
||||
/* Fall through. */
|
||||
case VA_RC_QVBR:
|
||||
g_assert (self->rc.target_percentage >= 10);
|
||||
self->rc.target_percentage = MAX (10, self->rc.target_percentage);
|
||||
self->rc.max_bitrate = (guint) gst_util_uint64_scale_int (bitrate,
|
||||
100, self->rc.target_percentage);
|
||||
self->rc.target_bitrate = bitrate;
|
||||
|
|
Loading…
Reference in a new issue