FFmpeg
Macros | Functions | Variables
tiny_psnr.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <math.h>
#include <float.h>
#include <limits.h>
#include "libavutil/intfloat.h"
#include "libavutil/intreadwrite.h"

Go to the source code of this file.

Macros

#define FFMIN(a, b)   ((a) > (b) ? (b) : (a))
 
#define F   100
 
#define SIZE   2048
 

Functions

static int64_t log16 (uint64_t a)
 
static uint64_t int_sqrt (uint64_t a)
 
static int16_t get_s16l (uint8_t *p)
 
static float get_f32l (uint8_t *p)
 
static double get_f64l (uint8_t *p)
 
static int run_psnr (FILE *f[2], int len, int shift, int skip_bytes)
 
int main (int argc, char *argv[])
 

Variables

uint64_t exp16_table [21]
 

Macro Definition Documentation

◆ FFMIN

#define FFMIN (   a,
  b 
)    ((a) > (b) ? (b) : (a))

Definition at line 32 of file tiny_psnr.c.

◆ F

#define F   100

Definition at line 33 of file tiny_psnr.c.

◆ SIZE

#define SIZE   2048

Definition at line 34 of file tiny_psnr.c.

Function Documentation

◆ log16()

static int64_t log16 ( uint64_t  a)
static

Definition at line 76 of file tiny_psnr.c.

Referenced by run_psnr().

◆ int_sqrt()

static uint64_t int_sqrt ( uint64_t  a)
static

Definition at line 95 of file tiny_psnr.c.

Referenced by run_psnr().

◆ get_s16l()

static int16_t get_s16l ( uint8_t *  p)
static

Definition at line 111 of file tiny_psnr.c.

Referenced by run_psnr().

◆ get_f32l()

static float get_f32l ( uint8_t *  p)
static

Definition at line 121 of file tiny_psnr.c.

Referenced by run_psnr().

◆ get_f64l()

static double get_f64l ( uint8_t *  p)
static

Definition at line 128 of file tiny_psnr.c.

Referenced by run_psnr().

◆ run_psnr()

static int run_psnr ( FILE *  f[2],
int  len,
int  shift,
int  skip_bytes 
)
static

Definition at line 133 of file tiny_psnr.c.

Referenced by main().

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 265 of file tiny_psnr.c.

Variable Documentation

◆ exp16_table

uint64_t exp16_table[21]
Initial value:
= {
65537,
65538,
65540,
65544,
65552,
65568,
65600,
65664,
65793,
66050,
66568,
67616,
69763,
74262,
84150,
108051,
178145,
484249,
3578144,
195360063,
582360139072LL,
}

Definition at line 36 of file tiny_psnr.c.

Referenced by log16().