aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/xpsnr.h
diff options
context:
space:
mode:
authorChristian Helmrich <christian.helmrich@hhi.fraunhofer.de>2024-08-28 11:28:49 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-09-08 17:51:37 +0200
commit865cd3c0560a965fe096524ed2d8d2962057e6ac (patch)
treebbef2133b3e4693b6814423c52b950230d7ed5ab /libavfilter/xpsnr.h
parente6983ed525b56b4a4a4acfd4e3b77a5efc8c0047 (diff)
downloadffmpeg-865cd3c0560a965fe096524ed2d8d2962057e6ac.tar.gz
avfilter: add XPSNR filter
Add XPSNR video filter Register new filter xpsnr. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/xpsnr.h')
-rw-r--r--libavfilter/xpsnr.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/libavfilter/xpsnr.h b/libavfilter/xpsnr.h
new file mode 100644
index 0000000000..eb14e16062
--- /dev/null
+++ b/libavfilter/xpsnr.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2024 Christian R. Helmrich
+ * Copyright (c) 2024 Christian Lehmann
+ * Copyright (c) 2024 Christian Stoffers
+ *
+ * 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
+ */
+
+/**
+ * @file
+ * Public declaration of DSP context structure of XPSNR measurement filter for FFmpeg.
+ *
+ * Authors: Christian Helmrich, Lehmann, and Stoffers, Fraunhofer HHI, Berlin, Germany
+ */
+
+#ifndef AVFILTER_XPSNR_H
+#define AVFILTER_XPSNR_H
+
+#include <stddef.h>
+#include <stdint.h>
+#include "libavutil/x86/cpu.h"
+
+/* public XPSNR DSP structure definition */
+
+typedef struct XPSNRDSPContext {
+ uint64_t (*sse_line) (const uint8_t *buf, const uint8_t *ref, const int w);
+ uint64_t (*highds_func) (const int x_act, const int y_act, const int w_act, const int h_act, const int16_t *o_m0, const int o);
+ uint64_t (*diff1st_func)(const uint32_t w_act, const uint32_t h_act, const int16_t *o_m0, int16_t *o_m1, const int o);
+ uint64_t (*diff2nd_func)(const uint32_t w_act, const uint32_t h_act, const int16_t *o_m0, int16_t *o_m1, int16_t *o_m2, const int o);
+} PSNRDSPContext;
+
+void ff_xpsnr_init_x86(PSNRDSPContext *dsp, const int bpp);
+
+#endif /* AVFILTER_XPSNR_H */