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 BF2FF47980 for ; Sat, 28 Oct 2023 14:46:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3970E68CBFF; Sat, 28 Oct 2023 17:44:51 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DBF4B68CBDC for ; Sat, 28 Oct 2023 17:44:40 +0300 (EEST) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 27DD64BBCC; Sat, 28 Oct 2023 16:44:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1698504277; bh=YQS0avJzovaQd/NhSeDmpuBn1BttYISHrz/dplJOh9Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FAPttxWNQrApoTsV5GLrTwMwG9/KKerQcIemdrO47A9+Dcmq/vpFejNt5O0lKCsCM EikThBRWjvfmz8bfbSyOW3414j7x4vfkH4P58ahh4XTo+h8/AHJdJ6Gt2ffz4VTmiZ CPwQONeVRg8y95UhNKn00FE7dcpsdgicq6QlsOdA= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Sat, 28 Oct 2023 16:41:16 +0200 Message-ID: <20231028144430.60538-10-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231028144430.60538-1-ffmpeg@haasn.xyz> References: <20231028144430.60538-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 09/10] 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 21cac60779..e3154fcd0a 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -820,6 +820,9 @@ scale: out->width = outlink->w; out->height = outlink->h; 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; // Sanity checks: // 1. If the output is RGB, set the matrix coefficients to RGB. -- 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".