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 46C614A567 for ; Thu, 2 May 2024 10:11:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 117E068A604; Thu, 2 May 2024 13:11:34 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AF1A068D7AB for ; Thu, 2 May 2024 13:11:26 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1714644686; bh=r8hw43rcAGQM3ybW9PmB+yMFAWJJnaIoj6ZtBCsLeJg=; h=Date:From:To:Subject:In-Reply-To:References:From; b=RFckHHX9IkphhWVIxT9wrPtZXGIQVZu/dvwUEZwt09+cNRIX+MfbtS7mjN+LF6fjv HHvaEUyY6teXg9a1jHUVy/mj+OteSw0cagtqRWyi/XjorYunWOljVfOFgmaPCWqbIU 2L4BkNjMWxDHTomFFl4W8c3JaPsFyd9xmOnsI7Fw= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 2B5C940356 for ; Thu, 2 May 2024 12:11:26 +0200 (CEST) Date: Thu, 2 May 2024 12:11:25 +0200 Message-ID: <20240502121125.GB10830@haasn.xyz> From: Niklas Haas To: ffmpeg-devel@ffmpeg.org In-Reply-To: <2d4bc05a-ff4e-4174-855e-65ef84a388f2@gmail.com> References: <20240426122803.19967-1-ffmpeg@haasn.xyz> <2d4bc05a-ff4e-4174-855e-65ef84a388f2@gmail.com> MIME-Version: 1.0 Content-Disposition: inline Subject: Re: [FFmpeg-devel] [PATCH 1/6] avutil/frame: add av_frame_remove_side_data_changed 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 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: On Fri, 26 Apr 2024 16:29:03 -0300 James Almer wrote: > On 4/26/2024 9:27 AM, Niklas Haas wrote: > > From: Niklas Haas > > > > Many filters modify certain aspects of frame data, e.g. through resizing > > (vf_*scale* family), color volume mapping (vf_lut*, vf_tonemap*), or > > possibly others. > > > > When this happens, we should strip all frame side data that will no > > longer be correct/relevant after the operation. For example, changing > > the image size should invalidate AV_FRAME_DATA_PANSCAN because the crop > > window (given in pixels) no longer corresponds to the actual image size. > > For another example, tone-mapping filters (e.g. from HDR to SDR) should > > strip all of the dynamic HDR related metadata. > > > > Since there are a lot of similar with basically similar operations, it > > make sense to consolidate this stripping logic into a common helper > > function. I decided to put it into libavutil as it may be useful for API > > users as well, who often have their own internal processing and > > filtering. > > Maybe instead of "changed", which is a concept that doesn't belong to a > frame but to a process, use a name that references side data that > depends on specific properties (dimensions, color props, etc). > > Also, don't make it depend on AVFrame, but AVFrameSideData instead, so > it can be reused in other contexts (Use the av_frame_side_data_* > namespace for it). Do you have a proposed name? I can think of: - av_frame_side_data_remove_aspect() - av_frame_side_data_remove_dependent() - av_frame_side_data_remove_category() Not sure if I like any more (which is why I went with _changed(), which tells you exactly when this function was intended to be used). _______________________________________________ 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".