FFmpeg
|
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "drawutils.h"
#include "formats.h"
#include "framesync.h"
#include "internal.h"
#include "psnr.h"
#include "video.h"
Go to the source code of this file.
Data Structures | |
struct | PSNRContext |
Macros | |
#define | OFFSET(x) offsetof(PSNRContext, x) |
#define | FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
#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 (psnr, PSNRContext, fs) | |
static unsigned | pow_2 (unsigned base) |
static double | get_psnr (double mse, uint64_t nb_frames, int max) |
static uint64_t | sse_line_8bit (const uint8_t *main_line, const uint8_t *ref_line, int outw) |
static uint64_t | sse_line_16bit (const uint8_t *_main_line, const uint8_t *_ref_line, int outw) |
static void | compute_images_mse (PSNRContext *s, const uint8_t *main_data[4], const int main_linesizes[4], const uint8_t *ref_data[4], const int ref_linesizes[4], int w, int h, double mse[4]) |
static void | set_meta (AVDictionary **metadata, const char *key, char comp, float d) |
static int | do_psnr (FFFrameSync *fs) |
static av_cold int | init (AVFilterContext *ctx) |
static int | query_formats (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 | psnr_options [] |
static const AVFilterPad | psnr_inputs [] |
static const AVFilterPad | psnr_outputs [] |
AVFilter | ff_vf_psnr |
Caculate the PSNR between two input videos.
Definition in file vf_psnr.c.
#define OFFSET | ( | x | ) | offsetof(PSNRContext, x) |
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
#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 | ( | psnr | , |
PSNRContext | , | ||
fs | |||
) |
|
inlinestatic |
Definition at line 73 of file vf_psnr.c.
Referenced by get_psnr(), sse_line_16bit(), and sse_line_8bit().
|
inlinestatic |
|
static |
Definition at line 83 of file vf_psnr.c.
Referenced by config_input_ref().
|
static |
Definition at line 94 of file vf_psnr.c.
Referenced by config_input_ref().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
AVFilter ff_vf_psnr |