Data Structures | Defines | Functions | Variables

libavfilter/libmpcodecs/vf_spp.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/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/dsputil.h"
#include "img_format.h"
#include "mp_image.h"
#include "vf.h"
#include "vd_ffmpeg.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 SHIFT   22
#define REQUANT_CORE(dst0, dst1, dst2, dst3, src0, src1, src2, src3)
#define REQUANT_CORE(dst0, dst1, dst2, dst3, src0, src1, src2, src3)
#define STORE(pos)

Functions

static void hardthresh_c (DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *permutation)
static void softthresh_c (DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *permutation)
static void hardthresh_mmx (DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *permutation)
static void softthresh_mmx (DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *permutation)
static void add_block (int16_t *dst, int stride, DCTELEM block[64])
static void store_slice_c (uint8_t *dst, int16_t *src, int dst_stride, int src_stride, int width, int height, int log2_scale)
static void store_slice_mmx (uint8_t *dst, int16_t *src, int dst_stride, int src_stride, int width, int height, int log2_scale)
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 const uint8_t offset [127][2]
static void(* store_slice )(uint8_t *dst, int16_t *src, int dst_stride, int src_stride, int width, int height, int log2_scale) = store_slice_c
static void(* requantize )(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *permutation) = hardthresh_c
const vf_info_t vf_info_spp

Define Documentation

#define REQUANT_CORE (   dst0,
  dst1,
  dst2,
  dst3,
  src0,
  src1,
  src2,
  src3 
)

Referenced by hardthresh_mmx(), and softthresh_mmx().

#define REQUANT_CORE (   dst0,
  dst1,
  dst2,
  dst3,
  src0,
  src1,
  src2,
  src3 
)
#define SHIFT   22

Definition at line 106 of file vf_spp.c.

#define STORE (   pos  ) 
Value:
temp= ((src[x + y*src_stride + pos]<<log2_scale) + d[pos])>>6;\
        if(temp & 0x100) temp= ~(temp>>31);\
        dst[x + y*dst_stride + pos]= temp;
#define XMIN (   a,
  b 
)    ((a) < (b) ? (a) : (b))

Definition at line 55 of file vf_spp.c.

Referenced by filter().


Function Documentation

static void add_block ( int16_t *  dst,
int  stride,
DCTELEM  block[64] 
) [inline, static]

Definition at line 297 of file vf_spp.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 439 of file vf_spp.c.

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

Definition at line 555 of file vf_spp.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 377 of file vf_spp.c.

Referenced by put_image().

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

Definition at line 451 of file vf_spp.c.

static void hardthresh_c ( DCTELEM  dst[64],
DCTELEM  src[64],
int  qp,
uint8_t *  permutation 
) [static]

Definition at line 108 of file vf_spp.c.

static void hardthresh_mmx ( DCTELEM  dst[64],
DCTELEM  src[64],
int  qp,
uint8_t *  permutation 
) [static]

Definition at line 152 of file vf_spp.c.

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

Definition at line 468 of file vf_spp.c.

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

Definition at line 537 of file vf_spp.c.

static void softthresh_c ( DCTELEM  dst[64],
DCTELEM  src[64],
int  qp,
uint8_t *  permutation 
) [static]

Definition at line 128 of file vf_spp.c.

static void softthresh_mmx ( DCTELEM  dst[64],
DCTELEM  src[64],
int  qp,
uint8_t *  permutation 
) [static]

Definition at line 220 of file vf_spp.c.

static void store_slice_c ( uint8_t *  dst,
int16_t *  src,
int  dst_stride,
int  src_stride,
int  width,
int  height,
int  log2_scale 
) [static]

Definition at line 308 of file vf_spp.c.

static void store_slice_mmx ( uint8_t *  dst,
int16_t *  src,
int  dst_stride,
int  src_stride,
int  width,
int  height,
int  log2_scale 
) [static]

Definition at line 333 of file vf_spp.c.

static void uninit ( struct vf_instance vf  )  [static]

Definition at line 520 of file vf_spp.c.

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

Definition at line 566 of file vf_spp.c.


Variable Documentation

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 58 of file vf_spp.c.

Referenced by store_slice_c(), and store_slice_mmx().

const uint8_t offset[127][2] [static]
Initial value:
 {
{0,0},
{0,0}, {4,4},
{0,0}, {2,2}, {6,4}, {4,6},
{0,0}, {5,1}, {2,2}, {7,3}, {4,4}, {1,5}, {6,6}, {3,7},

{0,0}, {4,0}, {1,1}, {5,1}, {3,2}, {7,2}, {2,3}, {6,3},
{0,4}, {4,4}, {1,5}, {5,5}, {3,6}, {7,6}, {2,7}, {6,7},

{0,0}, {0,2}, {0,4}, {0,6}, {1,1}, {1,3}, {1,5}, {1,7},
{2,0}, {2,2}, {2,4}, {2,6}, {3,1}, {3,3}, {3,5}, {3,7},
{4,0}, {4,2}, {4,4}, {4,6}, {5,1}, {5,3}, {5,5}, {5,7},
{6,0}, {6,2}, {6,4}, {6,6}, {7,1}, {7,3}, {7,5}, {7,7},

{0,0}, {4,4}, {0,4}, {4,0}, {2,2}, {6,6}, {2,6}, {6,2},
{0,2}, {4,6}, {0,6}, {4,2}, {2,0}, {6,4}, {2,4}, {6,0},
{1,1}, {5,5}, {1,5}, {5,1}, {3,3}, {7,7}, {3,7}, {7,3},
{1,3}, {5,7}, {1,7}, {5,3}, {3,1}, {7,5}, {3,5}, {7,1},
{0,1}, {4,5}, {0,5}, {4,1}, {2,3}, {6,7}, {2,7}, {6,3},
{0,3}, {4,7}, {0,7}, {4,3}, {2,1}, {6,5}, {2,5}, {6,1},
{1,0}, {5,4}, {1,4}, {5,0}, {3,2}, {7,6}, {3,6}, {7,2},
{1,2}, {5,6}, {1,6}, {5,2}, {3,0}, {7,4}, {3,4}, {7,0},
}

Definition at line 69 of file vf_spp.c.

void(* requantize)(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *permutation) = hardthresh_c [static]

Definition at line 375 of file vf_spp.c.

Referenced by filter(), and vf_open().

void(* store_slice)(uint8_t *dst, int16_t *src, int dst_stride, int src_stride, int width, int height, int log2_scale) = store_slice_c [static]

Definition at line 373 of file vf_spp.c.

Referenced by filter(), and vf_open().

Initial value:
 {
    "simple postprocess",
    "spp",
    "Michael Niedermayer",
    "",
    vf_open,
    NULL
}

Definition at line 613 of file vf_spp.c.