This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 45f3fecca9f800a4432a6e3cfb3a76ef47f9d07a
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Tue Sep 22 00:30:47 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Mon Sep 28 11:47:39 2026 +0000

    avfilter/vf_cropdetect: drop the unused pixel sizes from checkline_edge()
    
    The edge map it scans always holds one byte per pixel.
---
 libavfilter/vf_cropdetect.c | 30 +++++-------------------------
 1 file changed, 5 insertions(+), 25 deletions(-)

diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c
index e9c12e5479..3aa0c1477d 100644
--- a/libavfilter/vf_cropdetect.c
+++ b/libavfilter/vf_cropdetect.c
@@ -142,31 +142,11 @@ static int checkline(void *ctx, const unsigned char *src, 
int stride, int len, i
     return total;
 }
 
-static int checkline_edge(void *ctx, const unsigned char *src, int stride, int 
len, int bpp)
+static int checkline_edge(void *ctx, const unsigned char *src, int stride, int 
len)
 {
-    const uint16_t *src16 = (const uint16_t *)src;
-
-    switch (bpp) {
-    case 1:
-        while (--len >= 0) {
-            if (src[0]) return 0;
-            src += stride;
-        }
-        break;
-    case 2:
-        stride >>= 1;
-        while (--len >= 0) {
-            if (src16[0]) return 0;
-            src16 += stride;
-        }
-        break;
-    case 3:
-    case 4:
-        while (--len >= 0) {
-            if (src[0] || src[1] || src[2]) return 0;
-            src += stride;
-        }
-        break;
+    while (--len >= 0) {
+        if (src[0]) return 0;
+        src += stride;
     }
 
     return 1;
@@ -359,7 +339,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*frame)
 
 #define FIND_EDGE(DST, FROM, NOEND, INC, STEP0, STEP1, LEN)             \
     for (last_y = y = FROM; NOEND; y = y INC) {                         \
-        if (checkline_edge(ctx, tmpbuf + STEP0 * y, STEP1, LEN, 1)) {   \
+        if (checkline_edge(ctx, tmpbuf + STEP0 * y, STEP1, LEN)) {      \
             if (last_y INC == y) {                                      \
                 DST = y;                                                \
                 break;                                                  \

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to