FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_ow.c File Reference
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <math.h>
#include "mp_msg.h"
#include "img_format.h"
#include "mp_image.h"
#include "vf.h"

Go to the source code of this file.

Data Structures

struct  vf_priv_s
 

Macros

#define S   1.41421356237
 

Functions

static int mirror (int x, int w)
 
static void decompose (float *dstL, float *dstH, float *src, int stride, int w)
 
static void compose (float *dst, float *srcL, float *srcH, int stride, int w)
 
static void decompose2D (float *dstL, float *dstH, float *src, int xstride, int ystride, int step, int w, int h)
 
static void compose2D (float *dst, float *srcL, float *srcH, int xstride, int ystride, int step, int w, int h)
 
static void decompose2D2 (float *dst[4], float *src, float *temp[2], int stride, int step, int w, int h)
 
static void compose2D2 (float *dst, float *src[4], float *temp[2], int stride, int step, int w, int h)
 
static void filter (struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stride, int src_stride, int width, int height, int is_luma)
 
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 get_image (struct vf_instance *vf, mp_image_t *mpi)
 
static int put_image (struct vf_instance *vf, mp_image_t *mpi, double pts)
 
static void uninit (struct vf_instance *vf)
 
static int query_format (struct vf_instance *vf, unsigned int fmt)
 
static int vf_open (vf_instance_t *vf, char *args)
 

Variables

static const uint8_t dither [8][8]
 
static const double coeff [2][5]
 
static const double icoeff [2][5]
 
const vf_info_t ff_vf_info_ow
 

Macro Definition Documentation

#define S   1.41421356237

Definition at line 62 of file vf_ow.c.

Function Documentation

static void compose ( float *  dst,
float *  srcL,
float *  srcH,
int  stride,
int  w 
)
inlinestatic

Definition at line 119 of file vf_ow.c.

Referenced by compose2D().

static void compose2D ( float *  dst,
float *  srcL,
float *  srcH,
int  xstride,
int  ystride,
int  step,
int  w,
int  h 
)
inlinestatic

Definition at line 142 of file vf_ow.c.

Referenced by compose2D2().

static void compose2D2 ( float *  dst,
float *  src[4],
float *  temp[2],
int  stride,
int  step,
int  w,
int  h 
)
static

Definition at line 155 of file vf_ow.c.

Referenced by filter().

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 206 of file vf_ow.c.

Referenced by vf_open().

static void decompose ( float *  dstL,
float *  dstH,
float *  src,
int  stride,
int  w 
)
inlinestatic

Definition at line 103 of file vf_ow.c.

Referenced by decompose2D().

static void decompose2D ( float *  dstL,
float *  dstH,
float *  src,
int  xstride,
int  ystride,
int  step,
int  w,
int  h 
)
inlinestatic

Definition at line 135 of file vf_ow.c.

Referenced by decompose2D2().

static void decompose2D2 ( float *  dst[4],
float *  src,
float *  temp[2],
int  stride,
int  step,
int  w,
int  h 
)
static

Definition at line 149 of file vf_ow.c.

Referenced by filter().

static void filter ( struct vf_priv_s p,
uint8_t dst,
uint8_t src,
int  dst_stride,
int  src_stride,
int  width,
int  height,
int  is_luma 
)
static

Definition at line 161 of file vf_ow.c.

Referenced by put_image().

static void get_image ( struct vf_instance vf,
mp_image_t mpi 
)
static

Definition at line 219 of file vf_ow.c.

Referenced by vf_open().

static int mirror ( int  x,
int  w 
)
inlinestatic

Definition at line 95 of file vf_ow.c.

Referenced by compose(), and decompose().

static int put_image ( struct vf_instance vf,
mp_image_t mpi,
double  pts 
)
static

Definition at line 236 of file vf_ow.c.

Referenced by vf_open().

static int query_format ( struct vf_instance vf,
unsigned int  fmt 
)
static

Definition at line 273 of file vf_ow.c.

Referenced by vf_open().

static void uninit ( struct vf_instance vf)
static

Definition at line 257 of file vf_ow.c.

Referenced by vf_open().

static int vf_open ( vf_instance_t vf,
char *  args 
)
static

Definition at line 292 of file vf_ow.c.

Variable Documentation

const double coeff[2][5]
static
Initial value:
={
{
0.6029490182363579 *S,
0.2668641184428723 *S,
-0.07822326652898785 *S,
-0.01686411844287495 *S,
0.02674875741080976 *S
},{
1.115087052456994 /S,
-0.5912717631142470 /S,
-0.05754352622849957 /S,
0.09127176311424948 /S
}
}

Definition at line 64 of file vf_ow.c.

Referenced by adpcm_decode_frame(), coeff_unpack_arith(), coeff_unpack_golomb(), copy_TMPL(), dca_parse_audio_coding_header(), dct_quantize_refine(), dct_quantize_trellis_c(), decode_block(), decode_block_coeffs_internal(), decode_channel(), decode_subblock1(), encode_block(), ff_eac3_apply_spectral_extension(), get_block(), getCoeff(), init_dequantizer(), init_pass2(), initFilter(), mlp_filter_channel(), psy_3gpp_init(), unpack_coeffs(), unpack_vlcs(), vlc_decode_block(), vp5_parse_coeff(), vp6_parse_coeff(), and vp6_parse_coeff_huffman().

const uint8_t dither[8][8]
static
Initial value:
={
{ 0, 48, 12, 60, 3, 51, 15, 63, },
{ 32, 16, 44, 28, 35, 19, 47, 31, },
{ 8, 56, 4, 52, 11, 59, 7, 55, },
{ 40, 24, 36, 20, 43, 27, 39, 23, },
{ 2, 50, 14, 62, 1, 49, 13, 61, },
{ 34, 18, 46, 30, 33, 17, 45, 29, },
{ 10, 58, 6, 54, 9, 57, 5, 53, },
{ 42, 26, 38, 22, 41, 25, 37, 21, },
}
Todo:

try to change to int

try lifting based implementation

optimize optimize optimize

hard tresholding

use QP to decide filter strength

wavelet normalization / least squares optimal signal vs. noise thresholds

Definition at line 41 of file vf_ow.c.

Referenced by filter().

const vf_info_t ff_vf_info_ow
Initial value:
= {
"overcomplete wavelet denoiser",
"ow",
"Michael Niedermayer",
"",
}

Definition at line 315 of file vf_ow.c.

const double icoeff[2][5]
static
Initial value:
={
{
1.115087052456994 /S,
0.5912717631142470 /S,
-0.05754352622849957 /S,
-0.09127176311424948 /S
},{
0.6029490182363579 *S,
-0.2668641184428723 *S,
-0.07822326652898785 *S,
0.01686411844287495 *S,
0.02674875741080976 *S
}
}

Definition at line 79 of file vf_ow.c.