diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-04-02 23:05:13 +0100 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-04-26 22:00:33 +0100 |
commit | 6af014f4028238b4c50f1731b3369a41d65fa9c4 (patch) | |
tree | 84aea726a461902a14b9b55d54660c13b2bd07ab /libavcodec/vaapi_encode_h265.c | |
parent | 85c2bf9d2cc7dad3d5c6dc79f802a74efa8d8fce (diff) |
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.)
Diffstat (limited to 'libavcodec/vaapi_encode_h265.c')
-rw-r--r-- | libavcodec/vaapi_encode_h265.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c index e9133b4313..9b029e2e20 100644 --- a/libavcodec/vaapi_encode_h265.c +++ b/libavcodec/vaapi_encode_h265.c @@ -832,8 +832,8 @@ static int vaapi_encode_h265_init_sequence_params(AVCodecContext *avctx) vseq->vui_time_scale = avctx->time_base.den; } - vseq->intra_period = ctx->p_per_i * (ctx->b_per_p + 1); - vseq->intra_idr_period = vseq->intra_period; + vseq->intra_period = avctx->gop_size; + vseq->intra_idr_period = avctx->gop_size; vseq->ip_period = ctx->b_per_p + 1; } |