xine-lib 1.2.13-20230125hg15249
Data Structures | Macros | Typedefs | Functions
denoise3d.c File Reference
#include "planar.h"
#include <xine/xine_internal.h>
#include <xine/post.h>
#include <xine/xineutils.h>
#include <math.h>
#include <pthread.h>

Data Structures

struct  denoise3d_parameters_s
 

Macros

#define PARAM1_DEFAULT   4.0
 
#define PARAM2_DEFAULT   3.0
 
#define PARAM3_DEFAULT   6.0
 
#define MAX_LINE_WIDTH   2048
 
#define ABS(A)   ( (A) > 0 ? (A) : -(A) )
 
#define LowPass(Prev, Curr, Coef)   (((Prev)*Coef[Prev - Curr] + (Curr)*(65536-(Coef[Prev - Curr]))) / 65536)
 

Typedefs

typedef struct post_plugin_denoise3d_s post_plugin_denoise3d_t
 
typedef struct denoise3d_parameters_s denoise3d_parameters_t
 

Functions

 PARAM_ITEM (PARAM_ITEM(POST_PARAM_TYPE_DOUBLE, luma, PARAM_ITEM(NULL, PARAM_ITEM(0, PARAM_ITEM(10, PARAM_ITEM(0, "spatial luma strength")
 
static void ATTR_NO_FAST_VECTOR_MATH PrecalcCoefs (int *Ct, double Dist25)
 
static int set_parameters (xine_post_t *this_gen, const void *param_gen)
 
static int get_parameters (xine_post_t *this_gen, void *param_gen)
 
static xine_post_api_descr_tget_param_descr (void)
 
static char * get_help (void)
 
static void denoise3d_dispose (post_plugin_t *this_gen)
 
static void denoise3d_close (xine_video_port_t *port_gen, xine_stream_t *stream)
 
static int denoise3d_intercept_frame (post_video_port_t *port, vo_frame_t *frame)
 
static void deNoise (unsigned char *Frame, unsigned char *FramePrev, unsigned char *FrameDest, unsigned char *LineAnt, int W, int H, int sStride, int pStride, int dStride, int *Horizontal, int *Vertical, int *Temporal)
 
static int denoise3d_draw (vo_frame_t *frame, xine_stream_t *stream)
 
static post_plugin_tdenoise3d_open_plugin (post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target)
 
void * denoise3d_init_plugin (xine_t *xine, const void *data)
 

Macro Definition Documentation

◆ ABS

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

Referenced by PrecalcCoefs().

◆ LowPass

#define LowPass ( Prev,
Curr,
Coef )   (((Prev)*Coef[Prev - Curr] + (Curr)*(65536-(Coef[Prev - Curr]))) / 65536)

Referenced by deNoise().

◆ MAX_LINE_WIDTH

#define MAX_LINE_WIDTH   2048

Referenced by PARAM_ITEM().

◆ PARAM1_DEFAULT

#define PARAM1_DEFAULT   4.0

Referenced by denoise3d_open_plugin().

◆ PARAM2_DEFAULT

#define PARAM2_DEFAULT   3.0

Referenced by denoise3d_open_plugin().

◆ PARAM3_DEFAULT

#define PARAM3_DEFAULT   6.0

Referenced by denoise3d_open_plugin().

Typedef Documentation

◆ denoise3d_parameters_t

◆ post_plugin_denoise3d_t

typedef struct post_plugin_denoise3d_s post_plugin_denoise3d_t

Function Documentation

◆ deNoise()

static void deNoise ( unsigned char * Frame,
unsigned char * FramePrev,
unsigned char * FrameDest,
unsigned char * LineAnt,
int W,
int H,
int sStride,
int pStride,
int dStride,
int * Horizontal,
int * Vertical,
int * Temporal )
static

References LowPass.

Referenced by denoise3d_draw().

◆ denoise3d_close()

static void denoise3d_close ( xine_video_port_t * port_gen,
xine_stream_t * stream )
static

◆ denoise3d_dispose()

static void denoise3d_dispose ( post_plugin_t * this_gen)
static

References _x_post_dispose().

Referenced by denoise3d_open_plugin().

◆ denoise3d_draw()

static int denoise3d_draw ( vo_frame_t * frame,
xine_stream_t * stream )
static

◆ denoise3d_init_plugin()

void * denoise3d_init_plugin ( xine_t * xine,
const void * data )

◆ denoise3d_intercept_frame()

static int denoise3d_intercept_frame ( post_video_port_t * port,
vo_frame_t * frame )
static

◆ denoise3d_open_plugin()

static post_plugin_t * denoise3d_open_plugin ( post_class_t * class_gen,
int inputs,
xine_audio_port_t ** audio_target,
xine_video_port_t ** video_target )
static

◆ get_help()

static char * get_help ( void )
static

References _.

Referenced by denoise3d_open_plugin().

◆ get_param_descr()

static xine_post_api_descr_t * get_param_descr ( void )
static

Referenced by denoise3d_open_plugin().

◆ get_parameters()

static int get_parameters ( xine_post_t * this_gen,
void * param_gen )
static

Referenced by denoise3d_open_plugin().

◆ PARAM_ITEM()

PARAM_ITEM ( PARAM_ITEM( POST_PARAM_TYPE_DOUBLE,
luma ,
PARAM_ITEM( NULL,
PARAM_ITEM( 0,
PARAM_ITEM( 10,
PARAM_ITEM( 0,
"spatial luma strength"  )

References MAX_LINE_WIDTH.

◆ PrecalcCoefs()

static void ATTR_NO_FAST_VECTOR_MATH PrecalcCoefs ( int * Ct,
double Dist25 )
static

References ABS.

Referenced by set_parameters().

◆ set_parameters()

static int set_parameters ( xine_post_t * this_gen,
const void * param_gen )
static

References PrecalcCoefs().

Referenced by denoise3d_open_plugin().