Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/2] fate: add stripetest
@ 2025-04-22 22:43 Michael Niedermayer
  2025-04-22 22:43 ` [FFmpeg-devel] [PATCH 2/2] avcodec/ffv1enc: Eliminate fabs() Michael Niedermayer
  2025-04-27  0:34 ` [FFmpeg-devel] [PATCH 1/2] fate: add stripetest Michael Niedermayer
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Niedermayer @ 2025-04-22 22:43 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libpostproc/Makefile           |   3 +-
 libpostproc/tests/stripetest.c | 129 ++++++++++++
 tests/fate/libpostproc.mak     |   4 +
 tests/ref/fate/stripetest      | 360 +++++++++++++++++++++++++++++++++
 4 files changed, 495 insertions(+), 1 deletion(-)
 create mode 100644 libpostproc/tests/stripetest.c
 create mode 100644 tests/ref/fate/stripetest

diff --git a/libpostproc/Makefile b/libpostproc/Makefile
index 5afd2d2ad48..3823bec05fd 100644
--- a/libpostproc/Makefile
+++ b/libpostproc/Makefile
@@ -12,4 +12,5 @@ OBJS = postprocess.o           \
 # Windows resource file
 SHLIBOBJS-$(HAVE_GNU_WINDRES) += postprocres.o
 
-TESTPROGS = blocktest
+TESTPROGS = blocktest          \
+            stripetest         \
diff --git a/libpostproc/tests/stripetest.c b/libpostproc/tests/stripetest.c
new file mode 100644
index 00000000000..7b6359c6daa
--- /dev/null
+++ b/libpostproc/tests/stripetest.c
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) 2025 Michael Niedermayer
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavutil/frame.h"
+#include "libavutil/adler32.h"
+#include "libpostproc/postprocess.h"
+
+typedef const uint8_t *cuint8;
+
+static void strips(AVFrame *frame, int mul)
+{
+    for(int y=0; y<frame->height; y++) {
+        for(int x=0; x<frame->width; x++) {
+            if (y&1) {
+                frame->data[0][x + y*frame->linesize[0]] = x*x + y*mul;
+            } else {
+                frame->data[0][x + y*frame->linesize[0]] = (y-x)*(y-x);
+            }
+        }
+    }
+    for(int y=0; y<(frame->height+1)/2; y++) {
+        for(int x=0; x<(frame->width+1)/2; x++) {
+            if (y&1) {
+                frame->data[1][x + y*frame->linesize[1]] = x + y + mul;
+                frame->data[2][x + y*frame->linesize[2]] = mul*x - y*x;
+            } else {
+                frame->data[1][x + y*frame->linesize[1]] = (x - y)/(mul+1);
+                frame->data[2][x + y*frame->linesize[2]] = (y + x)/(mul+1);
+            }
+        }
+    }
+}
+
+static int64_t chksum(AVFrame *f)
+{
+    AVAdler a = 123;
+
+    for(int y=0; y<f->height; y++) {
+        a = av_adler32_update(a, &f->data[0][y*f->linesize[0]], f->width);
+    }
+    for(int y=0; y<(f->height+1)/2; y++) {
+        a = av_adler32_update(a, &f->data[1][y*f->linesize[1]], (f->width+1)/2);
+        a = av_adler32_update(a, &f->data[2][y*f->linesize[2]], (f->width+1)/2);
+    }
+
+    return a;
+}
+
+static int64_t test(int width, int height, const char *testname, int mul, int flags, int pict_type, int quality) {
+    AVFrame *in  = av_frame_alloc();
+    AVFrame *out = av_frame_alloc();
+    pp_context *context = pp_get_context(width, height, flags);
+    pp_mode *mode = pp_get_mode_by_name_and_quality(testname, quality);
+    int64_t ret;
+
+    if (!in || !out || !context || !mode) {
+        ret = AVERROR(ENOMEM);
+        goto end;
+    }
+
+    in-> width = out->width  = width;
+    in->height = out->height = height;
+    in->format = out->format = AV_PIX_FMT_YUV420P;
+
+    ret = av_frame_get_buffer(in, 0);
+    if (ret < 0)
+        goto end;
+
+    ret = av_frame_get_buffer(out, 0);
+    if (ret < 0)
+        goto end;
+
+    strips(in, mul);
+
+    pp_postprocess( (cuint8[]){in->data[0], in->data[1], in->data[2]}, in->linesize,
+                   out->data, out->linesize,
+                   width, height, NULL, 0,
+                   mode, context, pict_type);
+
+    ret = chksum(out);
+end:
+    av_frame_free(&in);
+    av_frame_free(&out);
+    pp_free_context(context);
+    pp_free_mode(mode);
+
+    return ret;
+}
+
+int main(int argc, char **argv) {
+    const char *teststrings[] = {
+        "be,lb",
+        "be,li",
+        "be,ci",
+        "be,md",
+        "be,fd",
+        "be,l5",
+    };
+
+    for (int w=8; w< 352; w=w*3-1) {
+        for (int h=8; h< 352; h=h*5-7) {
+            for (int b=0; b<6; b++) {
+                for (int m=0; m<17; m = 2*m+1) {
+                    int64_t ret = test(352, 288, teststrings[b], m, PP_FORMAT_420, 0, 11);
+                    printf("striptest %dx%d T:%s m:%d result %"PRIX64"\n", w, h, teststrings[b], m, ret);
+                }
+            }
+        }
+    }
+
+    return 0;
+}
diff --git a/tests/fate/libpostproc.mak b/tests/fate/libpostproc.mak
index 2561ed8292f..88d784fe29c 100644
--- a/tests/fate/libpostproc.mak
+++ b/tests/fate/libpostproc.mak
@@ -2,5 +2,9 @@ FATE_LIBPOSTPROC += fate-blocktest
 fate-blocktest: libpostproc/tests/blocktest$(EXESUF)
 fate-blocktest: CMD = run libpostproc/tests/blocktest$(EXESUF)
 
