MythTV  master
Classes | Macros | Typedefs | Functions | Variables
filter_yadif.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include "config.h"
#include <inttypes.h>
#include <string.h>
#include <math.h>
#include <pthread.h>
#include "filter.h"
#include "mythframe.h"
#include "../mm_arch.h"
#include "aclib.h"
Include dependency graph for filter_yadif.c:

Go to the source code of this file.

Classes

struct  DeintThread
 
struct  ThisFilter
 

Macros

#define MIN(a, b)   ((a) > (b) ? (b) : (a))
 
#define MAX(a, b)   ((a) < (b) ? (b) : (a))
 
#define ABS(a)   ((a) > 0 ? (a) : (-(a)))
 
#define MIN3(a, b, c)   MIN(MIN(a,b),c)
 
#define MAX3(a, b, c)   MAX(MAX(a,b),c)
 
#define memcpy_pic(d, s, b, h, ds, ss)   memcpy_pic2(d, s, b, h, ds, ss, 0)
 
#define CHECK(j)
 

Typedefs

typedef struct ThisFilter ThisFilter
 

Functions

static void AllocFilter (ThisFilter *filter, int width, int height)
 
static void * memcpy_pic2 (void *dst, const void *src, int bytesPerLine, int height, int dstStride, int srcStride, int limit2width)
 
static void store_ref (struct ThisFilter *p, uint8_t *src, int src_offsets[3], int src_stride[3], int width, int height)
 
static void filter_line_c (struct ThisFilter *p, uint8_t *dst, const uint8_t *prev, const uint8_t *cur, const uint8_t *next, int w, int refs, int parity)
 
 CHECK (1)
 
static int YadifDeint (VideoFilter *f, VideoFrame *frame, int field)
 
static void CleanupYadifDeintFilter (VideoFilter *filter)
 
static void * YadifThread (void *args)
 
static VideoFilterYadifDeintFilter (VideoFrameType inpixfmt, VideoFrameType outpixfmt, const int *width, const int *height, const char *options, int threads)
 

Variables

static void *(* fast_memcpy )(void *to, const void *from, size_t len)
 
static FmtConv FmtList []
 
const FilterInfo filter_table []
 

Macro Definition Documentation

◆ MIN

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

Definition at line 39 of file filter_yadif.c.

◆ MAX

#define MAX (   a,
  b 
)    ((a) < (b) ? (b) : (a))

Definition at line 40 of file filter_yadif.c.

◆ ABS

#define ABS (   a)    ((a) > 0 ? (a) : (-(a)))

Definition at line 41 of file filter_yadif.c.

◆ MIN3

#define MIN3 (   a,
  b,
 
)    MIN(MIN(a,b),c)

Definition at line 43 of file filter_yadif.c.

◆ MAX3

#define MAX3 (   a,
  b,
 
)    MAX(MAX(a,b),c)

Definition at line 44 of file filter_yadif.c.

◆ memcpy_pic

#define memcpy_pic (   d,
  s,
  b,
  h,
  ds,
  ss 
)    memcpy_pic2(d, s, b, h, ds, ss, 0)

Definition at line 148 of file filter_yadif.c.

◆ CHECK

#define CHECK (   j)
Value:
{ score= ABS(cur[-refs-1+(j)] - cur[+refs-1-(j)])\
+ ABS(cur[-refs +(j)] - cur[+refs -(j)])\
+ ABS(cur[-refs+1+(j)] - cur[+refs+1-(j)]);\
if (score < spatial_score){\
spatial_score= score;\
spatial_pred= (cur[-refs +(j)] + cur[+refs -(j)])>>1;\
#define ABS(a)
Definition: filter_yadif.c:41

Typedef Documentation

◆ ThisFilter

typedef struct ThisFilter ThisFilter

Function Documentation

◆ AllocFilter()

static void AllocFilter ( ThisFilter filter,
int  width,
int  height 
)
static

Definition at line 92 of file filter_yadif.c.

Referenced by YadifDeint(), and YadifDeintFilter().

◆ memcpy_pic2()

static void* memcpy_pic2 ( void *  dst,
const void *  src,
int  bytesPerLine,
int  height,
int  dstStride,
int  srcStride,
int  limit2width 
)
inlinestatic

Definition at line 120 of file filter_yadif.c.

◆ store_ref()

static void store_ref ( struct ThisFilter p,
uint8_t *  src,
int  src_offsets[3],
int  src_stride[3],
int  width,
int  height 
)
static

Definition at line 150 of file filter_yadif.c.

Referenced by YadifDeint().

◆ filter_line_c()

static void filter_line_c ( struct ThisFilter p,
uint8_t *  dst,
const uint8_t *  prev,
const uint8_t *  cur,
const uint8_t *  next,
int  w,
int  refs,
int  parity 
)
static

Definition at line 392 of file filter_yadif.c.

Referenced by YadifDeintFilter().

◆ CHECK()

CHECK ( )

Definition at line 423 of file filter_yadif.c.

◆ YadifDeint()

static int YadifDeint ( VideoFilter f,
VideoFrame frame,
int  field 
)
static

Definition at line 496 of file filter_yadif.c.

Referenced by YadifDeintFilter().

◆ CleanupYadifDeintFilter()

static void CleanupYadifDeintFilter ( VideoFilter filter)
static

Definition at line 539 of file filter_yadif.c.

Referenced by YadifDeintFilter().

◆ YadifThread()

static void* YadifThread ( void *  args)
static

Definition at line 561 of file filter_yadif.c.

Referenced by YadifDeintFilter().

◆ YadifDeintFilter()

static VideoFilter* YadifDeintFilter ( VideoFrameType  inpixfmt,
VideoFrameType  outpixfmt,
const int *  width,
const int *  height,
const char *  options,
int  threads 
)
static

Definition at line 593 of file filter_yadif.c.

Variable Documentation

◆ fast_memcpy

void*(* fast_memcpy) (void *to, const void *from, size_t len)
static

Definition at line 53 of file filter_yadif.c.

Referenced by CHECK(), memcpy_pic2(), and YadifDeintFilter().

◆ FmtList

FmtConv FmtList[]
static
Initial value:
=
{
}
#define FMT_NULL
Definition: filter.h:20

Definition at line 715 of file filter_yadif.c.

◆ filter_table

const FilterInfo filter_table[]
Initial value:
=
{
{
.filter_init= &YadifDeintFilter,
.name= (char*)"yadifdeint",
.descript= (char*)
"combines data from several fields to "
"deinterlace with less motion blur",
.formats= FmtList,
.libname= NULL
},
{
.filter_init= &YadifDeintFilter,
.name= (char*)"yadifdoubleprocessdeint",
.descript= (char*)
"combines data from several fields to "
"deinterlace with less motion blur",
.formats= FmtList,
.libname= NULL
},
}
#define NULL
Definition: H264Parser.h:62
static VideoFilter * YadifDeintFilter(VideoFrameType inpixfmt, VideoFrameType outpixfmt, const int *width, const int *height, const char *options, int threads)
Definition: filter_yadif.c:593
static FmtConv FmtList[]
Definition: filter_yadif.c:715
#define FILT_NULL
Definition: filter.h:47

Definition at line 721 of file filter_yadif.c.