#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include "config.h"
#include "mp_msg.h"
#include "cpudetect.h"
#include "img_format.h"
#include "mp_image.h"
#include "vd.h"
#include "vf.h"
#include "cmmx.h"
#include "libvo/fastmemcpy.h"
Go to the source code of this file.
Data Structures | |
struct | metrics |
struct | frame_stats |
struct | vf_priv_s |
Stores persistant variables. More... | |
Defines | |
#define | NUM_STORED 4 |
#define | PPZ { 2000, 2000, 0, 2000 } |
#define | PPR { 2000, 2000, 0, 2000 } |
#define | MIN(a, b) (((a)<(b))?(a):(b)) |
#define | MAX(a, b) (((a)>(b))?(a):(b)) |
#define | PDIFFUB(X, Y, T) |
#define | PDIFFUBT(X, Y, T) |
#define | PSUMBW(X, T, Z) |
#define | PSADBW(X, Y, T, Z) PDIFFUBT(X,Y,T) PSUMBW(Y,T,Z) |
#define | PMAXUB(X, Y) "psubusb " #X "," #Y "\n\tpaddusb " #X "," #Y "\n\t" |
#define | PMAXUW(X, Y) "psubusw " #X "," #Y "\n\tpaddusw " #X "," #Y "\n\t" |
#define | PMINUBT(X, Y, T) |
#define | PAVGB(X, Y) "pavgusb " #X "," #Y "\n\t" |
#define | MEQ(X, Y) ((X).even == (Y).even && (X).odd == (Y).odd && (X).temp == (Y).temp && (X).noise == (Y).noise) |
#define | BLOCK_METRICS_TEMPLATE() |
#define | PSUMBW(X, T, Z) "psadbw " #Z "," #X "\n\t" |
#define | PSADBW(X, Y, T, Z) "psadbw " #X "," #Y "\n\t" |
#define | PMAXUB(X, Y) "pmaxub " #X "," #Y "\n\t" |
#define | PMINUBT(X, Y, T) "pminub " #X "," #Y "\n\t" |
#define | PAVGB(X, Y) "pavgb " #X "," #Y "\n\t" |
#define | METRICS(X) (X).even, (X).odd, (X).noise, (X).temp |
#define | ITOC(X) (!(X) ? ' ' : (X) + ((X)>9 ? 'a'-10 : '0')) |
Enumerations | |
enum | pu_field_type_t { PU_1ST_OF_3, PU_2ND_OF_3, PU_3RD_OF_3, PU_1ST_OF_2, PU_2ND_OF_2, PU_INTERLACED } |
Functions | |
static void | get_metrics_c (unsigned char *a, unsigned char *b, int as, int bs, int lines, struct metrics *m) |
static void | get_metrics_fast_c (unsigned char *a, unsigned char *b, int as, int bs, int lines, struct metrics *m) |
static void | get_metrics_faster_c (unsigned char *a, unsigned char *b, int as, int bs, int lines, struct metrics *m) |
static void | get_block_stats (struct metrics *m, struct vf_priv_s *p, struct frame_stats *s) |
static struct metrics | block_metrics_c (unsigned char *a, unsigned char *b, int as, int bs, int lines, struct vf_priv_s *p, struct frame_stats *s) |
static struct metrics | block_metrics_fast_c (unsigned char *a, unsigned char *b, int as, int bs, int lines, struct vf_priv_s *p, struct frame_stats *s) |
static struct metrics | block_metrics_faster_c (unsigned char *a, unsigned char *b, int as, int bs, int lines, struct vf_priv_s *p, struct frame_stats *s) |
static struct metrics | block_metrics_3dnow (unsigned char *a, unsigned char *b, int as, int bs, int lines, struct vf_priv_s *p, struct frame_stats *s) |
static struct metrics | block_metrics_mmx2 (unsigned char *a, unsigned char *b, int as, int bs, int lines, struct vf_priv_s *p, struct frame_stats *s) |
static int | dint_copy_line_mmx2 (unsigned char *dst, unsigned char *a, long bos, long cos, int ds, int ss, int w, int t) |
static int | dint_copy_line (unsigned char *dst, unsigned char *a, long bos, long cos, int ds, int ss, int w, int t) |
static int | dint_copy_plane (unsigned char *d, unsigned char *a, unsigned char *b, unsigned char *c, unsigned long w, unsigned long h, unsigned long ds, unsigned long ss, unsigned long threshold, long field, long mmx2) |
static void | copy_merge_fields (struct vf_priv_s *p, mp_image_t *dmpi, unsigned char **old, unsigned char **new, unsigned long show) |
static void | diff_planes (struct vf_priv_s *p, struct frame_stats *s, unsigned char *of, unsigned char *nf, int w, int h, int os, int ns, int swapped) |
static void | diff_fields (struct vf_priv_s *p, struct frame_stats *s, unsigned char **old, unsigned char **new) |
static const char * | parse_args (struct vf_priv_s *p, const char *args) |
static unsigned long | gcd (unsigned long x, unsigned long y) |
static void | init (struct vf_priv_s *p, mp_image_t *mpi) |
static double | get_time (void) |
static void | get_image (struct vf_instance *vf, mp_image_t *mpi) |
static long | cmpe (unsigned long x, unsigned long y, unsigned long err, unsigned long e) |
static unsigned long | find_breaks (struct vf_priv_s *p, struct frame_stats *s) |
static int | put_image (struct vf_instance *vf, mp_image_t *mpi, double pts) |
static int | query_format (struct vf_instance *vf, unsigned int fmt) |
static int | config (struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) |
static void | uninit (struct vf_instance *vf) |
static int | vf_open (vf_instance_t *vf, char *args) |
Variables | |
static struct frame_stats | ppzs = {PPZ,PPZ,PPZ,PPZ,PPZ,PPZ,PPZ,0,0,9999} |
static struct frame_stats | pprs = {PPR,PPR,PPR,PPR,PPR,PPR,PPR,0,0,9999} |
const vf_info_t | vf_info_filmdint |
#define BLOCK_METRICS_TEMPLATE | ( | ) |
Definition at line 386 of file vf_filmdint.c.
Referenced by block_metrics_3dnow(), and block_metrics_mmx2().
#define ITOC | ( | X | ) | (!(X) ? ' ' : (X) + ((X)>9 ? 'a'-10 : '0')) |
#define MAX | ( | a, | |||
b | ) | (((a)>(b))?(a):(b)) |
Definition at line 105 of file vf_filmdint.c.
#define METRICS | ( | X | ) | (X).even, (X).odd, (X).noise, (X).temp |
#define MIN | ( | a, | |||
b | ) | (((a)<(b))?(a):(b)) |
Definition at line 102 of file vf_filmdint.c.
#define NUM_STORED 4 |
#define PAVGB | ( | X, | |||
Y | ) | "pavgb " #X "," #Y "\n\t" |
Definition at line 474 of file vf_filmdint.c.
#define PAVGB | ( | X, | |||
Y | ) | "pavgusb " #X "," #Y "\n\t" |
Definition at line 474 of file vf_filmdint.c.
#define PDIFFUB | ( | X, | |||
Y, | |||||
T | ) |
#define PDIFFUBT | ( | X, | |||
Y, | |||||
T | ) |
Value:
"movq " #X "," #T "\n\t" \ "psubusb " #Y "," #T "\n\t" \ "psubusb " #X "," #Y "\n\t" \ "paddusb " #T "," #Y "\n\t"
Definition at line 113 of file vf_filmdint.c.
Referenced by dint_copy_line_mmx2().
#define PMAXUB | ( | X, | |||
Y | ) | "pmaxub " #X "," #Y "\n\t" |
Definition at line 472 of file vf_filmdint.c.
#define PMAXUB | ( | X, | |||
Y | ) | "psubusb " #X "," #Y "\n\tpaddusb " #X "," #Y "\n\t" |
Definition at line 472 of file vf_filmdint.c.
Referenced by do_a_deblock_TMPL(), doVertDefFilter_TMPL(), and vertClassify_TMPL().
#define PMAXUW | ( | X, | |||
Y | ) | "psubusw " #X "," #Y "\n\tpaddusw " #X "," #Y "\n\t" |
Definition at line 473 of file vf_filmdint.c.
#define PMINUBT | ( | X, | |||
Y, | |||||
T | ) |
#define PPR { 2000, 2000, 0, 2000 } |
Definition at line 97 of file vf_filmdint.c.
#define PPZ { 2000, 2000, 0, 2000 } |
Definition at line 96 of file vf_filmdint.c.
Definition at line 471 of file vf_filmdint.c.
Definition at line 471 of file vf_filmdint.c.
Definition at line 470 of file vf_filmdint.c.
#define PSUMBW | ( | X, | |||
T, | |||||
Z | ) |
Value:
"movq " #X "," #T "\n\t" \ "punpcklbw " #Z "," #X "\n\t" \ "punpckhbw " #Z "," #T "\n\t" \ "paddw " #T "," #X "\n\t" \ "movq " #X "," #T "\n\t" \ "psllq $32, " #T "\n\t" \ "paddw " #T "," #X "\n\t" \ "movq " #X "," #T "\n\t" \ "psllq $16, " #T "\n\t" \ "paddw " #T "," #X "\n\t" \ "psrlq $48, " #X "\n\t"
Definition at line 470 of file vf_filmdint.c.
enum pu_field_type_t |
Definition at line 38 of file vf_filmdint.c.
static struct metrics block_metrics_3dnow | ( | unsigned char * | a, | |
unsigned char * | b, | |||
int | as, | |||
int | bs, | |||
int | lines, | |||
struct vf_priv_s * | p, | |||
struct frame_stats * | s | |||
) | [static, read] |
static struct metrics block_metrics_c | ( | unsigned char * | a, | |
unsigned char * | b, | |||
int | as, | |||
int | bs, | |||
int | lines, | |||
struct vf_priv_s * | p, | |||
struct frame_stats * | s | |||
) | [static, read] |
Definition at line 346 of file vf_filmdint.c.
Referenced by block_metrics_mmx2(), and diff_planes().
static struct metrics block_metrics_fast_c | ( | unsigned char * | a, | |
unsigned char * | b, | |||
int | as, | |||
int | bs, | |||
int | lines, | |||
struct vf_priv_s * | p, | |||
struct frame_stats * | s | |||
) | [static, read] |
static struct metrics block_metrics_faster_c | ( | unsigned char * | a, | |
unsigned char * | b, | |||
int | as, | |||
int | bs, | |||
int | lines, | |||
struct vf_priv_s * | p, | |||
struct frame_stats * | s | |||
) | [static, read] |
static struct metrics block_metrics_mmx2 | ( | unsigned char * | a, | |
unsigned char * | b, | |||
int | as, | |||
int | bs, | |||
int | lines, | |||
struct vf_priv_s * | p, | |||
struct frame_stats * | s | |||
) | [static, read] |
static long cmpe | ( | unsigned long | x, | |
unsigned long | y, | |||
unsigned long | err, | |||
unsigned long | e | |||
) | [inline, static] |
static int config | ( | struct vf_instance * | vf, | |
int | width, | |||
int | height, | |||
int | d_width, | |||
int | d_height, | |||
unsigned int | flags, | |||
unsigned int | outfmt | |||
) | [static] |
Definition at line 1352 of file vf_filmdint.c.
static void copy_merge_fields | ( | struct vf_priv_s * | p, | |
mp_image_t * | dmpi, | |||
unsigned char ** | old, | |||
unsigned char ** | new, | |||
unsigned long | show | |||
) | [static] |
static void diff_fields | ( | struct vf_priv_s * | p, | |
struct frame_stats * | s, | |||
unsigned char ** | old, | |||
unsigned char ** | new | |||
) | [static] |
Definition at line 819 of file vf_filmdint.c.
static void diff_planes | ( | struct vf_priv_s * | p, | |
struct frame_stats * | s, | |||
unsigned char * | of, | |||
unsigned char * | nf, | |||
int | w, | |||
int | h, | |||
int | os, | |||
int | ns, | |||
int | swapped | |||
) | [static] |
Definition at line 776 of file vf_filmdint.c.
static int dint_copy_line | ( | unsigned char * | dst, | |
unsigned char * | a, | |||
long | bos, | |||
long | cos, | |||
int | ds, | |||
int | ss, | |||
int | w, | |||
int | t | |||
) | [inline, static] |
static int dint_copy_line_mmx2 | ( | unsigned char * | dst, | |
unsigned char * | a, | |||
long | bos, | |||
long | cos, | |||
int | ds, | |||
int | ss, | |||
int | w, | |||
int | t | |||
) | [inline, static] |
static int dint_copy_plane | ( | unsigned char * | d, | |
unsigned char * | a, | |||
unsigned char * | b, | |||
unsigned char * | c, | |||
unsigned long | w, | |||
unsigned long | h, | |||
unsigned long | ds, | |||
unsigned long | ss, | |||
unsigned long | threshold, | |||
long | field, | |||
long | mmx2 | |||
) | [static] |
static unsigned long find_breaks | ( | struct vf_priv_s * | p, | |
struct frame_stats * | s | |||
) | [static] |
static unsigned long gcd | ( | unsigned long | x, | |
unsigned long | y | |||
) | [static] |
Definition at line 858 of file vf_filmdint.c.
Referenced by av_reduce(), ff_parse_specific_params(), h263_decode_picture_header(), and init().
static void get_block_stats | ( | struct metrics * | m, | |
struct vf_priv_s * | p, | |||
struct frame_stats * | s | |||
) | [inline, static] |
Definition at line 268 of file vf_filmdint.c.
Referenced by block_metrics_3dnow(), block_metrics_c(), block_metrics_fast_c(), and block_metrics_faster_c().
static void get_image | ( | struct vf_instance * | vf, | |
mp_image_t * | mpi | |||
) | [static] |
Definition at line 935 of file vf_filmdint.c.
static void get_metrics_c | ( | unsigned char * | a, | |
unsigned char * | b, | |||
int | as, | |||
int | bs, | |||
int | lines, | |||
struct metrics * | m | |||
) | [inline, static] |
static void get_metrics_fast_c | ( | unsigned char * | a, | |
unsigned char * | b, | |||
int | as, | |||
int | bs, | |||
int | lines, | |||
struct metrics * | m | |||
) | [inline, static] |
static void get_metrics_faster_c | ( | unsigned char * | a, | |
unsigned char * | b, | |||
int | as, | |||
int | bs, | |||
int | lines, | |||
struct metrics * | m | |||
) | [inline, static] |
static double get_time | ( | void | ) | [inline, static] |
static void init | ( | struct vf_priv_s * | p, | |
mp_image_t * | mpi | |||
) | [static] |
Definition at line 872 of file vf_filmdint.c.
static const char* parse_args | ( | struct vf_priv_s * | p, | |
const char * | args | |||
) | [static] |
Definition at line 839 of file vf_filmdint.c.
static int put_image | ( | struct vf_instance * | vf, | |
mp_image_t * | mpi, | |||
double | pts | |||
) | [static] |
Definition at line 1139 of file vf_filmdint.c.
static int query_format | ( | struct vf_instance * | vf, | |
unsigned int | fmt | |||
) | [static] |
Definition at line 1337 of file vf_filmdint.c.
static void uninit | ( | struct vf_instance * | vf | ) | [static] |
Definition at line 1397 of file vf_filmdint.c.
static int vf_open | ( | vf_instance_t * | vf, | |
char * | args | |||
) | [static] |
Definition at line 1407 of file vf_filmdint.c.
struct frame_stats pprs = {PPR,PPR,PPR,PPR,PPR,PPR,PPR,0,0,9999} [static] |
Definition at line 99 of file vf_filmdint.c.
struct frame_stats ppzs = {PPZ,PPZ,PPZ,PPZ,PPZ,PPZ,PPZ,0,0,9999} [static] |
Definition at line 98 of file vf_filmdint.c.
const vf_info_t vf_info_filmdint |
Initial value:
Definition at line 1454 of file vf_filmdint.c.