diff options
author | David Rosca <nowrep@gmail.com> | 2025-08-08 13:19:29 +0200 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2025-08-08 12:00:16 +0000 |
commit | db6fd82651222debe1d44f659d4515bed2089a9f (patch) | |
tree | 511f5748ac1b480c477e7d8b36eb528480f7bd1f | |
parent | 6862ec704a635e25c773938bc83fb865a5f0aae6 (diff) | |
download | ffmpeg-db6fd82651222debe1d44f659d4515bed2089a9f.tar.gz |
vulkan_encode_av1: Fix setting QP
Use the "qp" param instead of "global_quality" to match H264/5.
-rw-r--r-- | libavcodec/vulkan_encode_av1.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/vulkan_encode_av1.c b/libavcodec/vulkan_encode_av1.c index 83a8734c93..db70b2dc29 100644 --- a/libavcodec/vulkan_encode_av1.c +++ b/libavcodec/vulkan_encode_av1.c @@ -675,9 +675,9 @@ static int init_enc_options(AVCodecContext *avctx) enc->initial_buffer_fullness = enc->hrd_buffer_size * 3 / 4; } - if (enc->common.opts.rc_mode == VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR && - avctx->global_quality) { - enc->q_idx_p = av_clip_intp2(avctx->global_quality / FF_QP2LAMBDA, 8); + if (enc->common.opts.rc_mode == VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR) { + enc->q_idx_p = av_clip(enc->common.opts.qp, + enc->caps.minQIndex, enc->caps.maxQIndex); if (fabs(avctx->i_quant_factor) > 0.0) enc->q_idx_idr = av_clip((fabs(avctx->i_quant_factor) * enc->q_idx_p + |