From patchwork Mon Apr 8 12:57:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 47919 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:24a8:b0:1a3:b6bb:3029 with SMTP id m40csp2456205pzd; Mon, 8 Apr 2024 06:01:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVuXiheBUj7tZkTKsnB8AYE/FiQWrByN1XCGKxQbMxzcHiGaO5U4Xn0Z0C5zJwVCUHwsi17dtgW6/DkKLKdbcJ1uE/x5sK37XnNwQ== X-Google-Smtp-Source: AGHT+IEDBnuIoyy2xGJlh2hKuRlmZaEpDaP7YPv3lYKZLFlFYJgFifrk19OHogzHKg6yAfJS3uRZ X-Received: by 2002:a17:906:7c4d:b0:a4e:7a36:4c38 with SMTP id g13-20020a1709067c4d00b00a4e7a364c38mr6248768ejp.20.1712581292528; Mon, 08 Apr 2024 06:01:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712581292; cv=none; d=google.com; s=arc-20160816; b=YJQeupCE2y1N8EgaqCiRpr1nJj9iCXZ4ANXmnMfk67JVqvdCESVMtspUWbFt3YKUJ5 xXtS7eSatVYOXoL0wPlri2jaNH1Afy2zXNZe5UL+L4eRDYq+HAT1b3LV7gjc51IoNQVL pi4higLD38MFE3Fvx6EDPepgWJm1RKcYKyBuaMvCeh1okqqPVq9PsYyzXla7rqB+O9Gb QQYZuJdeFuS6FPzT8Hi5RXl6vUqSng4mt/ORUT4GrbIIpcxFuvjCKt7A6Fs45Ls7sJPc AK2H9nKLNKFPvzN/DHE6IkefMxIBojAMkXJz7DdcIh/S0sEN2RMcISrw8eqIIzuNPp2V 90Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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:dkim-signature:delivered-to; bh=fmDqsYBOpEtYtY3zZFHHoPKg+Pq7fMIBxBGNZLM8OQw=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=BeEMcnTLqfuZHs77ceCxG5gbMXtFeDFq/igLPzplpTv+xK6EaWk0loMm5MaPX3lpHo 6/dKp5HlEvUihSt+XxGKngGWjsIhn7nVutBXyngbmg+K3QpdOYO/MWsI0BhTlObx6YVI mlZPHXd8soN2+JdcF9OVxDWGpVaPnK3KbKzwTvkHVTbT3+y0DmLDoZWJVTyJFfqExAq9 InbZZ8jv4U+KIznbmD5qLzxtlOPTOLPMquRp5oG87Ian+bmJ9RrPUqH6lBRNcJFXuiO2 wz676kvqry19DZzSfDgHM1EL7TlGyT/9W0wQyfKWwgDPYedGyUrnVz4EG77g9EB+UEeW fyXw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=FocMg8qN; 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 sh34-20020a1709076ea200b00a51ad5c53d7si3300307ejc.360.2024.04.08.06.01.32; Mon, 08 Apr 2024 06:01:32 -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=@haasn.xyz header.s=mail header.b=FocMg8qN; 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 75A8D68D29A; Mon, 8 Apr 2024 16:00:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D3C4768D1C4 for ; Mon, 8 Apr 2024 15:59:58 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1712581196; bh=PNl0bK2U34iBtgZw1Gg08ltPMeXNZMi5Sg2pM7C5vy4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FocMg8qN8RqoY0ZnNdAshVXbx19XzSte/Pk/fPEmGLYCJscyj+Ry/OYM8xdEnfwsb oOpJV+zJd/jgog8Qxs3cuX3n3h6cjhj42TX0XQ5Ig31TEFXNCIlhM1Ti0soNQfMnvZ xC3PYylCRl5H260Q8G3bbFgZWtrrQ4OpkBSegGOk= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 1C4E347BD5; Mon, 8 Apr 2024 14:59:56 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Mon, 8 Apr 2024 14:57:21 +0200 Message-ID: <20240408125950.53472-18-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240408125950.53472-1-ffmpeg@haasn.xyz> References: <20240408125950.53472-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 17/17] fftools/ffmpeg_filter: remove YUVJ hack 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 Cc: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: pKudoNYfV4k1 From: Niklas Haas This is no longer needed, since we now correctly negotiate the required range from the mjpeg encoder via avcodec_get_supported_config(). --- fftools/ffmpeg_filter.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index a40c6f381f2..461f2b86065 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -785,21 +785,6 @@ int ofilter_bind_ost(OutputFilter *ofilter, OutputStream *ost, (const void **) &ofp->formats); if (ret < 0) return ret; - - // MJPEG encoder exports a full list of supported pixel formats, - // but the full-range ones are experimental-only. - // Restrict the auto-conversion list unless -strict experimental - // has been specified. - if (!strcmp(c->name, "mjpeg")) { - // FIXME: YUV420P etc. are actually supported with full color range, - // yet the latter information isn't available here. - static const enum AVPixelFormat mjpeg_formats[] = - { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, - AV_PIX_FMT_NONE }; - - if (ost->enc_ctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) - ofp->formats = mjpeg_formats; - } } if (ost->enc_ctx->colorspace != AVCOL_SPC_UNSPECIFIED) { ofp->color_space = ost->enc_ctx->colorspace;