Go to the source code of this file.
|
| FRAMESYNC_DEFINE_CLASS (xpsnr, XPSNRContext, fs) |
|
static uint64_t | highds (const int x_act, const int y_act, const int w_act, const int h_act, const int16_t *o_m0, const int o) |
|
static uint64_t | diff1st (const uint32_t w_act, const uint32_t h_act, const int16_t *o_m0, int16_t *o_m1, const int o) |
|
static uint64_t | diff2nd (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) |
|
static uint64_t | calc_squared_error (XPSNRContext const *s, const int16_t *blk_org, const uint32_t stride_org, const int16_t *blk_rec, const uint32_t stride_rec, const uint32_t block_width, const uint32_t block_height) |
|
static double | calc_squared_error_and_weight (XPSNRContext const *s, const int16_t *pic_org, const uint32_t stride_org, int16_t *pic_org_m1, int16_t *pic_org_m2, const int16_t *pic_rec, const uint32_t stride_rec, const uint32_t offset_x, const uint32_t offset_y, const uint32_t block_width, const uint32_t block_height, const uint32_t bit_depth, const uint32_t int_frame_rate, double *ms_act) |
|
static double | get_avg_xpsnr (const double sqrt_wsse_val, const double sum_xpsnr_val, const uint32_t image_width, const uint32_t image_height, const uint64_t max_error_64, const uint64_t num_frames_64) |
|
static int | get_wsse (AVFilterContext *ctx, int16_t **org, int16_t **org_m1, int16_t **org_m2, int16_t **rec, uint64_t *const wsse64) |
|
static void | set_meta (AVDictionary **metadata, const char *key, char comp, float d) |
|
static int | do_xpsnr (FFFrameSync *fs) |
|
static av_cold int | init (AVFilterContext *ctx) |
|
static int | config_input_ref (AVFilterLink *inlink) |
|
static int | config_output (AVFilterLink *outlink) |
|
static int | activate (AVFilterContext *ctx) |
|
static av_cold void | uninit (AVFilterContext *ctx) |
|
Calculate the extended perceptually weighted PSNR (XPSNR) between two input videos.
Authors: Christian Helmrich, Lehmann, and Stoffers, Fraunhofer HHI, Berlin, Germany
Definition in file vf_xpsnr.c.
◆ FLAGS
◆ OFFSET
◆ XPSNR_GAMMA
◆ PF_NOALPHA
#define PF_NOALPHA |
( |
|
suf | ) |
AV_PIX_FMT_YUV420##suf, AV_PIX_FMT_YUV422##suf, AV_PIX_FMT_YUV444##suf |
◆ PF_ALPHA
#define PF_ALPHA |
( |
|
suf | ) |
AV_PIX_FMT_YUVA420##suf, AV_PIX_FMT_YUVA422##suf, AV_PIX_FMT_YUVA444##suf |
◆ PF
◆ FRAMESYNC_DEFINE_CLASS()
◆ highds()
static uint64_t highds |
( |
const int |
x_act, |
|
|
const int |
y_act, |
|
|
const int |
w_act, |
|
|
const int |
h_act, |
|
|
const int16_t * |
o_m0, |
|
|
const int |
o |
|
) |
| |
|
static |
◆ diff1st()
static uint64_t diff1st |
( |
const uint32_t |
w_act, |
|
|
const uint32_t |
h_act, |
|
|
const int16_t * |
o_m0, |
|
|
int16_t * |
o_m1, |
|
|
const int |
o |
|
) |
| |
|
static |
◆ diff2nd()
static uint64_t diff2nd |
( |
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 |
|
) |
| |
|
static |
◆ calc_squared_error()
static uint64_t calc_squared_error |
( |
XPSNRContext const * |
s, |
|
|
const int16_t * |
blk_org, |
|
|
const uint32_t |
stride_org, |
|
|
const int16_t * |
blk_rec, |
|
|
const uint32_t |
stride_rec, |
|
|
const uint32_t |
block_width, |
|
|
const uint32_t |
block_height |
|
) |
| |
|
inlinestatic |
◆ calc_squared_error_and_weight()
static double calc_squared_error_and_weight |
( |
XPSNRContext const * |
s, |
|
|
const int16_t * |
pic_org, |
|
|
const uint32_t |
stride_org, |
|
|
int16_t * |
pic_org_m1, |
|
|
int16_t * |
pic_org_m2, |
|
|
const int16_t * |
pic_rec, |
|
|
const uint32_t |
stride_rec, |
|
|
const uint32_t |
offset_x, |
|
|
const uint32_t |
offset_y, |
|
|
const uint32_t |
block_width, |
|
|
const uint32_t |
block_height, |
|
|
const uint32_t |
bit_depth, |
|
|
const uint32_t |
int_frame_rate, |
|
|
double * |
ms_act |
|
) |
| |
|
inlinestatic |
◆ get_avg_xpsnr()
static double get_avg_xpsnr |
( |
const double |
sqrt_wsse_val, |
|
|
const double |
sum_xpsnr_val, |
|
|
const uint32_t |
image_width, |
|
|
const uint32_t |
image_height, |
|
|
const uint64_t |
max_error_64, |
|
|
const uint64_t |
num_frames_64 |
|
) |
| |
|
inlinestatic |
◆ get_wsse()
static int get_wsse |
( |
AVFilterContext * |
ctx, |
|
|
int16_t ** |
org, |
|
|
int16_t ** |
org_m1, |
|
|
int16_t ** |
org_m2, |
|
|
int16_t ** |
rec, |
|
|
uint64_t *const |
wsse64 |
|
) |
| |
|
static |
◆ set_meta()
static void set_meta |
( |
AVDictionary ** |
metadata, |
|
|
const char * |
key, |
|
|
char |
comp, |
|
|
float |
d |
|
) |
| |
|
static |
◆ do_xpsnr()
◆ init()
◆ config_input_ref()
◆ config_output()
◆ activate()
◆ uninit()
◆ xpsnr_options
◆ xpsnr_formats
Initial value:= {
#define PF_NOALPHA(suf)
#define PF_ALPHA(suf)
#define PF(suf)
}
Definition at line 546 of file vf_xpsnr.c.
◆ xpsnr_inputs
Initial value:= {
{
.name = "main",
}, {
.name = "reference",
}
}
Definition at line 711 of file vf_xpsnr.c.
◆ xpsnr_outputs
Initial value:= {
{
.name = "default",
}
}
Definition at line 722 of file vf_xpsnr.c.
◆ ff_vf_xpsnr
Initial value:= {
.name = "xpsnr",
.description =
NULL_IF_CONFIG_SMALL(
"Calculate the extended perceptually weighted peak signal-to-noise ratio (XPSNR) between two video streams."),
.preinit = xpsnr_framesync_preinit,
.priv_class = &xpsnr_class,
}
Definition at line 730 of file vf_xpsnr.c.
#define AV_PIX_FMT_GBRAP16
#define FILTER_PIXFMTS_ARRAY(array)
static av_cold int init(AVFilterContext *ctx)
#define FILTER_INPUTS(array)
static av_cold void uninit(AVFilterContext *ctx)
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
static int activate(AVFilterContext *ctx)
#define AV_PIX_FMT_GBRP14
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
#define AV_PIX_FMT_GBRP10
#define AV_PIX_FMT_GRAY16
@ AV_PIX_FMT_YUVJ411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
@ AV_PIX_FMT_YUVJ422P
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
#define AV_PIX_FMT_GBRAP10
#define AV_PIX_FMT_GBRAP12
static int config_output(AVFilterLink *outlink)
#define AV_PIX_FMT_GRAY14
#define FILTER_OUTPUTS(array)
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
#define AV_PIX_FMT_GRAY10
#define AV_PIX_FMT_GBRP16
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
static enum AVPixelFormat xpsnr_formats[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static const AVFilterPad xpsnr_outputs[]
#define AV_PIX_FMT_GBRP12
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
static const AVFilterPad xpsnr_inputs[]
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
static int config_input_ref(AVFilterLink *inlink)
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
#define AV_PIX_FMT_GRAY12