MythTV  master
Classes | Macros | Typedefs | Functions | Variables
filter_quickdnr.c File Reference
#include <stdio.h>
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include "filter.h"
#include "mythframe.h"
#include "libavutil/mem.h"
#include "libavutil/cpu.h"
#include "ffmpeg-mmx.h"
Include dependency graph for filter_quickdnr.c:

Go to the source code of this file.

Classes

struct  ThisFilter
 

Macros

#define LUMA_THRESHOLD_DEFAULT   15
 
#define CHROMA_THRESHOLD_DEFAULT   25
 
#define LUMA_THRESHOLD1_DEFAULT   10
 
#define LUMA_THRESHOLD2_DEFAULT   1
 
#define CHROMA_THRESHOLD1_DEFAULT   20
 
#define CHROMA_THRESHOLD2_DEFAULT   2
 

Typedefs

typedef struct ThisFilter ThisFilter
 

Functions

static int alloc_avg (ThisFilter *filter, int size)
 
static int init_avg (ThisFilter *filter, VideoFrame *frame)
 
static void init_vars (ThisFilter *tf, VideoFrame *frame, int *thr1, int *thr2, int *height, uint8_t **avg, uint8_t **buf)
 
static int quickdnr (VideoFilter *f, VideoFrame *frame, int field)
 
static int quickdnr2 (VideoFilter *f, VideoFrame *frame, int field)
 
static int quickdnrMMX (VideoFilter *f, VideoFrame *frame, int field)
 
static int quickdnr2MMX (VideoFilter *f, VideoFrame *frame, int field)
 
static void cleanup (VideoFilter *vf)
 
static VideoFilternew_filter (VideoFrameType inpixfmt, VideoFrameType outpixfmt, const int *width, const int *height, const char *options, int threads)
 

Variables

static FmtConv FmtList []
 
const FilterInfo filter_table []
 

Macro Definition Documentation

◆ LUMA_THRESHOLD_DEFAULT

#define LUMA_THRESHOLD_DEFAULT   15

Definition at line 33 of file filter_quickdnr.c.

◆ CHROMA_THRESHOLD_DEFAULT

#define CHROMA_THRESHOLD_DEFAULT   25

Definition at line 34 of file filter_quickdnr.c.

◆ LUMA_THRESHOLD1_DEFAULT

#define LUMA_THRESHOLD1_DEFAULT   10

Definition at line 37 of file filter_quickdnr.c.

◆ LUMA_THRESHOLD2_DEFAULT

#define LUMA_THRESHOLD2_DEFAULT   1

Definition at line 38 of file filter_quickdnr.c.

◆ CHROMA_THRESHOLD1_DEFAULT

#define CHROMA_THRESHOLD1_DEFAULT   20

Definition at line 39 of file filter_quickdnr.c.

◆ CHROMA_THRESHOLD2_DEFAULT

#define CHROMA_THRESHOLD2_DEFAULT   2

Definition at line 40 of file filter_quickdnr.c.

Typedef Documentation

◆ ThisFilter

typedef struct ThisFilter ThisFilter

Function Documentation

◆ alloc_avg()

static int alloc_avg ( ThisFilter filter,
int  size 
)
static

Definition at line 67 of file filter_quickdnr.c.

Referenced by init_avg().

◆ init_avg()

static int init_avg ( ThisFilter filter,
VideoFrame frame 
)
static

Definition at line 85 of file filter_quickdnr.c.

Referenced by quickdnr(), quickdnr2(), quickdnr2MMX(), and quickdnrMMX().

◆ init_vars()

static void init_vars ( ThisFilter tf,
VideoFrame frame,
int *  thr1,
int *  thr2,
int *  height,
uint8_t **  avg,
uint8_t **  buf 
)
static

Definition at line 105 of file filter_quickdnr.c.

Referenced by quickdnr(), quickdnr2(), quickdnr2MMX(), and quickdnrMMX().

◆ quickdnr()

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

Definition at line 130 of file filter_quickdnr.c.

Referenced by new_filter().

◆ quickdnr2()

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

Definition at line 163 of file filter_quickdnr.c.

Referenced by new_filter().

◆ quickdnrMMX()

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

Definition at line 205 of file filter_quickdnr.c.

Referenced by new_filter().

◆ quickdnr2MMX()

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

Definition at line 309 of file filter_quickdnr.c.

Referenced by new_filter().

◆ cleanup()

static void cleanup ( VideoFilter vf)
static

Definition at line 437 of file filter_quickdnr.c.

Referenced by new_filter().

◆ new_filter()

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

Definition at line 445 of file filter_quickdnr.c.

Variable Documentation

◆ FmtList

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

Definition at line 575 of file filter_quickdnr.c.

◆ filter_table

const FilterInfo filter_table[]
Initial value:
=
{
{
.filter_init= &new_filter,
.name= (char*)"quickdnr",
.descript= (char*)
"removes noise with a fast single/double thresholded average filter",
.formats= FmtList,
.libname= NULL
},
}
#define NULL
Definition: H264Parser.h:62
static VideoFilter * new_filter(VideoFrameType inpixfmt, VideoFrameType outpixfmt, const int *width, const int *height, const char *options, int threads)
static FmtConv FmtList[]
#define FILT_NULL
Definition: filter.h:47

Definition at line 581 of file filter_quickdnr.c.