mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-07 09:41:32 +08:00
vaapi_encode: Use gop_size consistently in RC parameters
The non-H.26[45] codecs already use this form. Since we don't currently generate I frames for codecs which support them separately to IDR, the p_per_i variable is set to infinity by default so that it doesn't interfere with any other calculation. (All the code for I frames still exists, and it works for H.264 if set manually.)
This commit is contained in:
@@ -1429,8 +1429,7 @@ av_cold int ff_vaapi_encode_init(AVCodecContext *avctx)
|
||||
ctx->output_order = - ctx->output_delay - 1;
|
||||
|
||||
// Currently we never generate I frames, only IDR.
|
||||
ctx->p_per_i = ((avctx->gop_size + avctx->max_b_frames) /
|
||||
(avctx->max_b_frames + 1));
|
||||
ctx->p_per_i = INT_MAX;
|
||||
ctx->b_per_p = avctx->max_b_frames;
|
||||
|
||||
if (ctx->codec->sequence_params_size > 0) {
|
||||
|
Reference in New Issue
Block a user