Defines | Functions

libpostproc/postprocess_template.c File Reference

mmx/mmx2/3dnow postprocess code. More...

#include "libavutil/x86_cpu.h"

Go to the source code of this file.

Defines

#define ALIGN_MASK   "$-8"
#define PAVGB(a, b)   REAL_PAVGB(a,b)
#define FAST_L2_DIFF

Functions

static void doVertLowPass_SSE2 (uint8_t *src, int stride, PPContext *c)
 Do a vertical low pass filter on the 8x16 block (only write to the 8x8 block in the middle) using the 9-Tap Filter (1,1,2,2,4,2,2,1,1)/16.
static void vertX1Filter_SSE2 (uint8_t *src, int stride, PPContext *co)
 Experimental Filter 1 will not damage linear gradients Flat blocks should look like they were passed through the (1,1,2,2,4,2,2,1,1) 9-Tap filter can only smooth blocks at the expected locations (it cannot smooth them if they did move) MMX2 version does correct clipping C version does not.
static void doVertDefFilter_SSE2 (uint8_t src[], int stride, PPContext *c)
static void dering_SSE2 (uint8_t src[], int stride, PPContext *c)
static void deInterlaceInterpolateLinear_SSE2 (uint8_t src[], int stride)
 Deinterlaces the given block by linearly interpolating every second line.
static void deInterlaceInterpolateCubic_SSE2 (uint8_t src[], int stride)
 Deinterlaces the given block by cubic interpolating every second line.
static void deInterlaceFF_SSE2 (uint8_t src[], int stride, uint8_t *tmp)
 Deinterlaces the given block by filtering every second line with a (-1 4 2 4 -1) filter.
static void deInterlaceL5_SSE2 (uint8_t src[], int stride, uint8_t *tmp, uint8_t *tmp2)
 Deinterlaces the given block by filtering every line with a (-1 2 6 2 -1) filter.
static void deInterlaceBlendLinear_SSE2 (uint8_t src[], int stride, uint8_t *tmp)
 Deinterlaces the given block by filtering all lines with a (1 2 1) filter.
static void deInterlaceMedian_SSE2 (uint8_t src[], int stride)
 Deinterlaces the given block by applying a median filter to every second line.
static void tempNoiseReducer_SSE2 (uint8_t *src, int stride, uint8_t *tempBlurred, uint32_t *tempBlurredPast, int *maxNoise)
static void postProcess_SSE2 (const uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height, const QP_STORE_T QPs[], int QPStride, int isColor, PPContext *c2)
 Filters array of bytes (Y or U or V values).
static void blockCopy_SSE2 (uint8_t dst[], int dstStride, const uint8_t src[], int srcStride, int levelFix, int64_t *packedOffsetAndScale)
 Copies a block from src to dst and fixes the blacklevel.
static void duplicate_SSE2 (uint8_t src[], int stride)
 Duplicates the given 8 src pixels ? times upward.

Detailed Description

mmx/mmx2/3dnow postprocess code.

Definition in file postprocess_template.c.


Define Documentation

#define ALIGN_MASK   "$-8"

Definition at line 28 of file postprocess_template.c.

Referenced by dering_SSE2(), and doVertDefFilter_SSE2().

#define FAST_L2_DIFF
#define PAVGB (   a,
  b 
)    REAL_PAVGB(a,b)

Function Documentation

static void blockCopy_SSE2 ( uint8_t  dst[],
int  dstStride,
const uint8_t  src[],
int  srcStride,
int  levelFix,
int64_t *  packedOffsetAndScale 
) [inline, static]

Copies a block from src to dst and fixes the blacklevel.

levelFix == 0 -> do not touch the brighness & contrast

Definition at line 3015 of file postprocess_template.c.

static void deInterlaceBlendLinear_SSE2 ( uint8_t  src[],
int  stride,
uint8_t *  tmp 
) [inline, static]

Deinterlaces the given block by filtering all lines with a (1 2 1) filter.

will be called for every 8x8 block and can read & write from line 4-15 lines 0-3 have been passed through the deblock / dering filters already, but can be read, too. lines 4-12 will be read into the deblocking filter and should be deinterlaced this filter will read lines 4-13 and write 4-11

Definition at line 1695 of file postprocess_template.c.

