summaryrefslogtreecommitdiff
path: root/libavcodec/vaapi_encode_vp8.c
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2018-09-18 23:30:47 +0100
committerMark Thompson <sw@jkqxz.net>2018-09-23 14:42:33 +0100
commitbf726c26fde26601a90daacf1b10a9860d21321c (patch)
tree9ed0e2a816515ea53a488410333c86f18e522e1f /libavcodec/vaapi_encode_vp8.c
parent8479f99c7dd227d9cb94d262602f1298f71cf33b (diff)
vaapi_encode: Clean up the GOP structure configuration
Choose what types of reference frames will be used based on what types are available, and make the intra-only mode explicit (GOP size one, which must be used for MJPEG).
Diffstat (limited to 'libavcodec/vaapi_encode_vp8.c')
-rw-r--r--libavcodec/vaapi_encode_vp8.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libavcodec/vaapi_encode_vp8.c b/libavcodec/vaapi_encode_vp8.c
index db67136556..4512609a19 100644
--- a/libavcodec/vaapi_encode_vp8.c
+++ b/libavcodec/vaapi_encode_vp8.c
@@ -66,7 +66,7 @@ static int vaapi_encode_vp8_init_sequence_params(AVCodecContext *avctx)
if (!(ctx->va_rc_mode & VA_RC_CQP)) {
vseq->bits_per_second = ctx->va_bit_rate;
- vseq->intra_period = avctx->gop_size;
+ vseq->intra_period = ctx->gop_size;
}
return 0;
@@ -198,11 +198,6 @@ static av_cold int vaapi_encode_vp8_init(AVCodecContext *avctx)
{
VAAPIEncodeContext *ctx = avctx->priv_data;
- if (avctx->max_b_frames > 0) {
- av_log(avctx, AV_LOG_ERROR, "B-frames are not supported.\n");
- return AVERROR_PATCHWELCOME;
- }
-
ctx->codec = &vaapi_encode_type_vp8;
// Packed headers are not currently supported.