On 23.01.2016 15:10, Hendrik Leppkes wrote: > On Sat, Jan 23, 2016 at 2:45 PM, Ronald S. Bultje <rsbul...@gmail.com> wrote: >> Both of you keep shouting from one side of the room to the other without >> trying to actually converge to a point that might somehow be mutually >> acceptable. I'm getting very grumbly here. >> > > I'm not trying to be unreasonable here, all I'm asking for at this > point is to make sure the new vp9 hwaccel doesn't break spectacularly > when MT is turned on before its allowed back.
OK, that would be fine with me. Do you agree that the attached patch is sufficient for this? Best regards, Andreas
>From bb8d4e3bc92c62e110551fb1b4772c055c03a7ec Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> Date: Sat, 23 Jan 2016 15:48:30 +0100 Subject: [PATCH] vp9: skip hwaccel whith threading It was implemented in a way incompatible with threading. Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> --- libavcodec/vp9.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index 9a0bb82..a88fc0a 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -256,15 +256,20 @@ static int update_size(AVCodecContext *ctx, int w, int h) return res; if (s->pix_fmt == AV_PIX_FMT_YUV420P) { + if (ctx->active_thread_type & FF_THREAD_FRAME) { + av_log(ctx, AV_LOG_WARNING, + "Skipping vp9 hwaccel, because it is not compatible with threading.\n"); + } else { #if CONFIG_VP9_DXVA2_HWACCEL - *fmtp++ = AV_PIX_FMT_DXVA2_VLD; + *fmtp++ = AV_PIX_FMT_DXVA2_VLD; #endif #if CONFIG_VP9_D3D11VA_HWACCEL - *fmtp++ = AV_PIX_FMT_D3D11VA_VLD; + *fmtp++ = AV_PIX_FMT_D3D11VA_VLD; #endif #if CONFIG_VP9_VAAPI_HWACCEL - *fmtp++ = AV_PIX_FMT_VAAPI; + *fmtp++ = AV_PIX_FMT_VAAPI; #endif + } } *fmtp++ = s->pix_fmt; -- 2.7.0.rc3
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel