From patchwork Sat Jul 23 14:09:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 36908 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp1047106pzb; Sat, 23 Jul 2022 07:11:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vLmzgH6hUjtSoXqy2UA3CLi6d4aSiDN63lvPKm4e0GvjBuHbwo0U89/Zg+697dENMcd3BN X-Received: by 2002:a17:907:1c19:b0:72f:cc9e:3a7 with SMTP id nc25-20020a1709071c1900b0072fcc9e03a7mr65748ejc.631.1658585505615; Sat, 23 Jul 2022 07:11:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658585505; cv=none; d=google.com; s=arc-20160816; b=0wAN0JqRvkYjplRd7tajZo4+FD/bMeKkfHH7IN0r9U3i49mNCNICmjQxVfEarqqGLw YRp1Qj2Y9BhthS7WhvVfR9h8tfx5N/6aYfrHfUNv9ncXLLc0aZnx9yzSqYuPwEEIA6f0 ViIghfxtxi5lcq/Zh4Sm4S6J6sqHrLoZ/tXOgy2cKCt4U1YW3M1R4t9XTgiUbeb7lQ/D LCRPX76beB9f62eBHwmp0k0yxE3YFpLBlPnmK1xyD2ymQRebXq3uhMirnT2dIdj2t/mw AjxpYReiJeqMNymm1+myRqXbKh2DnivDTHk517PC9rxQFrj9ZjNYLRs2mLMYui6MhCaG 0m6g== 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:references:in-reply-to:message-id :date:to:from:delivered-to; bh=yck3J3gQfgAIkyMJ2NSrDiowZAj7T3QOlYCuhbherx4=; b=se0SSEEC+aibEycJf044wFhjFa+9825fGS6l429d37sl/JYg762lEq1CPOzNOYu09v lhroKL5itrA/cEsFQ66opekj0CGbPUfvt4emqtbyIjU8JS9eLXkwa/rjyyVEWDJU5DGn oacr00mjUGfgyRZv3O5FlJYAUGwaJyJHUJraGA1Jk6Em/lugAmRYmk5CXisQmjlj9ObS FjyOHjdlukh5JAKFUCLwa1ngEVQv58oTXFMTHeu3Luj0AMBoWdJVk62qN1gqG22N/CJB r/aWhxG6VtGhDsuRzAjrsBzwCOIEDbUf84kkwdCX7OzZad90tVOBkm43isCPy35A+nDq uFFw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g8-20020a056402090800b004359f471717si9962710edz.0.2022.07.23.07.11.44; Sat, 23 Jul 2022 07:11:45 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 111A668B872; Sat, 23 Jul 2022 17:10:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4E40268B7D1 for ; Sat, 23 Jul 2022 17:10:28 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 5663324062A for ; Sat, 23 Jul 2022 16:10:26 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id bXN132pSDDV8 for ; Sat, 23 Jul 2022 16:10:25 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id AC1FC240592 for ; Sat, 23 Jul 2022 16:10:19 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id 8394E3A048F; Sat, 23 Jul 2022 16:10:19 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sat, 23 Jul 2022 16:09:37 +0200 Message-Id: <20220723140952.31814-12-anton@khirnov.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220723140952.31814-1-anton@khirnov.net> References: <20220723140952.31814-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 12/27] fftools/ffmpeg: drop unused hwaccel variables 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: ChH0lStBiC8P --- fftools/ffmpeg.c | 3 --- fftools/ffmpeg.h | 6 ------ 2 files changed, 9 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 30618c6a6a..f39966f096 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2275,7 +2275,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_ if (err < 0) goto fail; } - ist->hwaccel_retrieved_pix_fmt = decoded_frame->format; best_effort_timestamp= decoded_frame->best_effort_timestamp; *duration_pts = decoded_frame->duration; @@ -4428,8 +4427,6 @@ static int transcode(void) ist = input_streams[i]; if (ist->decoding_needed) { avcodec_close(ist->dec_ctx); - if (ist->hwaccel_uninit) - ist->hwaccel_uninit(ist->dec_ctx); } } diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 0795a380f8..bc78570d16 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -385,12 +385,8 @@ typedef struct InputStream { char *hwaccel_device; enum AVPixelFormat hwaccel_output_format; - /* hwaccel context */ - void *hwaccel_ctx; - void (*hwaccel_uninit)(AVCodecContext *s); int (*hwaccel_retrieve_data)(AVCodecContext *s, AVFrame *frame); enum AVPixelFormat hwaccel_pix_fmt; - enum AVPixelFormat hwaccel_retrieved_pix_fmt; /* stats */ // combined size of all the packets read @@ -493,8 +489,6 @@ typedef struct OutputStream { int64_t last_dropped; int64_t last_nb0_frames[3]; - void *hwaccel_ctx; - /* video only */ AVRational frame_rate; AVRational max_frame_rate;