From patchwork Mon Nov 15 15:23:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 31431 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp5992296iob; Mon, 15 Nov 2021 07:25:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxjCita8xqHL1wTeFXfxUcpfcCNI+f/qIUMdjjCkpbEpp206bC88INWP9UI9mbe8qmaOSMS X-Received: by 2002:aa7:cf9a:: with SMTP id z26mr40281915edx.136.1636989943162; Mon, 15 Nov 2021 07:25:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636989943; cv=none; d=google.com; s=arc-20160816; b=J8OV/tjoDyF5R+8LLFAm2Rzh4Ybpc7k6jCcbhofXUIfRPcaT4Bbu9vqnsUjvBSlBxd /j6lwtWn6fItmyLQuQrk6CXdTPosujliHgmUErP6+7XudxlrQcF3LSCx/BDZTmUkvwNi 2EUqgHOZBcX48I13aBxm46tBBZSLqNbLgPF552FXsrm8gxNqN7ej6BR3fxul5Ma7qtI6 JRDlGGkipdnQFPiWuf08xgUZkaA0dSyRIJ/Cwmcr0uaKhLHz1ElVqLxj2e8XGE2OWmFg loISFLWGVnNlzfKC4t7x7+kCbRNaHtyMiYwZCU2rs7boAL1pstk6MwLmg8TZNnpAkiBD /Tfg== 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=v+AVxBCjJid+N7T6Ql98+Y1DeO4OSCMxMjJJRf3XPoE=; b=JHiz9k4SpNvMtuo3tR2flQsiFdYnHnSrgXvpklOygEv3E7zWxopl0L9UFSyMo7Jq9w VMHL/apqgXYN3NlRqLrrGBsXYSr1KWY1fJYbXF1G16uykisMTvHLZKsRVL4awiTqSYLL N8qQ3MS/ABIB1PM4mLM98stw8aeIbb/yj8jUn4TTc7oCSwpCXqDdwcL6aiSGzzgNOZrB jyV81ulvH+YOMlP96eSV9iDzNNTPniYSszjpG7Rm0RDhUcKWCUdCnS6wHkMHg/SBXCZt UV0c/OnmIy6pR0Eu6rq62zWjODQVqE2rV/NUcJ9MwvGOxgucoVcbDY9RTY2+L3WSK/LE Icsg== 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 ho42si40790124ejc.50.2021.11.15.07.25.42; Mon, 15 Nov 2021 07:25:43 -0800 (PST) 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 3C36568AE89; Mon, 15 Nov 2021 17:24:24 +0200 (EET) 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 8DD7468AE52 for ; Mon, 15 Nov 2021 17:24:15 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 2DE2D24017A for ; Mon, 15 Nov 2021 16:24:13 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id IUjNg9Zo2n4X for ; Mon, 15 Nov 2021 16:24:12 +0100 (CET) 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 C006E240506 for ; Mon, 15 Nov 2021 16:24:07 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id 8190D3A0804; Mon, 15 Nov 2021 16:24:07 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Nov 2021 16:23:59 +0100 Message-Id: <20211115152400.5522-8-anton@khirnov.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211115152400.5522-1-anton@khirnov.net> References: <20211115152400.5522-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 8/9] ffmpeg: drop a useless assignment 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: HyVPURNF7b8N bits_per_raw_sample is already set in new_video_stream(), so this code has no effect. --- fftools/ffmpeg.c | 7 ------- fftools/ffmpeg.h | 1 - fftools/ffmpeg_opt.c | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 0f2fe192ac..c0ab78608a 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3451,13 +3451,6 @@ static int init_output_stream_encode(OutputStream *ost, AVFrame *frame) ost->st->avg_frame_rate = ost->frame_rate; - if (!dec_ctx || - enc_ctx->width != dec_ctx->width || - enc_ctx->height != dec_ctx->height || - enc_ctx->pix_fmt != dec_ctx->pix_fmt) { - enc_ctx->bits_per_raw_sample = frame_bits_per_raw_sample; - } - // Field order: autodetection if (frame) { if (enc_ctx->flags & (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME) && diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 30225e9ffe..2da7b1b7df 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -625,7 +625,6 @@ extern int print_stats; extern int64_t stats_period; extern int qp_hist; extern int stdin_interaction; -extern int frame_bits_per_raw_sample; extern AVIOContext *progress_avio; extern float max_error_rate; extern char *videotoolbox_pixfmt; diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 54f6279bf5..c16f5e8672 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -166,7 +166,7 @@ int abort_on_flags = 0; int print_stats = -1; int qp_hist = 0; int stdin_interaction = 1; -int frame_bits_per_raw_sample = 0; +static int frame_bits_per_raw_sample = 0; float max_error_rate = 2.0/3; char *filter_nbthreads; int filter_complex_nbthreads = 0;