FFmpeg
|
#include "libavutil/avstring.h"
#include "libavutil/file_open.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "drawutils.h"
#include "filters.h"
#include "framesync.h"
#include "psnr.h"
#include "xpsnr.h"
Go to the source code of this file.
Data Structures | |
struct | XPSNRContext |
Macros | |
#define | FLAGS AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM |
#define | OFFSET(x) offsetof(XPSNRContext, x) |
#define | XPSNR_GAMMA 2 |
#define | PF_NOALPHA(suf) AV_PIX_FMT_YUV420##suf, AV_PIX_FMT_YUV422##suf, AV_PIX_FMT_YUV444##suf |
#define | PF_ALPHA(suf) AV_PIX_FMT_YUVA420##suf, AV_PIX_FMT_YUVA422##suf, AV_PIX_FMT_YUVA444##suf |
#define | PF(suf) PF_NOALPHA(suf), PF_ALPHA(suf) |
Functions | |
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) |
Variables | |
static const AVOption | xpsnr_options [] |
static enum AVPixelFormat | xpsnr_formats [] |
static const AVFilterPad | xpsnr_inputs [] |
static const AVFilterPad | xpsnr_outputs [] |
const FFFilter | ff_vf_xpsnr |
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.
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM |
Definition at line 78 of file vf_xpsnr.c.
#define OFFSET | ( | x | ) | offsetof(XPSNRContext, x) |
Definition at line 79 of file vf_xpsnr.c.
#define XPSNR_GAMMA 2 |
Definition at line 80 of file vf_xpsnr.c.
#define PF_NOALPHA | ( | suf | ) | AV_PIX_FMT_YUV420##suf, AV_PIX_FMT_YUV422##suf, AV_PIX_FMT_YUV444##suf |
#define PF_ALPHA | ( | suf | ) | AV_PIX_FMT_YUVA420##suf, AV_PIX_FMT_YUVA422##suf, AV_PIX_FMT_YUVA444##suf |
#define PF | ( | suf | ) | PF_NOALPHA(suf), PF_ALPHA(suf) |
FRAMESYNC_DEFINE_CLASS | ( | xpsnr | , |
XPSNRContext | , | ||
fs | |||
) |
|
static |
Definition at line 92 of file vf_xpsnr.c.
Referenced by calc_squared_error_and_weight(), and config_input_ref().
|
static |
Definition at line 112 of file vf_xpsnr.c.
Referenced by config_input_ref().
|
static |
Definition at line 128 of file vf_xpsnr.c.
Referenced by config_input_ref().
|
inlinestatic |
Definition at line 147 of file vf_xpsnr.c.
Referenced by calc_squared_error_and_weight(), and get_wsse().
|
inlinestatic |
Definition at line 164 of file vf_xpsnr.c.
Referenced by get_wsse().
|
inlinestatic |
Definition at line 252 of file vf_xpsnr.c.
Referenced by do_xpsnr(), and uninit().
|
static |
Definition at line 269 of file vf_xpsnr.c.
Referenced by do_xpsnr().
|
static |
Definition at line 383 of file vf_xpsnr.c.
Referenced by do_xpsnr().
|
static |
Definition at line 396 of file vf_xpsnr.c.
Referenced by init().
|
static |
Definition at line 496 of file vf_xpsnr.c.
|
static |
Definition at line 549 of file vf_xpsnr.c.
|
static |
Definition at line 598 of file vf_xpsnr.c.
|
static |
Definition at line 630 of file vf_xpsnr.c.
|
static |
Definition at line 637 of file vf_xpsnr.c.
|
static |
Definition at line 82 of file vf_xpsnr.c.
|
static |
Definition at line 534 of file vf_xpsnr.c.
|
static |
Definition at line 695 of file vf_xpsnr.c.
|
static |
Definition at line 706 of file vf_xpsnr.c.
const FFFilter ff_vf_xpsnr |
Definition at line 714 of file vf_xpsnr.c.