]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/cuviddec: Remove unnecessary stream synchronisation
authorPhilip Langdale <philipl@overt.org>
Sat, 30 Mar 2019 17:51:07 +0000 (10:51 -0700)
committerPhilip Langdale <philipl@overt.org>
Sat, 30 Mar 2019 17:51:07 +0000 (10:51 -0700)
We're also doing a sync here after copying the frame to be passed
on down the pipleine. And it is also unnecessary.

I was able to demonstrate a 33% speedup removing the sync from
an example transcode pipeline.

libavcodec/cuviddec.c

index 291bb93dbc682ebcf385374aed92e0b838d32116..2aecb45768c1cfc131530af2452693f41195973f 100644 (file)
@@ -553,10 +553,6 @@ static int cuvid_output_frame(AVCodecContext *avctx, AVFrame *frame)
 
                 offset += height;
             }
-
-            ret = CHECK_CU(ctx->cudl->cuStreamSynchronize(device_hwctx->stream));
-            if (ret < 0)
-                goto error;
         } else if (avctx->pix_fmt == AV_PIX_FMT_NV12      ||
                    avctx->pix_fmt == AV_PIX_FMT_P010      ||
                    avctx->pix_fmt == AV_PIX_FMT_P016      ||