Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Martin Storsjö" <martin@martin.st>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] lavfi/vf_ssim360: Fix compilation with MSVC
Date: Sat, 28 Jan 2023 18:54:51 +0200 (EET)
Message-ID: <dd5d5663-2aad-cd37-8152-d3215b182ed2@martin.st> (raw)
In-Reply-To: <20230128162033.198838-1-martin@martin.st>

On Sat, 28 Jan 2023, Martin Storsjö wrote:

> Don't use "static const" for compile time float constants, but use
> defines. This fixes the following error:
>
> src/libavfilter/vf_ssim360.c(549): error C2099: initializer is not a constant
>
> Signed-off-by: Martin Storsjö <martin@martin.st>
> ---
> libavfilter/vf_ssim360.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/libavfilter/vf_ssim360.c b/libavfilter/vf_ssim360.c
> index 0990db0ed5..a0bf73da1e 100644
> --- a/libavfilter/vf_ssim360.c
> +++ b/libavfilter/vf_ssim360.c
> @@ -72,11 +72,11 @@
>
> #define DEFAULT_EXPANSION_COEF 1.01f
>
> -static const float BARREL_THETA_RANGE   = DEFAULT_EXPANSION_COEF *  2.0f * M_PI_F;
> -static const float BARREL_PHI_RANGE     = DEFAULT_EXPANSION_COEF *  M_PI_2_F;
> +#define BARREL_THETA_RANGE (DEFAULT_EXPANSION_COEF *  2.0f * M_PI_F)
> +#define BARREL_PHI_RANGE   (DEFAULT_EXPANSION_COEF *  M_PI_2_F)
>
> // Use fixed-point with 16 bit precision for fast bilinear math
> -static const int   FIXED_POINT_PRECISION = 16;
> +#define FIXED_POINT_PRECISION 16
>
> // Use 1MB per channel for the histogram to get 5-digit precise SSIM value
> #define SSIM360_HIST_SIZE 131072
> -- 
> 2.34.1

OK'd by Anton on irc, pushed.

// Martin
_______________________________________________
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:[~2023-01-28 16:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-28 16:20 Martin Storsjö
2023-01-28 16:54 ` Martin Storsjö [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=dd5d5663-2aad-cd37-8152-d3215b182ed2@martin.st \
    --to=martin@martin.st \
    --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