+FATE_LIBPOSTPROC += fate-stripetest
+fate-stripetest: libpostproc/tests/stripetest$(EXESUF)
+fate-stripetest: CMD = run libpostproc/tests/stripetest$(EXESUF)
+
 FATE-$(CONFIG_POSTPROC) += $(FATE_LIBPOSTPROC)
 fate-libpostproc: $(FATE_LIBPOSTPROC)
diff --git a/tests/ref/fate/stripetest b/tests/ref/fate/stripetest
new file mode 100644
index 00000000000..8d9ee6a7380
--- /dev/null
+++ b/tests/ref/fate/stripetest
@@ -0,0 +1,360 @@
+striptest 8x8 T:be,lb m:0 result 5F38B2E2
+striptest 8x8 T:be,lb m:1 result 4506C6FE
+striptest 8x8 T:be,lb m:3 result 2D018DB4
+striptest 8x8 T:be,lb m:7 result 8516EB12
+striptest 8x8 T:be,lb m:15 result C39812B2
+striptest 8x8 T:be,li m:0 result E3B512A4
+striptest 8x8 T:be,li m:1 result B90EA1E0
+striptest 8x8 T:be,li m:3 result C5C79090
+striptest 8x8 T:be,li m:7 result FF01E63E
+striptest 8x8 T:be,li m:15 result 68166CDA
+striptest 8x8 T:be,ci m:0 result 7CD10A97
+striptest 8x8 T:be,ci m:1 result 2387272A
+striptest 8x8 T:be,ci m:3 result 2C0A9900
+striptest 8x8 T:be,ci m:7 result C2ADE594
+striptest 8x8 T:be,ci m:15 result 585DA74B
+striptest 8x8 T:be,md m:0 result 2C998378
+striptest 8x8 T:be,md m:1 result B31547DD
+striptest 8x8 T:be,md m:3 result EA22AD7F
+striptest 8x8 T:be,md m:7 result E3EF3A42
+striptest 8x8 T:be,md m:15 result 4868A855
+striptest 8x8 T:be,fd m:0 result 318C9882
+striptest 8x8 T:be,fd m:1 result CEFBB545
+striptest 8x8 T:be,fd m:3 result 3C336951
+striptest 8x8 T:be,fd m:7 result EE3E42CC
+striptest 8x8 T:be,fd m:15 result 6DDBEC3
+striptest 8x8 T:be,l5 m:0 result 9B773645
+striptest 8x8 T:be,l5 m:1 result A71901CA
+striptest 8x8 T:be,l5 m:3 result DDCCE1C5
+striptest 8x8 T:be,l5 m:7 result 8D5291AE
+striptest 8x8 T:be,l5 m:15 result B83F9FF
+striptest 8x33 T:be,lb m:0 result 5F38B2E2
+striptest 8x33 T:be,lb m:1 result 4506C6FE
+striptest 8x33 T:be,lb m:3 result 2D018DB4
+striptest 8x33 T:be,lb m:7 result 8516EB12
+striptest 8x33 T:be,lb m:15 result C39812B2
+striptest 8x33 T:be,li m:0 result E3B512A4
+striptest 8x33 T:be,li m:1 result B90EA1E0
+striptest 8x33 T:be,li m:3 result C5C79090
+striptest 8x33 T:be,li m:7 result FF01E63E
+striptest 8x33 T:be,li m:15 result 68166CDA
+striptest 8x33 T:be,ci m:0 result 7CD10A97
+striptest 8x33 T:be,ci m:1 result 2387272A
+striptest 8x33 T:be,ci m:3 result 2C0A9900
+striptest 8x33 T:be,ci m:7 result C2ADE594
+striptest 8x33 T:be,ci m:15 result 585DA74B
+striptest 8x33 T:be,md m:0 result 2C998378
+striptest 8x33 T:be,md m:1 result B31547DD
+striptest 8x33 T:be,md m:3 result EA22AD7F
+striptest 8x33 T:be,md m:7 result E3EF3A42
+striptest 8x33 T:be,md m:15 result 4868A855
+striptest 8x33 T:be,fd m:0 result 318C9882
+striptest 8x33 T:be,fd m:1 result CEFBB545
+striptest 8x33 T:be,fd m:3 result 3C336951
+striptest 8x33 T:be,fd m:7 result EE3E42CC
+striptest 8x33 T:be,fd m:15 result 6DDBEC3
+striptest 8x33 T:be,l5 m:0 result 9B773645
+striptest 8x33 T:be,l5 m:1 result A71901CA
+striptest 8x33 T:be,l5 m:3 result DDCCE1C5
+striptest 8x33 T:be,l5 m:7 result 8D5291AE
+striptest 8x33 T:be,l5 m:15 result B83F9FF
+striptest 8x158 T:be,lb m:0 result 5F38B2E2
+striptest 8x158 T:be,lb m:1 result 4506C6FE
+striptest 8x158 T:be,lb m:3 result 2D018DB4
+striptest 8x158 T:be,lb m:7 result 8516EB12
+striptest 8x158 T:be,lb m:15 result C39812B2
+striptest 8x158 T:be,li m:0 result E3B512A4
+striptest 8x158 T:be,li m:1 result B90EA1E0
+striptest 8x158 T:be,li m:3 result C5C79090
+striptest 8x158 T:be,li m:7 result FF01E63E
+striptest 8x158 T:be,li m:15 result 68166CDA
+striptest 8x158 T:be,ci m:0 result 7CD10A97
+striptest 8x158 T:be,ci m:1 result 2387272A
+striptest 8x158 T:be,ci m:3 result 2C0A9900
+striptest 8x158 T:be,ci m:7 result C2ADE594
+striptest 8x158 T:be,ci m:15 result 585DA74B
+striptest 8x158 T:be,md m:0 result 2C998378
+striptest 8x158 T:be,md m:1 result B31547DD
+striptest 8x158 T:be,md m:3 result EA22AD7F
+striptest 8x158 T:be,md m:7 result E3EF3A42
+striptest 8x158 T:be,md m:15 result 4868A855
+striptest 8x158 T:be,fd m:0 result 318C9882
+striptest 8x158 T:be,fd m:1 result CEFBB545
+striptest 8x158 T:be,fd m:3 result 3C336951
+striptest 8x158 T:be,fd m:7 result EE3E42CC
+striptest 8x158 T:be,fd m:15 result 6DDBEC3
+striptest 8x158 T:be,l5 m:0 result 9B773645
+striptest 8x158 T:be,l5 m:1 result A71901CA
+striptest 8x158 T:be,l5 m:3 result DDCCE1C5
+striptest 8x158 T:be,l5 m:7 result 8D5291AE
+striptest 8x158 T:be,l5 m:15 result B83F9FF
+striptest 23x8 T:be,lb m:0 result 5F38B2E2
+striptest 23x8 T:be,lb m:1 result 4506C6FE
+striptest 23x8 T:be,lb m:3 result 2D018DB4
+striptest 23x8 T:be,lb m:7 result 8516EB12
+striptest 23x8 T:be,lb m:15 result C39812B2
+striptest 23x8 T:be,li m:0 result E3B512A4
+striptest 23x8 T:be,li m:1 result B90EA1E0
+striptest 23x8 T:be,li m:3 result C5C79090
+striptest 23x8 T:be,li m:7 result FF01E63E
+striptest 23x8 T:be,li m:15 result 68166CDA
+striptest 23x8 T:be,ci m:0 result 7CD10A97
+striptest 23x8 T:be,ci m:1 result 2387272A
+striptest 23x8 T:be,ci m:3 result 2C0A9900
+striptest 23x8 T:be,ci m:7 result C2ADE594
+striptest 23x8 T:be,ci m:15 result 585DA74B
+striptest 23x8 T:be,md m:0 result 2C998378
+striptest 23x8 T:be,md m:1 result B31547DD
+striptest 23x8 T:be,md m:3 result EA22AD7F
+striptest 23x8 T:be,md m:7 result E3EF3A42
+striptest 23x8 T:be,md m:15 result 4868A855
+striptest 23x8 T:be,fd m:0 result 318C9882
+striptest 23x8 T:be,fd m:1 result CEFBB545
+striptest 23x8 T:be,fd m:3 result 3C336951
+striptest 23x8 T:be,fd m:7 result EE3E42CC
+striptest 23x8 T:be,fd m:15 result 6DDBEC3
+striptest 23x8 T:be,l5 m:0 result 9B773645
+striptest 23x8 T:be,l5 m:1 result A71901CA
+striptest 23x8 T:be,l5 m:3 result DDCCE1C5
+striptest 23x8 T:be,l5 m:7 result 8D5291AE
+striptest 23x8 T:be,l5 m:15 result B83F9FF
+striptest 23x33 T:be,lb m:0 result 5F38B2E2
+striptest 23x33 T:be,lb m:1 result 4506C6FE
+striptest 23x33 T:be,lb m:3 result 2D018DB4
+striptest 23x33 T:be,lb m:7 result 8516EB12
+striptest 23x33 T:be,lb m:15 result C39812B2
+striptest 23x33 T:be,li m:0 result E3B512A4
+striptest 23x33 T:be,li m:1 result B90EA1E0
+striptest 23x33 T:be,li m:3 result C5C79090
+striptest 23x33 T:be,li m:7 result FF01E63E
+striptest 23x33 T:be,li m:15 result 68166CDA
+striptest 23x33 T:be,ci m:0 result 7CD10A97
+striptest 23x33 T:be,ci m:1 result 2387272A
+striptest 23x33 T:be,ci m:3 result 2C0A9900
+striptest 23x33 T:be,ci m:7 result C2ADE594
+striptest 23x33 T:be,ci m:15 result 585DA74B
+striptest 23x33 T:be,md m:0 result 2C998378
+striptest 23x33 T:be,md m:1 result B31547DD
+striptest 23x33 T:be,md m:3 result EA22AD7F
+striptest 23x33 T:be,md m:7 result E3EF3A42
+striptest 23x33 T:be,md m:15 result 4868A855
+striptest 23x33 T:be,fd m:0 result 318C9882
+striptest 23x33 T:be,fd m:1 result CEFBB545
+striptest 23x33 T:be,fd m:3 result 3C336951
+striptest 23x33 T:be,fd m:7 result EE3E42CC
+striptest 23x33 T:be,fd m:15 result 6DDBEC3
+striptest 23x33 T:be,l5 m:0 result 9B773645
+striptest 23x33 T:be,l5 m:1 result A71901CA
+striptest 23x33 T:be,l5 m:3 result DDCCE1C5
+striptest 23x33 T:be,l5 m:7 result 8D5291AE
+striptest 23x33 T:be,l5 m:15 result B83F9FF
+striptest 23x158 T:be,lb m:0 result 5F38B2E2
+striptest 23x158 T:be,lb m:1 result 4506C6FE
+striptest 23x158 T:be,lb m:3 result 2D018DB4
+striptest 23x158 T:be,lb m:7 result 8516EB12
+striptest 23x158 T:be,lb m:15 result C39812B2
+striptest 23x158 T:be,li m:0 result E3B512A4
+striptest 23x158 T:be,li m:1 result B90EA1E0
+striptest 23x158 T:be,li m:3 result C5C79090
+striptest 23x158 T:be,li m:7 result FF01E63E
+striptest 23x158 T:be,li m:15 result 68166CDA
+striptest 23x158 T:be,ci m:0 result 7CD10A97
+striptest 23x158 T:be,ci m:1 result 2387272A
+striptest 23x158 T:be,ci m:3 result 2C0A9900
+striptest 23x158 T:be,ci m:7 result C2ADE594
+striptest 23x158 T:be,ci m:15 result 585DA74B
+striptest 23x158 T:be,md m:0 result 2C998378
+striptest 23x158 T:be,md m:1 result B31547DD
+striptest 23x158 T:be,md m:3 result EA22AD7F
+striptest 23x158 T:be,md m:7 result E3EF3A42
+striptest 23x158 T:be,md m:15 result 4868A855
+striptest 23x158 T:be,fd m:0 result 318C9882
+striptest 23x158 T:be,fd m:1 result CEFBB545
+striptest 23x158 T:be,fd m:3 result 3C336951
+striptest 23x158 T:be,fd m:7 result EE3E42CC
+striptest 23x158 T:be,fd m:15 result 6DDBEC3
+striptest 23x158 T:be,l5 m:0 result 9B773645
+striptest 23x158 T:be,l5 m:1 result A71901CA
+striptest 23x158 T:be,l5 m:3 result DDCCE1C5
+striptest 23x158 T:be,l5 m:7 result 8D5291AE
+striptest 23x158 T:be,l5 m:15 result B83F9FF
+striptest 68x8 T:be,lb m:0 result 5F38B2E2
+striptest 68x8 T:be,lb m:1 result 4506C6FE
+striptest 68x8 T:be,lb m:3 result 2D018DB4
+striptest 68x8 T:be,lb m:7 result 8516EB12
+striptest 68x8 T:be,lb m:15 result C39812B2
+striptest 68x8 T:be,li m:0 result E3B512A4
+striptest 68x8 T:be,li m:1 result B90EA1E0
+striptest 68x8 T:be,li m:3 result C5C79090
+striptest 68x8 T:be,li m:7 result FF01E63E
+striptest 68x8 T:be,li m:15 result 68166CDA
+striptest 68x8 T:be,ci m:0 result 7CD10A97
+striptest 68x8 T:be,ci m:1 result 2387272A
+striptest 68x8 T:be,ci m:3 result 2C0A9900
+striptest 68x8 T:be,ci m:7 result C2ADE594
+striptest 68x8 T:be,ci m:15 result 585DA74B
+striptest 68x8 T:be,md m:0 result 2C998378
+striptest 68x8 T:be,md m:1 result B31547DD
+striptest 68x8 T:be,md m:3 result EA22AD7F
+striptest 68x8 T:be,md m:7 result E3EF3A42
+striptest 68x8 T:be,md m:15 result 4868A855
+striptest 68x8 T:be,fd m:0 result 318C9882
+striptest 68x8 T:be,fd m:1 result CEFBB545
+striptest 68x8 T:be,fd m:3 result 3C336951
+striptest 68x8 T:be,fd m:7 result EE3E42CC
+striptest 68x8 T:be,fd m:15 result 6DDBEC3
+striptest 68x8 T:be,l5 m:0 result 9B773645
+striptest 68x8 T:be,l5 m:1 result A71901CA
+striptest 68x8 T:be,l5 m:3 result DDCCE1C5
+striptest 68x8 T:be,l5 m:7 result 8D5291AE
+striptest 68x8 T:be,l5 m:15 result B83F9FF
+striptest 68x33 T:be,lb m:0 result 5F38B2E2
+striptest 68x33 T:be,lb m:1 result 4506C6FE
+striptest 68x33 T:be,lb m:3 result 2D018DB4
+striptest 68x33 T:be,lb m:7 result 8516EB12
+striptest 68x33 T:be,lb m:15 result C39812B2
+striptest 68x33 T:be,li m:0 result E3B512A4
+striptest 68x33 T:be,li m:1 result B90EA1E0
+striptest 68x33 T:be,li m:3 result C5C79090
+striptest 68x33 T:be,li m:7 result FF01E63E
+striptest 68x33 T:be,li m:15 result 68166CDA
+striptest 68x33 T:be,ci m:0 result 7CD10A97
+striptest 68x33 T:be,ci m:1 result 2387272A
+striptest 68x33 T:be,ci m:3 result 2C0A9900
+striptest 68x33 T:be,ci m:7 result C2ADE594
+striptest 68x33 T:be,ci m:15 result 585DA74B
+striptest 68x33 T:be,md m:0 result 2C998378
+striptest 68x33 T:be,md m:1 result B31547DD
+striptest 68x33 T:be,md m:3 result EA22AD7F
+striptest 68x33 T:be,md m:7 result E3EF3A42
+striptest 68x33 T:be,md m:15 result 4868A855
+striptest 68x33 T:be,fd m:0 result 318C9882
+striptest 68x33 T:be,fd m:1 result CEFBB545
+striptest 68x33 T:be,fd m:3 result 3C336951
+striptest 68x33 T:be,fd m:7 result EE3E42CC
+striptest 68x33 T:be,fd m:15 result 6DDBEC3
+striptest 68x33 T:be,l5 m:0 result 9B773645
+striptest 68x33 T:be,l5 m:1 result A71901CA
+striptest 68x33 T:be,l5 m:3 result DDCCE1C5
+striptest 68x33 T:be,l5 m:7 result 8D5291AE
+striptest 68x33 T:be,l5 m:15 result B83F9FF
+striptest 68x158 T:be,lb m:0 result 5F38B2E2
+striptest 68x158 T:be,lb m:1 result 4506C6FE
+striptest 68x158 T:be,lb m:3 result 2D018DB4
+striptest 68x158 T:be,lb m:7 result 8516EB12
+striptest 68x158 T:be,lb m:15 result C39812B2
+striptest 68x158 T:be,li m:0 result E3B512A4
+striptest 68x158 T:be,li m:1 result B90EA1E0
+striptest 68x158 T:be,li m:3 result C5C79090
+striptest 68x158 T:be,li m:7 result FF01E63E
+striptest 68x158 T:be,li m:15 result 68166CDA
+striptest 68x158 T:be,ci m:0 result 7CD10A97
+striptest 68x158 T:be,ci m:1 result 2387272A
+striptest 68x158 T:be,ci m:3 result 2C0A9900
+striptest 68x158 T:be,ci m:7 result C2ADE594
+striptest 68x158 T:be,ci m:15 result 585DA74B
+striptest 68x158 T:be,md m:0 result 2C998378
+striptest 68x158 T:be,md m:1 result B31547DD
+striptest 68x158 T:be,md m:3 result EA22AD7F
+striptest 68x158 T:be,md m:7 result E3EF3A42
+striptest 68x158 T:be,md m:15 result 4868A855
+striptest 68x158 T:be,fd m:0 result 318C9882
+striptest 68x158 T:be,fd m:1 result CEFBB545
+striptest 68x158 T:be,fd m:3 result 3C336951
+striptest 68x158 T:be,fd m:7 result EE3E42CC
+striptest 68x158 T:be,fd m:15 result 6DDBEC3
+striptest 68x158 T:be,l5 m:0 result 9B773645
+striptest 68x158 T:be,l5 m:1 result A71901CA
+striptest 68x158 T:be,l5 m:3 result DDCCE1C5
+striptest 68x158 T:be,l5 m:7 result 8D5291AE
+striptest 68x158 T:be,l5 m:15 result B83F9FF
+striptest 203x8 T:be,lb m:0 result 5F38B2E2
+striptest 203x8 T:be,lb m:1 result 4506C6FE
+striptest 203x8 T:be,lb m:3 result 2D018DB4
+striptest 203x8 T:be,lb m:7 result 8516EB12
+striptest 203x8 T:be,lb m:15 result C39812B2
+striptest 203x8 T:be,li m:0 result E3B512A4
+striptest 203x8 T:be,li m:1 result B90EA1E0
+striptest 203x8 T:be,li m:3 result C5C79090
+striptest 203x8 T:be,li m:7 result FF01E63E
+striptest 203x8 T:be,li m:15 result 68166CDA
+striptest 203x8 T:be,ci m:0 result 7CD10A97
+striptest 203x8 T:be,ci m:1 result 2387272A
+striptest 203x8 T:be,ci m:3 result 2C0A9900
+striptest 203x8 T:be,ci m:7 result C2ADE594
+striptest 203x8 T:be,ci m:15 result 585DA74B
+striptest 203x8 T:be,md m:0 result 2C998378
+striptest 203x8 T:be,md m:1 result B31547DD
+striptest 203x8 T:be,md m:3 result EA22AD7F
+striptest 203x8 T:be,md m:7 result E3EF3A42
+striptest 203x8 T:be,md m:15 result 4868A855
+striptest 203x8 T:be,fd m:0 result 318C9882
+striptest 203x8 T:be,fd m:1 result CEFBB545
+striptest 203x8 T:be,fd m:3 result 3C336951
+striptest 203x8 T:be,fd m:7 result EE3E42CC
+striptest 203x8 T:be,fd m:15 result 6DDBEC3
+striptest 203x8 T:be,l5 m:0 result 9B773645
+striptest 203x8 T:be,l5 m:1 result A71901CA
+striptest 203x8 T:be,l5 m:3 result DDCCE1C5
+striptest 203x8 T:be,l5 m:7 result 8D5291AE
+striptest 203x8 T:be,l5 m:15 result B83F9FF
+striptest 203x33 T:be,lb m:0 result 5F38B2E2
+striptest 203x33 T:be,lb m:1 result 4506C6FE
+striptest 203x33 T:be,lb m:3 result 2D018DB4
+striptest 203x33 T:be,lb m:7 result 8516EB12
+striptest 203x33 T:be,lb m:15 result C39812B2
+striptest 203x33 T:be,li m:0 result E3B512A4
+striptest 203x33 T:be,li m:1 result B90EA1E0
+striptest 203x33 T:be,li m:3 result C5C79090
+striptest 203x33 T:be,li m:7 result FF01E63E
+striptest 203x33 T:be,li m:15 result 68166CDA
+striptest 203x33 T:be,ci m:0 result 7CD10A97
+striptest 203x33 T:be,ci m:1 result 2387272A
+striptest 203x33 T:be,ci m:3 result 2C0A9900
+striptest 203x33 T:be,ci m:7 result C2ADE594
+striptest 203x33 T:be,ci m:15 result 585DA74B
+striptest 203x33 T:be,md m:0 result 2C998378
+striptest 203x33 T:be,md m:1 result B31547DD
+striptest 203x33 T:be,md m:3 result EA22AD7F
+striptest 203x33 T:be,md m:7 result E3EF3A42
+striptest 203x33 T:be,md m:15 result 4868A855
+striptest 203x33 T:be,fd m:0 result 318C9882
+striptest 203x33 T:be,fd m:1 result CEFBB545
+striptest 203x33 T:be,fd m:3 result 3C336951
+striptest 203x33 T:be,fd m:7 result EE3E42CC
+striptest 203x33 T:be,fd m:15 result 6DDBEC3
+striptest 203x33 T:be,l5 m:0 result 9B773645
+striptest 203x33 T:be,l5 m:1 result A71901CA
+striptest 203x33 T:be,l5 m:3 result DDCCE1C5
+striptest 203x33 T:be,l5 m:7 result 8D5291AE
+striptest 203x33 T:be,l5 m:15 result B83F9FF
+striptest 203x158 T:be,lb m:0 result 5F38B2E2
+striptest 203x158 T:be,lb m:1 result 4506C6FE
+striptest 203x158 T:be,lb m:3 result 2D018DB4
+striptest 203x158 T:be,lb m:7 result 8516EB12
+striptest 203x158 T:be,lb m:15 result C39812B2
+striptest 203x158 T:be,li m:0 result E3B512A4
+striptest 203x158 T:be,li m:1 result B90EA1E0
+striptest 203x158 T:be,li m:3 result C5C79090
+striptest 203x158 T:be,li m:7 result FF01E63E
+striptest 203x158 T:be,li m:15 result 68166CDA
+striptest 203x158 T:be,ci m:0 result 7CD10A97
+striptest 203x158 T:be,ci m:1 result 2387272A
+striptest 203x158 T:be,ci m:3 result 2C0A9900
+striptest 203x158 T:be,ci m:7 result C2ADE594
+striptest 203x158 T:be,ci m:15 result 585DA74B
+striptest 203x158 T:be,md m:0 result 2C998378
+striptest 203x158 T:be,md m:1 result B31547DD
+striptest 203x158 T:be,md m:3 result EA22AD7F
+striptest 203x158 T:be,md m:7 result E3EF3A42
+striptest 203x158 T:be,md m:15 result 4868A855
+striptest 203x158 T:be,fd m:0 result 318C9882
+striptest 203x158 T:be,fd m:1 result CEFBB545
+striptest 203x158 T:be,fd m:3 result 3C336951
+striptest 203x158 T:be,fd m:7 result EE3E42CC
+striptest 203x158 T:be,fd m:15 result 6DDBEC3
+striptest 203x158 T:be,l5 m:0 result 9B773645
+striptest 203x158 T:be,l5 m:1 result A71901CA
+striptest 203x158 T:be,l5 m:3 result DDCCE1C5
+striptest 203x158 T:be,l5 m:7 result 8D5291AE
+striptest 203x158 T:be,l5 m:15 result B83F9FF
-- 
2.49.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".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [FFmpeg-devel] [PATCH 2/2] avcodec/ffv1enc: Eliminate fabs()
  2025-04-22 22:43 [FFmpeg-devel] [PATCH 1/2] fate: add stripetest Michael Niedermayer
