aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2016-09-18 16:06:55 +0100
committerMark Thompson <sw@jkqxz.net>2016-11-21 22:13:41 +0000
commit94f446c628bb885561eb028b0b01362e02ab67f5 (patch)
treedc25dff56372a7c62f0a2d8f77bf6d4d28f67662 /libavcodec
parent478a4b7e6d3ec51ba80e77f6dc3df75d9f6de66b (diff)
downloadffmpeg-94f446c628bb885561eb028b0b01362e02ab67f5.tar.gz
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 086e4b58b59ea3993107aa24d92bb962ec69667c)
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vaapi_encode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c
index 0e17c5ad9a..dc52ba5439 100644
--- a/libavcodec/vaapi_encode.c
+++ b/libavcodec/vaapi_encode.c
@@ -109,10 +109,10 @@ static int vaapi_encode_wait(AVCodecContext *avctx,
}
av_log(avctx, AV_LOG_DEBUG, "Sync to pic %"PRId64"/%"PRId64" "
- "(recon surface %#x).\n", pic->display_order,
- pic->encode_order, pic->recon_surface);
+ "(input surface %#x).\n", pic->display_order,
+ 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) {
av_log(avctx, AV_LOG_ERROR, "Failed to sync to picture completion: "
"%d (%s).\n", vas, vaErrorStr(vas));