@@ -191,16 +191,10 @@ int ff_vaapi_decode_issue(AVCodecContext *avctx,
av_log(avctx, AV_LOG_ERROR, "Failed to end picture decode "
"issue: %d (%s).\n", vas, vaErrorStr(vas));
err = AVERROR(EIO);
- if (CONFIG_VAAPI_1 || ctx->hwctx->driver_quirks &
- AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS)
- goto fail;
- else
- goto fail_at_end;
+ goto fail;
}
- if (CONFIG_VAAPI_1 || ctx->hwctx->driver_quirks &
- AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS)
- ff_vaapi_decode_destroy_buffers(avctx, pic);
+ ff_vaapi_decode_destroy_buffers(avctx, pic);
err = 0;
goto exit;
@@ -618,26 +618,17 @@ static int vaapi_encode_issue(AVCodecContext *avctx,
av_log(avctx, AV_LOG_ERROR, "Failed to end picture encode issue: "
"%d (%s).\n", vas, vaErrorStr(vas));
err = AVERROR(EIO);
- // vaRenderPicture() has been called here, so we should not destroy
- // the parameter buffers unless separate destruction is required.
- if (CONFIG_VAAPI_1 || ctx->hwctx->driver_quirks &
- AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS)
- goto fail;
- else
- goto fail_at_end;
- }
-
- if (CONFIG_VAAPI_1 || ctx->hwctx->driver_quirks &
- AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS) {
- for (i = 0; i < pic->nb_param_buffers; i++) {
- vas = vaDestroyBuffer(ctx->hwctx->display,
- pic->param_buffers[i]);
- if (vas != VA_STATUS_SUCCESS) {
- av_log(avctx, AV_LOG_ERROR, "Failed to destroy "
- "param buffer %#x: %d (%s).\n",
- pic->param_buffers[i], vas, vaErrorStr(vas));
- // And ignore.
- }
+ goto fail;
+ }
+
+ for (i = 0; i < pic->nb_param_buffers; i++) {
+ vas = vaDestroyBuffer(ctx->hwctx->display,
+ pic->param_buffers[i]);
+ if (vas != VA_STATUS_SUCCESS) {
+ av_log(avctx, AV_LOG_ERROR, "Failed to destroy "
+ "param buffer %#x: %d (%s).\n",
+ pic->param_buffers[i], vas, vaErrorStr(vas));
+ // And ignore.
}
}
@@ -106,7 +106,6 @@ typedef struct VAAPIEncodeH264Context {
int aud_needed;
int sei_needed;
- int sei_cbr_workaround_needed;
} VAAPIEncodeH264Context;
@@ -271,19 +270,6 @@ static int vaapi_encode_h264_write_extra_header(AVCodecContext *avctx,
*type = VAEncPackedHeaderRawData;
return 0;
-
-#if !CONFIG_VAAPI_1
- } else if (priv->sei_cbr_workaround_needed) {
- // Insert a zero-length header using the old SEI type. This is
- // required to avoid triggering broken behaviour on Intel platforms
- // in CBR mode where an invalid SEI message is generated by the
- // driver and inserted into the stream.
- *data_len = 0;
- *type = VAEncPackedHeaderH264_SEI;
- priv->sei_cbr_workaround_needed = 0;
- return 0;
-#endif
-
} else {
return AVERROR_EOF;
}
@@ -681,10 +667,6 @@ static int vaapi_encode_h264_init_picture_params(AVCodecContext *avctx,
if (priv->sei & SEI_IDENTIFIER && pic->encode_order == 0)
priv->sei_needed |= SEI_IDENTIFIER;
-#if !CONFIG_VAAPI_1
- if (ctx->va_rc_mode == VA_RC_CBR)
- priv->sei_cbr_workaround_needed = 1;
-#endif
if (priv->sei & SEI_TIMING) {
priv->sei_pic_timing = (H264RawSEIPicTiming) {