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"
Include dependency graph for vf_pp7.c:

Go to the source code of this file.

Data Structures

struct  vf_priv_s
 

Macros

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

Functions

static const uint8_t __attribute__ ((aligned(8)))
 
static void dctA_c (int16_t *dst, uint8_t *src, int stride)
 
static void dctB_c (int16_t *dst, int16_t *src)
 
static void init_thres2 (void)
 
static int hardthresh_c (int16_t *src, int qp)
 
static int mediumthresh_c (int16_t *src, int qp)
 
static int softthresh_c (int16_t *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 void(* dctB )(int16_t *dst, int16_t *src) = dctB_c
 
static const int factor [16]
 
static const int thres [16]
 
static int thres2 [99][16]
 
static int(* requantize )(int16_t *src, int qp) = hardthresh_c
 
const vf_info_t ff_vf_info_pp7
 

Macro Definition Documentation

#define N   (1<<16)

Definition at line 200 of file vf_pp7.c.

Referenced by av_get_random_seed(), evolve(), and hybrid6_cx().

#define N0   4

Definition at line 194 of file vf_pp7.c.

#define N1   5

Definition at line 195 of file vf_pp7.c.

#define N2   10

Definition at line 196 of file vf_pp7.c.

#define SN0   2

Definition at line 197 of file vf_pp7.c.

Referenced by init_thres2().

#define SN1   2.2360679775

Definition at line 198 of file vf_pp7.c.

#define SN2   3.16227766017

Definition at line 199 of file vf_pp7.c.

Referenced by init_thres2().

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

Definition at line 45 of file vf_pp7.c.

Referenced by init_thres2().

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

Definition at line 44 of file vf_pp7.c.

Referenced by filter().

Function Documentation

static const uint8_t __attribute__ ( (aligned(8))  )
static

Definition at line 48 of file vf_pp7.c.

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

Referenced by vf_open().

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

Definition at line 439 of file vf_pp7.c.

Referenced by vf_open().

static void dctA_c ( int16_t *  dst,
uint8_t src,
int  stride 
)
inlinestatic

Definition at line 114 of file vf_pp7.c.

Referenced by filter().

static void dctB_c ( int16_t *  dst,
int16_t *  src 
)
static

Definition at line 136 of file vf_pp7.c.

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

Referenced by put_image().

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

Definition at line 358 of file vf_pp7.c.

Referenced by vf_open().

static int hardthresh_c ( int16_t *  src,
int  qp 
)
static

Definition at line 229 of file vf_pp7.c.

Referenced by vf_open().

static void init_thres2 ( void  )
static

Definition at line 218 of file vf_pp7.c.

Referenced by vf_open().

static int mediumthresh_c ( int16_t *  src,
int  qp 
)
static

Definition at line 245 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 375 of file vf_pp7.c.

Referenced by vf_open().

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

Definition at line 421 of file vf_pp7.c.

Referenced by vf_open().

static int softthresh_c ( int16_t *  src,
int  qp 
)
static

Definition at line 266 of file vf_pp7.c.

Referenced by vf_open().

static void uninit ( struct vf_instance vf)
static

Definition at line 410 of file vf_pp7.c.

Referenced by vf_open().

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

Definition at line 443 of file vf_pp7.c.

Variable Documentation

void(* dctB) (int16_t *dst, int16_t *src) = dctB_c
static

Definition at line 192 of file vf_pp7.c.

Referenced by filter(), and vf_open().

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),
}
#define N
Definition: vf_pp7.c:200
#define N2
Definition: vf_pp7.c:196
#define N0
Definition: vf_pp7.c:194
#define N1
Definition: vf_pp7.c:195

Definition at line 202 of file vf_pp7.c.

Referenced by adaptive_quantization(), avpriv_solve_lls(), blur(), create_default_qtables(), and ff_jpegls_reset_coding_parameters().

const vf_info_t ff_vf_info_pp7
Initial value:
= {
"postprocess 7",
"pp7",
"Michael Niedermayer",
"",
}
static int vf_open(vf_instance_t *vf, char *args)
Definition: vf_pp7.c:443
NULL
Definition: eval.c:55

Definition at line 484 of file vf_pp7.c.

int(* requantize) (int16_t *src, int qp) = hardthresh_c
static

Definition at line 283 of file vf_pp7.c.

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),
}
#define SN0
Definition: vf_pp7.c:197
#define N
Definition: vf_pp7.c:200
#define SN2
Definition: vf_pp7.c:199

Definition at line 209 of file vf_pp7.c.

int thres2[99][16]
static

Definition at line 216 of file vf_pp7.c.

Referenced by quantize().