libavfilter/libmpcodecs/vf_pp7.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <math.h>
#include "config.h"
#include "mp_msg.h"
#include "cpudetect.h"
#include "libavutil/mem.h"
#include "img_format.h"
#include "mp_image.h"
#include "vf.h"
#include "libvo/fastmemcpy.h"

Go to the source code of this file.

Data Structures

struct  vf_priv_s
 Stores persistant variables. More...

Defines

#define XMIN(a, b)   ((a) < (b) ? (a) : (b))
#define XMAX(a, b)   ((a) > (b) ? (a) : (b))
#define N0   4
#define N1   5
#define N2   10
#define SN0   2
#define SN1   2.2360679775
#define SN2   3.16227766017
#define N   (1<<16)

Typedefs

typedef short DCTELEM

Functions

static void dctA_c (DCTELEM *dst, uint8_t *src, int stride)
static void dctB_c (DCTELEM *dst, DCTELEM *src)
static void dctB_mmx (DCTELEM *dst, DCTELEM *src)
static void init_thres2 (void)
static int hardthresh_c (DCTELEM *src, int qp)
static int mediumthresh_c (DCTELEM *src, int qp)
static int softthresh_c (DCTELEM *src, int qp)
static void filter (struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stride, int src_stride, int width, int height, uint8_t *qp_store, int qp_stride, 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 control (struct vf_instance *vf, int request, void *data)
static int vf_open (vf_instance_t *vf, char *args)

Variables

static const uint8_t dither [8][8]
static void(* dctB )(DCTELEM *dst, DCTELEM *src) = dctB_c
static const int factor [16]
static const int thres [16]
static int thres2 [99][16]
static int(* requantize )(DCTELEM *src, int qp) = hardthresh_c
const vf_info_t vf_info_pp7


Define Documentation

#define N   (1<<16)

Definition at line 202 of file vf_pp7.c.

Referenced by evolve().

#define N0   4

Definition at line 196 of file vf_pp7.c.

#define N1   5

Definition at line 197 of file vf_pp7.c.

#define N2   10

Definition at line 198 of file vf_pp7.c.

#define SN0   2

Definition at line 199 of file vf_pp7.c.

Referenced by init_thres2().

#define SN1   2.2360679775

Definition at line 200 of file vf_pp7.c.

#define SN2   3.16227766017

Definition at line 201 of file vf_pp7.c.

Referenced by init_thres2().

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

Definition at line 45 of file vf_pp7.c.

Referenced by init_thres2().

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

Definition at line 44 of file vf_pp7.c.

Referenced by filter().


Typedef Documentation

typedef short DCTELEM

Definition at line 47 of file vf_pp7.c.


Function Documentation

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 349 of file vf_pp7.c.

static int control ( struct vf_instance vf,
int  request,
void *  data 
) [static]

Definition at line 441 of file vf_pp7.c.

static void dctA_c ( DCTELEM dst,
uint8_t *  src,
int  stride 
) [inline, static]

Definition at line 116 of file vf_pp7.c.

Referenced by filter().

static void dctB_c ( DCTELEM dst,
DCTELEM src 
) [static]

Definition at line 138 of file vf_pp7.c.

static void dctB_mmx ( DCTELEM dst,
DCTELEM src 
) [static]

Definition at line 161 of file vf_pp7.c.

Referenced by vf_open().

static void filter ( struct vf_priv_s p,
uint8_t *  dst,
uint8_t *  src,
int  dst_stride,
int  src_stride,
int  width,
int  height,
uint8_t *  qp_store,
int  qp_stride,
int  is_luma 
) [static]

Definition at line 287 of file vf_pp7.c.

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

Definition at line 360 of file vf_pp7.c.

static int hardthresh_c ( DCTELEM src,
int  qp 
) [static]

Definition at line 231 of file vf_pp7.c.

Referenced by vf_open().

static void init_thres2 ( void   )  [static]

Definition at line 220 of file vf_pp7.c.

Referenced by vf_open().

static int mediumthresh_c ( DCTELEM src,
int  qp 
) [static]

Definition at line 247 of file vf_pp7.c.

Referenced by vf_open().

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

Definition at line 377 of file vf_pp7.c.

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

Definition at line 423 of file vf_pp7.c.

static int softthresh_c ( DCTELEM src,
int  qp 
) [static]

Definition at line 268 of file vf_pp7.c.

Referenced by vf_open().

static void uninit ( struct vf_instance vf  )  [static]

Definition at line 412 of file vf_pp7.c.

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

Definition at line 445 of file vf_pp7.c.


Variable Documentation

void(* dctB)(DCTELEM *dst, DCTELEM *src) = dctB_c [static]

Referenced by filter(), and vf_open().

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, },
}

Definition at line 50 of file vf_pp7.c.

const int factor[16] [static]

Initial value:

{
    N/(N0*N0), N/(N0*N1), N/(N0*N0),N/(N0*N2),
    N/(N1*N0), N/(N1*N1), N/(N1*N0),N/(N1*N2),
    N/(N0*N0), N/(N0*N1), N/(N0*N0),N/(N0*N2),
    N/(N2*N0), N/(N2*N1), N/(N2*N0),N/(N2*N2),
}

Definition at line 204 of file vf_pp7.c.

Referenced by adaptive_quantization(), av_resample_init(), av_solve_lls(), blur(), ff_jpegls_reset_coding_parameters(), and swri_resample_init().

int(* requantize)(DCTELEM *src, int qp) = hardthresh_c [static]

Referenced by filter(), and vf_open().

const int thres[16] [static]

Initial value:

{
    N/(SN0*SN0), N/(SN0*SN2), N/(SN0*SN0),N/(SN0*SN2),
    N/(SN2*SN0), N/(SN2*SN2), N/(SN2*SN0),N/(SN2*SN2),
    N/(SN0*SN0), N/(SN0*SN2), N/(SN0*SN0),N/(SN0*SN2),
    N/(SN2*SN0), N/(SN2*SN2), N/(SN2*SN0),N/(SN2*SN2),
}

Definition at line 211 of file vf_pp7.c.

int thres2[99][16] [static]

Definition at line 218 of file vf_pp7.c.

Initial value:

 {
    "postprocess 7",
    "pp7",
    "Michael Niedermayer",
    "",
    vf_open,
    NULL
}

Definition at line 486 of file vf_pp7.c.


Generated on Fri Oct 26 02:43:51 2012 for FFmpeg by  doxygen 1.5.8