Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Thilo Borgmann" <thilo.borgmann@mail.de>
To: "FFmpeg development discussions and patches" <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 1/2] lavfi/blockdetect: Fix possible div by 0
Date: Sat, 04 Jun 2022 13:58:22 +0200
Message-ID: <36E09CBA-BC44-42CD-99F8-9A5D4BE80606@mail.de> (raw)
In-Reply-To: <DA504A9C-4445-4C9A-A08C-C8480087F414@mail.de>

[-- Attachment #1: Type: text/plain, Size: 16 bytes --]

$subject

-Thilo

[-- Attachment #2: 0002-lavfi-blockdetect-Reindent-after-last-commit.patch --]
[-- Type: text/plain, Size: 1317 bytes --]

From 11bc0a429d35815da7950f85b5f48f90758dc9ef Mon Sep 17 00:00:00 2001
From: Thilo Borgmann <thilo.borgmann@mail.de>
Date: Sat, 4 Jun 2022 13:47:31 +0200
Subject: [PATCH 2/2] lavfi/blockdetect: Reindent after last commit

---
 libavfilter/vf_blockdetect.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_blockdetect.c b/libavfilter/vf_blockdetect.c
index 85fca68..2728359 100644
--- a/libavfilter/vf_blockdetect.c
+++ b/libavfilter/vf_blockdetect.c
@@ -133,8 +133,8 @@ static float calculate_blockiness(BLKContext *s, int w, int h,
             }
         }
         if (block_count && nonblock_count) {
-        temp = (block / block_count) / (nonblock / nonblock_count);
-        ret = FFMAX(ret, temp);
+            temp = (block / block_count) / (nonblock / nonblock_count);
+            ret = FFMAX(ret, temp);
         }
     }
 
@@ -178,8 +178,8 @@ static float calculate_blockiness(BLKContext *s, int w, int h,
             }
         }
         if (block_count && nonblock_count) {
-        temp = (block / block_count) / (nonblock / nonblock_count);
-        ret = FFMAX(ret, temp);
+            temp = (block / block_count) / (nonblock / nonblock_count);
+            ret = FFMAX(ret, temp);
         }
     }
 
-- 
1.8.3.2


[-- Attachment #3: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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:[~2022-06-04 11:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-04 11:54 Thilo Borgmann
2022-06-04 11:56 ` Andreas Rheinhardt
2022-06-04 11:59   ` Thilo Borgmann
2022-06-04 11:57 ` Thilo Borgmann
2022-06-04 11:58   ` Thilo Borgmann [this message]
2022-06-06  7:10   ` Thilo Borgmann

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=36E09CBA-BC44-42CD-99F8-9A5D4BE80606@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