From patchwork Fri Feb 19 17:27:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: clime X-Patchwork-Id: 25812 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id B5FD3449161 for ; Fri, 19 Feb 2021 19:58:12 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6FDF468A636; Fri, 19 Feb 2021 19:58:12 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 66B40680972 for ; Fri, 19 Feb 2021 19:58:06 +0200 (EET) Received: by mail-yb1-f181.google.com with SMTP id m9so6319263ybk.8 for ; Fri, 19 Feb 2021 09:58:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=fhvxvw8sNiNA3OlSMK6g39OSezbtaZQmBd+yIHtEyok=; b=ZZ1poiYwIMO5c/mOkHjq94lOOSLprwY0jX01MWkIGW5WpSR/wGEzjETf+mRA97Exiy fpV8YxfxaD5w2mEkiTkBCCAuA6x9P1ob4ugwj/Dzy3ckuwPaJjmM4baCu/GR+IdJ+s+B x6bm68bA97V/w7nnH1T4ViN9emVVqsMYEd/oQcFusPKuFNAmwFj4vpNtiO7fKpKqBU6L AV5HyvLy49vUjtA1ZrXKgCP4iuo7IxSEP6G+rMf0ukcm+jC8hb7wBQUkFKUlEghixvQw eTaEYcrVf03zk9tsfippkDa2Us48ZABZqgw94/f2SIgu1oQIOatEe8Dl5KKMi3bDmYq1 BxhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=fhvxvw8sNiNA3OlSMK6g39OSezbtaZQmBd+yIHtEyok=; b=s4mLHHbsKr5VTiRExlm1/vrwhFcEUTjCbtliYoBh6Bxj6zlxTjeoGNKsN8sKtEsWO0 H6BEphKHK+TWlC0BGnm3CL3O4+SgQWShn+vWPGOciUKp5Oqlx8RRCkBJGkJI1ClqA1MB JPC8nmsAuGW2bIoFyXklBaTSRqVTGaLjaJ/pM56mLSSP8atLwQjiTenllMeTwY7M6Ekq 67LGGc46eoMBzSXXbqurN5+jGdwsautxA5+ArPJcgRNMihLmY5JA8TpCA+9zdvCyXTZb 9YO1oMjDVjJWzlawmPT+GiyU1TmG5mbmiodL4OEZ7RiHOX7ywEm5ORfxRp9SwVWtDytY r6cA== X-Gm-Message-State: AOAM531/hx0zhbR4dD9EzzfyHGRjWr5fIRz5UTnzr6PCjQDqA+/jj9YE s4Zp9hYowyNv9BiB/sVbabwlhfSHTz/dCPjrZJKQ1MFbjdum3w== X-Google-Smtp-Source: ABdhPJwQBoWAtEVV1093in/H39tsdYCJYsJz17e9agz361oqwUqCQMpjN6ZKkWtZr0I1gVGG/1fScSBYg0oR2GcfNFE= X-Received: by 2002:a25:db07:: with SMTP id g7mr7312538ybf.304.1613755662728; Fri, 19 Feb 2021 09:27:42 -0800 (PST) MIME-Version: 1.0 From: clime Date: Fri, 19 Feb 2021 18:27:32 +0100 Message-ID: To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH] set ulMaxDisplayDelay cuviddec parser option to zero if low_delay flag is on X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From a2c5edfdbeb428935f7e12c8d78a68d45b2e598d Mon Sep 17 00:00:00 2001 From: Michal Novotny Date: Fri, 19 Feb 2021 05:11:14 -0800 Subject: [PATCH] set ulMaxDisplayDelay cuviddec parser option to zero if low_delay flag is on * zero is recommended value in Nvidia coding samples for low latency use-cases --- libavcodec/cuviddec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ctx->cuparseinfo.pfnDecodePicture = cuvid_handle_picture_decode; -- 2.30.1 diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c index 49775b5a09..ef5acb6b7b 100644 --- a/libavcodec/cuviddec.c +++ b/libavcodec/cuviddec.c @@ -999,7 +999,7 @@ static av_cold int cuvid_decode_init(AVCodecContext *avctx) } ctx->cuparseinfo.ulMaxNumDecodeSurfaces = ctx->nb_surfaces; - ctx->cuparseinfo.ulMaxDisplayDelay = 4; + ctx->cuparseinfo.ulMaxDisplayDelay = avctx->flags & AV_CODEC_FLAG_LOW_DELAY ? 0 : 4; ctx->cuparseinfo.pUserData = avctx; ctx->cuparseinfo.pfnSequenceCallback = cuvid_handle_video_sequence;