From: Niklas Haas <ffmpeg@haasn.xyz> To: ffmpeg-devel@ffmpeg.org Cc: Niklas Haas <git@haasn.dev> Subject: [FFmpeg-devel] [PATCH 5/5] avfilter/scale2ref: deprecate in favor of scale=rw:rh Date: Wed, 24 Apr 2024 12:52:00 +0200 Message-ID: <20240424110257.38715-6-ffmpeg@haasn.xyz> (raw) In-Reply-To: <20240424110257.38715-1-ffmpeg@haasn.xyz> From: Niklas Haas <git@haasn.dev> And remove it from the documentation. --- Changelog | 1 + doc/filters.texi | 73 ------------------------------------------ libavfilter/vf_scale.c | 3 ++ 3 files changed, 4 insertions(+), 73 deletions(-) diff --git a/Changelog b/Changelog index e821e5ac74..e827208439 100644 --- a/Changelog +++ b/Changelog @@ -8,6 +8,7 @@ version <next>: - LC3/LC3plus demuxer and muxer - pad_vaapi, drawbox_vaapi filters - vf_scale supports secondary ref input and framesync options +- vf_scale2ref deprecated version 7.0: diff --git a/doc/filters.texi b/doc/filters.texi index cf884568b0..5198f14f28 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -21590,79 +21590,6 @@ Scale a logo to 1/10th the height of a video, while preserving its display aspec @end example @end itemize -@section scale2ref - -Scale (resize) the input video, based on a reference video. - -See the scale filter for available options, scale2ref supports the same but -uses the reference video instead of the main input as basis. scale2ref also -supports the following additional constants for the @option{w} and -@option{h} options: - -@table @var -@item main_w -@item main_h -The main input video's width and height - -@item main_a -The same as @var{main_w} / @var{main_h} - -@item main_sar -The main input video's sample aspect ratio - -@item main_dar, mdar -The main input video's display aspect ratio. Calculated from -@code{(main_w / main_h) * main_sar}. - -@item main_hsub -@item main_vsub -The main input video's horizontal and vertical chroma subsample values. -For example for the pixel format "yuv422p" @var{hsub} is 2 and @var{vsub} -is 1. - -@item main_n -The (sequential) number of the main input frame, starting from 0. -Only available with @code{eval=frame}. - -@item main_t -The presentation timestamp of the main input frame, expressed as a number of -seconds. Only available with @code{eval=frame}. - -@item main_pos -The position (byte offset) of the frame in the main input stream, or NaN if -this information is unavailable and/or meaningless (for example in case of synthetic video). -Only available with @code{eval=frame}. -@end table - -@subsection Examples - -@itemize -@item -Scale a subtitle stream (b) to match the main video (a) in size before overlaying -@example -'scale2ref[b][a];[a][b]overlay' -@end example - -@item -Scale a logo to 1/10th the height of a video, while preserving its display aspect ratio. -@example -[logo-in][video-in]scale2ref=w=oh*mdar:h=ih/10[logo-out][video-out] -@end example -@end itemize - -@subsection Commands - -This filter supports the following commands: -@table @option -@item width, w -@item height, h -Set the output video dimension expression. -The command accepts the same syntax of the corresponding option. - -If the specified expression is not valid, it is kept at its current -value. -@end table - @section scale2ref_npp Use the NVIDIA Performance Primitives (libnpp) to scale (resize) the input diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index f174651333..bc53571c1c 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -368,6 +368,9 @@ static av_cold int init(AVFilterContext *ctx) int64_t threads; int ret; + if (ctx->filter == &ff_vf_scale2ref) + av_log(ctx, AV_LOG_WARNING, "scale2ref is deprecated, use scale=rw:rh instead\n"); + if (scale->size_str && (scale->w_expr || scale->h_expr)) { av_log(ctx, AV_LOG_ERROR, "Size and width/height expressions cannot be set at the same time.\n"); -- 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".
next prev parent reply other threads:[~2024-04-24 11:04 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-24 10:51 [FFmpeg-devel] [PATCH 0/5] replace scale2ref by scale=rw:rh Niklas Haas 2024-04-24 10:51 ` [FFmpeg-devel] [PATCH 1/5] avfilter/framesync: make framesync_class un-static Niklas Haas 2024-04-24 10:51 ` [FFmpeg-devel] [PATCH 2/5] avfilter/vf_scale: switch to FFFrameSync Niklas Haas 2024-04-24 10:51 ` [FFmpeg-devel] [PATCH 3/5] avfilter/vf_scale: add optional "ref" input Niklas Haas 2024-04-24 10:51 ` [FFmpeg-devel] [PATCH 4/5] fate/scale2ref_keep_aspect: switch to vf_scale ref_* Niklas Haas 2024-04-24 10:52 ` Niklas Haas [this message] 2024-04-24 11:18 ` [FFmpeg-devel] [PATCH 0/5] replace scale2ref by scale=rw:rh Gyan Doshi 2024-04-24 11:38 ` Timo Rothenpieler 2024-04-24 11:40 ` Niklas Haas 2024-05-02 10:12 ` Niklas Haas 2024-05-23 6:36 ` Anton Khirnov
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=20240424110257.38715-6-ffmpeg@haasn.xyz \ --to=ffmpeg@haasn.xyz \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=git@haasn.dev \ /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