static void deInterlaceFF_SSE2 ( uint8_t  src[],
int  stride,
uint8_t *  tmp 
) [inline, static]

Deinterlaces the given block by filtering every second line with a (-1 4 2 4 -1) filter.

will be called for every 8x8 block and can read & write from line 4-15 lines 0-3 have been passed through the deblock / dering filters already, but can be read, too. lines 4-12 will be read into the deblocking filter and should be deinterlaced this filter will read lines 4-13 and write 5-11

Definition at line 1515 of file postprocess_template.c.

static void deInterlaceInterpolateCubic_SSE2 ( uint8_t  src[],
int  stride 
) [inline, static]

Deinterlaces the given block by cubic interpolating every second line.

will be called for every 8x8 block and can read & write from line 4-15 lines 0-3 have been passed through the deblock / dering filters already, but can be read, too. lines 4-12 will be read into the deblocking filter and should be deinterlaced this filter will read lines 3-15 and write 7-13

Definition at line 1451 of file postprocess_template.c.

static void deInterlaceInterpolateLinear_SSE2 ( uint8_t  src[],
int  stride 
) [inline, static]

Deinterlaces the given block by linearly interpolating every second line.

will be called for every 8x8 block and can read & write from line 4-15 lines 0-3 have been passed through the deblock / dering filters already, but can be read, too. lines 4-12 will be read into the deblocking filter and should be deinterlaced

Definition at line 1398 of file postprocess_template.c.

static void deInterlaceL5_SSE2 ( uint8_t  src[],
int  stride,
uint8_t *  tmp,
uint8_t *  tmp2 
) [inline, static]

Deinterlaces the given block by filtering every line with a (-1 2 6 2 -1) filter.

will be called for every 8x8 block and can read & write from line 4-15 lines 0-3 have been passed through the deblock / dering filters already, but can be read, too. lines 4-12 will be read into the deblocking filter and should be deinterlaced this filter will read lines 4-13 and write 4-11

Definition at line 1594 of file postprocess_template.c.

static void deInterlaceMedian_SSE2 ( uint8_t  src[],
int  stride 
) [inline, static]

Deinterlaces the given block by applying a median filter to every second line.

will be called for every 8x8 block and can read & write from line 4-15, lines 0-3 have been passed through the deblock / dering filters already, but can be read, too. lines 4-12 will be read into the deblocking filter and should be deinterlaced

Definition at line 1796 of file postprocess_template.c.

static void dering_SSE2 ( uint8_t  src[],
int  stride,
PPContext c 
) [inline, static]

Definition at line 1044 of file postprocess_template.c.

static void doVertDefFilter_SSE2 ( uint8_t  src[],
int  stride,
PPContext c 
) [inline, static]

Definition at line 486 of file postprocess_template.c.

static void doVertLowPass_SSE2 ( uint8_t *  src,
int  stride,
PPContext c 
) [inline, static]

Do a vertical low pass filter on the 8x16 block (only write to the 8x8 block in the middle) using the 9-Tap Filter (1,1,2,2,4,2,2,1,1)/16.

Definition at line 181 of file postprocess_template.c.

static void duplicate_SSE2 ( uint8_t  src[],
int  stride 
) [inline, static]

Duplicates the given 8 src pixels ? times upward.

Definition at line 3143 of file postprocess_template.c.

static void postProcess_SSE2 ( const uint8_t  src[],
int  srcStride,
uint8_t  dst[],
int  dstStride,
int  width,
int  height,
const QP_STORE_T  QPs[],
int  QPStride,
int  isColor,
PPContext c 
) [static]

Filters array of bytes (Y or U or V values).

Definition at line 3168 of file postprocess_template.c.

static void tempNoiseReducer_SSE2 ( uint8_t *  src,
int  stride,
uint8_t *  tempBlurred,
uint32_t *  tempBlurredPast,
int *  maxNoise 
) [inline, static]

Definition at line 2082 of file postprocess_template.c.

static void vertX1Filter_SSE2 ( uint8_t *  src,
int  stride,
PPContext co 
) [inline, static]

Experimental Filter 1 will not damage linear gradients Flat blocks should look like they were passed through the (1,1,2,2,4,2,2,1,1) 9-Tap filter can only smooth blocks at the expected locations (it cannot smooth them if they did move) MMX2 version does correct clipping C version does not.

Definition at line 360 of file postprocess_template.c.