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 69CF247E07 for ; Fri, 27 Oct 2023 17:05:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7B18268CBE7; Fri, 27 Oct 2023 20:05:02 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9F2E568CBDA for ; Fri, 27 Oct 2023 20:04:55 +0300 (EEST) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 6A8F24BB0D; Fri, 27 Oct 2023 19:04:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1698426291; bh=4+hPgcf6OKl1rEN6Su29JmY5uHYViRBq+Qj7XdhHr04=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kLFAKrLAhCyY7hEj3yPiWd/nTJYPSJIipm5vJ8j2nLfBFECjwGQqRete/MogEK69X DIVZv/MAiUB+2O6x/Frj83LpkK1gxVNx1vx4a8ISVuRFrV65/PUQoS+SeHpU8Lc3+M nODtTLJK7gUGnO2yCQZDiRDObqtRNGzSdrsOm8qM= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Fri, 27 Oct 2023 19:04:45 +0200 Message-ID: <20231027170446.63684-7-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231027170446.63684-1-ffmpeg@haasn.xyz> References: <20231027170446.63684-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 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 4a2f0bd1f1..d79d67c413 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -821,6 +821,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".