FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_uspp.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <math.h>
#include <assert.h>
#include "config.h"
#include "mp_msg.h"
#include "cpudetect.h"
#include "libavutil/mem.h"
#include "libavcodec/avcodec.h"
#include "img_format.h"
#include "mp_image.h"
#include "vf.h"
#include "av_helpers.h"
#include "libvo/fastmemcpy.h"

Go to the source code of this file.

Data Structures

struct  vf_priv_s
 

Macros

#define XMIN(a, b)   ((a) < (b) ? (a) : (b))
 
#define BLOCK   16
 
#define STORE(pos)
 

Functions

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 filter (struct vf_priv_s *p, uint8_t *dst[3], uint8_t *src[3], int dst_stride[3], int src_stride[3], int width, int height, uint8_t *qp_store, int qp_stride)
 
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 [511][2]
 
const vf_info_t ff_vf_info_uspp
 

Macro Definition Documentation

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

Definition at line 42 of file vf_uspp.c.

#define BLOCK   16

Definition at line 44 of file vf_uspp.c.

Referenced by config(), filter(), and uninit().

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

Function Documentation

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 118 of file vf_uspp.c.

Referenced by filter().

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

Definition at line 142 of file vf_uspp.c.

Referenced by put_image().

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 213 of file vf_uspp.c.

Referenced by vf_open().

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

Definition at line 257 of file vf_uspp.c.

Referenced by vf_open().

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

Definition at line 274 of file vf_uspp.c.

Referenced by vf_open().

static void uninit ( struct vf_instance *  vf)
static

Definition at line 309 of file vf_uspp.c.

Referenced by vf_open().

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

Definition at line 328 of file vf_uspp.c.

Referenced by vf_open().

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

Definition at line 340 of file vf_uspp.c.

Referenced by vf_open().

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

Definition at line 352 of file vf_uspp.c.

Variable Documentation

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

Definition at line 47 of file vf_uspp.c.

Referenced by store_slice_c().

const uint8_t offset[511][2]
static

Definition at line 58 of file vf_uspp.c.

Referenced by filter().

const vf_info_t ff_vf_info_uspp
Initial value:
= {
"ultra simple/slow postprocess",
"uspp",
"Michael Niedermayer",
"",
}

Definition at line 386 of file vf_uspp.c.