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 C0F3046665 for ; Fri, 26 Apr 2024 12:28:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D533668D45B; Fri, 26 Apr 2024 15:28:20 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0A7CB68D448 for ; Fri, 26 Apr 2024 15:28:12 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1714134487; bh=qfjbHRBwOnp8MBI6FvMOwKzGmrOBL5QOFXSDwctbR+4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I8E2SJQxvwNDmF32Y5YswAEwOfgN9IU8KxIzVnYIIPWrBjxhpQ0//sl90WHNyS0ZZ UNPq+m60pyLIhiooIBM3FPIpTp9RM/nSU51MmrInC8gvLweU32X+HWPsfe0bnig8AP bz/kVHRlidXNU2yDRq33UrhnhhpplUtKVOQ+ap/Y= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 4F60343E5B; Fri, 26 Apr 2024 14:28:07 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Fri, 26 Apr 2024 14:28:03 +0200 Message-ID: <20240426122803.19967-6-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240426122803.19967-1-ffmpeg@haasn.xyz> References: <20240426122803.19967-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 6/6] avfilter/vf_lut*: strip color volume metadata 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 These filters, in general, will apply some arbitrary color volume transformation. Strip corresponding metadata to be conservative/safe. --- libavfilter/vf_lut.c | 2 ++ libavfilter/vf_lut2.c | 1 + libavfilter/vf_lut3d.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c index 01df8f287d..89884dd315 100644 --- a/libavfilter/vf_lut.c +++ b/libavfilter/vf_lut.c @@ -537,6 +537,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) av_frame_copy_props(out, in); } + av_frame_remove_side_data_changed(out, AV_FRAME_CHANGED_COLOR_VOLUME); + if (s->is_rgb && s->is_16bit && !s->is_planar) { /* packed, 16-bit */ PACKED_THREAD_DATA diff --git a/libavfilter/vf_lut2.c b/libavfilter/vf_lut2.c index 1f0661a0f5..123bfb2e17 100644 --- a/libavfilter/vf_lut2.c +++ b/libavfilter/vf_lut2.c @@ -610,6 +610,7 @@ static int tlut2_filter_frame(AVFilterLink *inlink, AVFrame *frame) } av_frame_copy_props(out, frame); + av_frame_remove_side_data_changed(out, AV_FRAME_CHANGED_COLOR_VOLUME); td.out = out; td.srcx = frame; diff --git a/libavfilter/vf_lut3d.c b/libavfilter/vf_lut3d.c index b3ddd3e69f..84c1405b26 100644 --- a/libavfilter/vf_lut3d.c +++ b/libavfilter/vf_lut3d.c @@ -1175,6 +1175,8 @@ static AVFrame *apply_lut(AVFilterLink *inlink, AVFrame *in) av_frame_copy_props(out, in); } + av_frame_remove_side_data_changed(out, AV_FRAME_CHANGED_COLOR_VOLUME); + td.in = in; td.out = out; ff_filter_execute(ctx, lut3d->interp, &td, NULL, -- 2.44.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".