From: Thilo Borgmann <thilo.borgmann@mail.de>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 5/5] ffmpeg: Add {h, v}scale argument to display_matrix option to allow for scaling via the display matrix
Date: Tue, 16 Aug 2022 15:43:12 +0200
Message-ID: <a19aab0e-be14-35f9-629b-87ff2427a995@mail.de> (raw)
In-Reply-To: <20220816133046.70846-5-thilo.borgmann@mail.de>
Am 16.08.22 um 15:30 schrieb Thilo Borgmann:
> ---
> doc/ffmpeg.texi | 4 ++++
> fftools/ffmpeg_filter.c | 15 +++++++++++++++
> fftools/ffmpeg_opt.c | 10 ++++++++++
> libavutil/display.c | 21 +++++++++++++++++++++
> libavutil/display.h | 28 ++++++++++++++++++++++++++++
> 5 files changed, 78 insertions(+)
>
> [...]
> diff --git a/libavutil/display.c b/libavutil/display.c
> index d31061283c..b89763ff48 100644
> --- a/libavutil/display.c
> +++ b/libavutil/display.c
> @@ -28,9 +28,11 @@
>
> // fixed point to double
> #define CONV_FP(x) ((double) (x)) / (1 << 16)
> +#define CONV_FP2(x) ((double) (x)) / (1 << 30)
>
> // double to fixed point
> #define CONV_DB(x) (int32_t) ((x) * (1 << 16))
> +#define CONV_DB2(x) (int32_t) ((x) * (1 << 30))
>
> double av_display_rotation_get(const int32_t matrix[9])
> {
> @@ -48,6 +50,17 @@ double av_display_rotation_get(const int32_t matrix[9])
> return -rotation;
> }
>
> +double av_display_hscale_get(const int32_t matrix[9])
> +{
> + return fabs(CONV_FP2(matrix[2]));
> +}
> +
> +double av_display_vscale_get(const int32_t matrix[9])
> +{
> + return fabs(CONV_FP2(matrix[5]));
> +}
> +
> +#include <stdio.h>
obviously wrong and missed to remove... will be fixed locally.
-Thilo
_______________________________________________
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:[~2022-08-16 13:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 13:30 [FFmpeg-devel] [PATCH 1/5] fftools: Add support for dictionary options Thilo Borgmann
2022-08-16 13:30 ` [FFmpeg-devel] [PATCH 2/5] ffmpeg: Add display_matrix option Thilo Borgmann
2022-08-16 14:53 ` Andreas Rheinhardt
2022-08-16 15:29 ` Andreas Rheinhardt
2022-08-16 13:30 ` [FFmpeg-devel] [PATCH 3/5] ffmpeg: Deprecate display rotation override with a metadata key Thilo Borgmann
2022-08-16 13:30 ` [FFmpeg-devel] [PATCH 4/5] ffmpeg: Allow printing of option arguments in help output Thilo Borgmann
2022-08-16 15:34 ` Andreas Rheinhardt
2022-08-16 13:30 ` [FFmpeg-devel] [PATCH 5/5] ffmpeg: Add {h, v}scale argument to display_matrix option to allow for scaling via the display matrix Thilo Borgmann
2022-08-16 13:43 ` Thilo Borgmann [this message]
2022-08-16 17:26 ` Andreas Rheinhardt
2022-08-16 14:31 ` [FFmpeg-devel] [PATCH 1/5] fftools: Add support for dictionary options Andreas Rheinhardt
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=a19aab0e-be14-35f9-629b-87ff2427a995@mail.de \
--to=thilo.borgmann@mail.de \
--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