From patchwork Thu Jun 17 17:45:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 28571 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5e:c91a:0:0:0:0:0 with SMTP id z26csp863983iol; Thu, 17 Jun 2021 10:46:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfHluK1ybpNOyLyADqWGUBrfFnBFigYKG76csCpM13Q4H6zt+ShfRfn5/MpcLP8Hl3diha X-Received: by 2002:aa7:c790:: with SMTP id n16mr8284687eds.98.1623952016766; Thu, 17 Jun 2021 10:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623952016; cv=none; d=google.com; s=arc-20160816; b=NKX0XG/7fBA8j3ttxdUHnM3ukcR1WsGDsRyAAWbgSdtSyIodIxlA+EmiRAqzPRPIXS dbdjA5Zj5kUZ15VZ9m4cPIQSDC5kEXg3/U4fpfE6+O6pqmuE6o9V9Hx52NJo3fiw75cL b8LfnzxlHitlmkT5NgrYc6qFthvcGHRs2QRt7wnwm2a/CYKthphT9b707UMcd0ELe4TE mRco3vhFfWtTX+f9eDRO8SffGWKN20ZlRweebkrBOcuFl1ZXwr3UL4NE087LHXAp08+V g0VRobqxJkpmQ5OW67LCDJ72p+k3LtMmmLel97i3CVfBfzZTEwHjEivLPQh8+Ea6x5Jb P+FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=1oP5+TZtG1gpVj/QaLTfWKis7iaoY8DnJaCs+ISmCn0=; b=ddwyaV1D3o5vN3ufVC6rwRkWBkb5HipOu++fws8vsvAdx92pBucNvmSu2sb6y3qbUW gUXX2zoohK6N2HzAs6gRtkl8iQK4eF++Q7tXDsLlb+j+P/10raPgFzlI5kPDe9P1xUug M18ENN31t/SusSKFKMQ8kOJZmzZkUVsBYF9GovZ4H4l3APUQevpXJ/kLTB5CXFrEXGEn H5SYbz0aXsyvgr6SMdfJZJa2eZt6eIKPBx1TjB/cP8TyMcArI69aMUExHAjrfI/P7B2y fUoPqZwlPIalP7B4/IrZp9hveBtgXPbdb9Fi1TWmObX2G1ucXyiW/rWNQYoQ0jXEEUof G8DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=i04E5Exm; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id cz9si2491653edb.398.2021.06.17.10.46.56; Thu, 17 Jun 2021 10:46:56 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=i04E5Exm; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 92FAF680989; Thu, 17 Jun 2021 20:46:52 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 54E29680134 for ; Thu, 17 Jun 2021 20:46:46 +0300 (EEST) Received: by mail-qk1-f170.google.com with SMTP id c138so4207976qkg.5 for ; Thu, 17 Jun 2021 10:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=zHbWTulwnPJ89oixTHmr5r7mxDzBAT6IKNHW8GSh5Lk=; b=i04E5Exm+PWUFOsOVHDuZ1uoDG3+vysd9tmssJUJJxL1+tIIrFIkNdl9QPBQRkw+VM 1D5UBCVA/uevBZxt4ryeQbfELWyFigJCIFf4sPuFsDWEoav2PwufeEZGwo09gIpSnMqH 44VOP/fZewTX7TLJ8Pnn9F7LA2T+g7xttn0l5P3IIMhV3k9/24CHZI6HCLmzuxnzmWTh CjlWV6U1iSYrK61OsduLaWtJ2nNYEYgG4/wHRFtZLLzgM6WIFdgRpKpM6hEUH+amL9up hbw9thkd76/6eSSk0hkj4aYzwDkbkhlu0ng0VvMAv5jwdY9AQMoJ5bkPz8to8jm9FXBV Gyug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=zHbWTulwnPJ89oixTHmr5r7mxDzBAT6IKNHW8GSh5Lk=; b=GDadBjomFMt1dSHj+vxB3JswZJpp4ryGV1pcL6JrrigAMQfWxxoU/tPDIS7AxZ++nS TRogiW+euWqHcWVIb1KfMMXYN46wNJaL4OmUji81x+5U4N75HQHaKoKc/x1s2q9ReQUx IbAwo7Lvurr29i0KNuEBIg2LTvNbV+0KjJfdy/UyeS4zNUZKAoi+L9K+F1pAM1ItgZLF gzwBQj6f1U31vFOc8JT6TCY1k8EHaDm6UiAbBAr7vrUsgogTzP9GwbgL+qww9Mj7rZ+H vLQq7eBjr0xVr3FEO7FK1oHJaJiEHBFtDRgBNGmUGo0XsCXVYn04QaZ9triw7QaIFZw5 ZI6w== X-Gm-Message-State: AOAM53348p7h2OB5KzB32RRVMuYIh1olL+9cTC8821pwUr7wM8WoZPHC nz/h4apQUsHLMC7mqL6hl5PE/FlPuAQQjA== X-Received: by 2002:ae9:e70b:: with SMTP id m11mr4975632qka.171.1623952004613; Thu, 17 Jun 2021 10:46:44 -0700 (PDT) Received: from localhost.localdomain ([191.84.225.169]) by smtp.gmail.com with ESMTPSA id u14sm3538175qtx.89.2021.06.17.10.46.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jun 2021 10:46:44 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 17 Jun 2021 14:45:41 -0300 Message-Id: <20210617174541.54637-1-jamrial@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/cuviddec: remove unused AVCodec.decode() callback X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: 2voRVJy1gYOm The AVCodec.receive_frame() callback takes precedence. Signed-off-by: James Almer --- libavcodec/cuviddec.c | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c index c3496259dc..d8c7f23a37 100644 --- a/libavcodec/cuviddec.c +++ b/libavcodec/cuviddec.c @@ -646,37 +646,6 @@ error: return ret; } -static int cuvid_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) -{ - CuvidContext *ctx = avctx->priv_data; - AVFrame *frame = data; - int ret = 0; - - av_log(avctx, AV_LOG_TRACE, "cuvid_decode_frame\n"); - - if (ctx->deint_mode_current != cudaVideoDeinterlaceMode_Weave) { - av_log(avctx, AV_LOG_ERROR, "Deinterlacing is not supported via the old API\n"); - return AVERROR(EINVAL); - } - - if (!ctx->decoder_flushing) { - ret = cuvid_decode_packet(avctx, avpkt); - if (ret < 0) - return ret; - } - - ret = cuvid_output_frame(avctx, frame); - if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) { - *got_frame = 0; - } else if (ret < 0) { - return ret; - } else { - *got_frame = 1; - } - - return 0; -} - static av_cold int cuvid_decode_end(AVCodecContext *avctx) { CuvidContext *ctx = avctx->priv_data; @@ -1143,7 +1112,6 @@ static const AVCodecHWConfigInternal *const cuvid_hw_configs[] = { .priv_class = &x##_cuvid_class, \ .init = cuvid_decode_init, \ .close = cuvid_decode_end, \ - .decode = cuvid_decode_frame, \ .receive_frame = cuvid_output_frame, \ .flush = cuvid_flush, \ .bsfs = bsf_name, \