From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id DD1C847AB8 for ; Tue, 31 Oct 2023 14:55:55 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 71D2C68CD54; Tue, 31 Oct 2023 16:55:07 +0200 (EET) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BF52968CD09 for ; Tue, 31 Oct 2023 16:55:00 +0200 (EET) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 26BC54BB0D; Tue, 31 Oct 2023 15:54:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1698764096; bh=xbnWyJqKI5LurdUmvBIM/pb+igI7Oq2D4PTJAFCLl5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OnSIojMbyZTD41AdmMhwy5NBIkqN6kOTW7HAWjFjlH9l2Zr66ITuCangg7ytk++oN TypOIkhtmrZvLqHLaX+988b9dndbL5uitOU1SmofrUKD9AdzAudVukdudunY1AlfIO VBq41lFr3IUSkjMQRpNbA0Y6hBrecJL9DlCXPzQo= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Tue, 31 Oct 2023 15:54:49 +0100 Message-ID: <20231031145450.94975-7-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231031145450.94975-1-ffmpeg@haasn.xyz> References: <20231031145450.94975-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 7/8] avfilter/vf_scale: tag output color space 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Niklas Haas When using vf_scale to force a specific output color space, also tag this on the AVFrame. (Mirroring existing logic for output range) --- libavfilter/vf_scale.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index fb8e6a2b76..3ec080693c 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -857,6 +857,9 @@ scale: brightness, contrast, saturation); out->color_range = out_full ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; + if (scale->out_color_matrix >= 0 && + scale->out_color_matrix != AVCOL_SPC_UNSPECIFIED) + out->colorspace = scale->out_color_matrix; } av_reduce(&out->sample_aspect_ratio.num, &out->sample_aspect_ratio.den, -- 2.42.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".