xine-lib: xine-lib-1.2.13/src/post/planar/denoise3d.c File Reference

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_t * | get_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_t * | denoise3d_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

typedef struct denoise3d_parameters_s 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

References _x_post_dec_usage, xine_video_port_s::close, NULL, post_video_port_s::original_port, post_video_port_s::post, and post_video_port_s::stream.

Referenced by denoise3d_open_plugin().

## ◆ 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

References _x_post_frame_copy_down(), _x_post_frame_copy_up(), vo_frame_s::bad_frame, vo_frame_s::base, deNoise(), vo_frame_s::draw, vo_frame_s::flags, vo_frame_s::format, vo_frame_s::free, xine_video_port_s::get_frame, vo_frame_s::height, vo_frame_s::lock, vo_frame_s::next, post_video_port_s::original_port, vo_frame_s::pitches, vo_frame_s::port, post_video_port_s::post, vo_frame_s::ratio, post_video_port_s::stream, VO_BOTH_FIELDS, vo_frame_s::width, XINE_IMGFMT_YV12, and yuy2_to_yv12.

Referenced by denoise3d_open_plugin().

## ◆ denoise3d_init_plugin()

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

References denoise3d_open_plugin(), post_plugin_s::dispose, N_, NULL, and post_class_s::open_plugin.

## ◆ denoise3d_intercept_frame()

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

References vo_frame_s::format, XINE_IMGFMT_YUY2, and XINE_IMGFMT_YV12.

Referenced by denoise3d_open_plugin().

## ◆ 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

References _x_post_init(), _x_post_intercept_video_port(), xine_video_port_s::close, denoise3d_close(), denoise3d_dispose(), denoise3d_draw(), denoise3d_intercept_frame(), vo_frame_s::draw, get_help(), get_param_descr(), get_parameters(), input(), post_video_port_s::intercept_frame, xine_post_in_s::name, xine_post_out_s::name, post_video_port_s::new_frame, post_video_port_s::new_port, NULL, PARAM1_DEFAULT, PARAM2_DEFAULT, PARAM3_DEFAULT, set_parameters(), xine_post_api_t::set_parameters, xine_list_push_back(), post_out_s::xine_out, and XINE_POST_DATA_PARAMETERS.

Referenced by denoise3d_init_plugin().

## ◆ 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().