Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Niklas Haas <ffmpeg@haasn.xyz>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 1/6] avutil/frame: add av_frame_remove_side_data_changed
Date: Thu, 2 May 2024 12:11:25 +0200
Message-ID: <20240502121125.GB10830@haasn.xyz> (raw)
In-Reply-To: <2d4bc05a-ff4e-4174-855e-65ef84a388f2@gmail.com>

On Fri, 26 Apr 2024 16:29:03 -0300 James Almer <jamrial@gmail.com> wrote:
> On 4/26/2024 9:27 AM, Niklas Haas wrote:
> > From: Niklas Haas <git@haasn.dev>
> > 
> > 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".

      reply	other threads:[~2024-05-02 10:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26 12:27 Niklas Haas
2024-04-26 12:27 ` [FFmpeg-devel] [PATCH 2/6] avfilter/vf_scale*: strip metadata on size change Niklas Haas
2024-04-26 12:28 ` [FFmpeg-devel] [PATCH 3/6] avfilter/vf_zscale: strip metadata on change Niklas Haas
2024-04-26 12:28 ` [FFmpeg-devel] [PATCH 4/6] avfilter/vf_libplacebo: update metadata stripping logic Niklas Haas
2024-04-26 12:28 ` [FFmpeg-devel] [PATCH 5/6] avfilter/vf_colorspace: strip color volume metadata Niklas Haas
2024-04-26 12:28 ` [FFmpeg-devel] [PATCH 6/6] avfilter/vf_lut*: " Niklas Haas
2024-04-26 12:36 ` [FFmpeg-devel] [PATCH 1/6] avutil/frame: add av_frame_remove_side_data_changed Niklas Haas
2024-04-26 13:24 ` epirat07
2024-04-26 19:29 ` James Almer
2024-05-02 10:11   ` Niklas Haas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240502121125.GB10830@haasn.xyz \
    --to=ffmpeg@haasn.xyz \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git