@ 2025-04-22 22:43 ` Michael Niedermayer
  2025-04-27  0:34 ` [FFmpeg-devel] [PATCH 1/2] fate: add stripetest Michael Niedermayer
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Niedermayer @ 2025-04-22 22:43 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Fixes: warning: using floating point absolute value function 'fabs' when argument is of integer type
No change in output
Changing variables to float worsens compression significantly

Found-by: ePirat
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/ffv1enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 75e40771b6f..6ab648fd805 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -1441,7 +1441,7 @@ static void encode_float32_remap(FFV1Context *f, FFV1SliceContext *sc,
                         cost = FFMAX((delta + mul/2)  / mul, 1);
                         float score = 1;
                         if (mul > 1) {
-                            score *= (fabs(delta - cost*mul)+1);
+                            score *= (FFABS(delta - cost*mul)+1);
                             if (mul_count > 1)
                                 score *= score;
                         }
-- 
2.49.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".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/2] fate: add stripetest
  2025-04-22 22:43 [FFmpeg-devel] [PATCH 1/2] fate: add stripetest Michael Niedermayer
  2025-04-22 22:43 ` [FFmpeg-devel] [PATCH 2/2] avcodec/ffv1enc: Eliminate fabs() Michael Niedermayer
@ 2025-04-27  0:34 ` Michael Niedermayer
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Niedermayer @ 2025-04-27  0:34 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 809 bytes --]

On Wed, Apr 23, 2025 at 12:43:04AM +0200, Michael Niedermayer wrote:
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libpostproc/Makefile           |   3 +-
>  libpostproc/tests/stripetest.c | 129 ++++++++++++
>  tests/fate/libpostproc.mak     |   4 +
>  tests/ref/fate/stripetest      | 360 +++++++++++++++++++++++++++++++++
>  4 files changed, 495 insertions(+), 1 deletion(-)
>  create mode 100644 libpostproc/tests/stripetest.c
>  create mode 100644 tests/ref/fate/stripetest

will apply patchset

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Some people wanted to paint the bikeshed green, some blue and some pink.
People argued and fought, when they finally agreed, only rust was left.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: 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".

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-27  0:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-22 22:43 [FFmpeg-devel] [PATCH 1/2] fate: add stripetest Michael Niedermayer
2025-04-22 22:43 ` [FFmpeg-devel] [PATCH 2/2] avcodec/ffv1enc: Eliminate fabs() Michael Niedermayer
2025-04-27  0:34 ` [FFmpeg-devel] [PATCH 1/2] fate: add stripetest Michael Niedermayer

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