mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-25 04:19:05 +00:00
vaapi_encode: Sync to input surface rather than output
While outwardly bizarre, this change makes the behaviour consistent
with other VAAPI encoders which sync to the encode /input/ picture in
order to wait for /output/ from the encoder. It is not harmful on
i965 (because synchronisation already happens in vaRenderPicture(),
so it has no effect there), and it allows the encoder to work on
mesa/gallium which assumes this behaviour.
(cherry picked from commit 086e4b58b5
)
This commit is contained in:
parent
478a4b7e6d
commit
94f446c628
@ -109,10 +109,10 @@ static int vaapi_encode_wait(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
av_log(avctx, AV_LOG_DEBUG, "Sync to pic %"PRId64"/%"PRId64" "
|
av_log(avctx, AV_LOG_DEBUG, "Sync to pic %"PRId64"/%"PRId64" "
|
||||||
"(recon surface %#x).\n", pic->display_order,
|
"(input surface %#x).\n", pic->display_order,
|
||||||
pic->encode_order, pic->recon_surface);
|
pic->encode_order, pic->input_surface);
|
||||||
|
|
||||||
vas = vaSyncSurface(ctx->hwctx->display, pic->recon_surface);
|
vas = vaSyncSurface(ctx->hwctx->display, pic->input_surface);
|
||||||
if (vas != VA_STATUS_SUCCESS) {
|
if (vas != VA_STATUS_SUCCESS) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Failed to sync to picture completion: "
|
av_log(avctx, AV_LOG_ERROR, "Failed to sync to picture completion: "
|
||||||
"%d (%s).\n", vas, vaErrorStr(vas));
|
"%d (%s).\n", vas, vaErrorStr(vas));
|
||||||
|
Loading…
Reference in New Issue
Block a user