FFmpeg  4.0
Macros | Functions
postprocess_template.c File Reference

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

#include "libavutil/x86/asm.h"

Go to the source code of this file.

Macros

#define TEMPLATE_PP_C   0
 
#define TEMPLATE_PP_ALTIVEC   0
 
#define TEMPLATE_PP_MMX   0
 
#define TEMPLATE_PP_MMXEXT   0
 
#define TEMPLATE_PP_3DNOW   0
 
#define TEMPLATE_PP_SSE2   0
 
#define PAVGB(a, b)   REAL_PAVGB(a,b)
 
#define FAST_L2_DIFF
 

Functions

static void RENAME() doVertLowPass (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. More...
 
static void RENAME() vertX1Filter (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. More...
 
static void RENAME() doVertDefFilter (uint8_t src[], int stride, PPContext *c)
 
static void RENAME() dering (uint8_t src[], int stride, PPContext *c)
 
static void RENAME() deInterlaceInterpolateLinear (uint8_t src[], int stride)
 Deinterlace the given block by linearly interpolating every second line. More...
 
static void RENAME() deInterlaceInterpolateCubic (uint8_t src[], int stride)
 Deinterlace the given block by cubic interpolating every second line. More...
 
static void RENAME() deInterlaceFF (uint8_t src[], int stride, uint8_t *tmp)
 Deinterlace the given block by filtering every second line with a (-1 4 2 4 -1) filter. More...
 
static void RENAME() deInterlaceL5 (uint8_t src[], int stride, uint8_t *tmp, uint8_t *tmp2)
 Deinterlace the given block by filtering every line with a (-1 2 6 2 -1) filter. More...
 
static void RENAME() deInterlaceBlendLinear (uint8_t src[], int stride, uint8_t *tmp)
 Deinterlace the given block by filtering all lines with a (1 2 1) filter. More...
 
static void RENAME() deInterlaceMedian (uint8_t src[], int stride)
 Deinterlace the given block by applying a median filter to every second line. More...
 
static void RENAME() tempNoiseReducer (uint8_t *src, int stride, uint8_t *tempBlurred, uint32_t *tempBlurredPast, const int *maxNoise)
 
static void RENAME() postProcess (const uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height, const int8_t QPs[], int QPStride, int isColor, PPContext *c2)
 Filter array of bytes (Y or U or V values) More...
 
static void RENAME() blockCopy (uint8_t dst[], int dstStride, const uint8_t src[], int srcStride, int levelFix, int64_t *packedOffsetAndScale)
 Copy a block from src to dst and fixes the blacklevel. More...
 
static void RENAME() duplicate (uint8_t src[], int stride)
 Duplicate the given 8 src pixels ? times upward. More...
 
static void RENAME() prefetchnta (const void *p)
 
static void RENAME() prefetcht0 (const void *p)
 
static void RENAME() prefetcht1 (const void *p)
 
static void RENAME() prefetcht2 (const void *p)
 

Detailed Description

mmx/mmx2/3dnow postprocess code.

Definition in file postprocess_template.c.

Macro Definition Documentation

◆ TEMPLATE_PP_C

#define TEMPLATE_PP_C   0

Definition at line 36 of file postprocess_template.c.

◆ TEMPLATE_PP_ALTIVEC

#define TEMPLATE_PP_ALTIVEC   0

Definition at line 42 of file postprocess_template.c.

◆ TEMPLATE_PP_MMX

#define TEMPLATE_PP_MMX   0

Definition at line 48 of file postprocess_template.c.

Referenced by postProcess().

◆ TEMPLATE_PP_MMXEXT

#define TEMPLATE_PP_MMXEXT   0

Definition at line 56 of file postprocess_template.c.

◆ TEMPLATE_PP_3DNOW

#define TEMPLATE_PP_3DNOW   0

Definition at line 64 of file postprocess_template.c.

◆ TEMPLATE_PP_SSE2

#define TEMPLATE_PP_SSE2   0

Definition at line 74 of file postprocess_template.c.

Referenced by deInterlaceInterpolateCubic().

◆ PAVGB

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

◆ FAST_L2_DIFF

#define FAST_L2_DIFF

Function Documentation

◆ doVertLowPass()

static void RENAME() doVertLowPass ( uint8_t src,
int  stride,
PPContext c 
)
inlinestatic

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 228 of file postprocess_template.c.

Referenced by postProcess().

◆ vertX1Filter()

static void RENAME() vertX1Filter ( uint8_t src,
int  stride,
PPContext co 
)
inlinestatic

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 407 of file postprocess_template.c.

Referenced by postProcess().

◆ doVertDefFilter()

static void RENAME() doVertDefFilter ( uint8_t  src[],
int  stride,
PPContext c 
)
inlinestatic

Definition at line 534 of file postprocess_template.c.

Referenced by postProcess().

◆ dering()

static void RENAME() dering ( uint8_t  src[],
int  stride,
PPContext c 
)
inlinestatic

Definition at line 1093 of file postprocess_template.c.

Referenced by postProcess().

◆ deInterlaceInterpolateLinear()

static void RENAME() deInterlaceInterpolateLinear ( uint8_t  src[],
int  stride 
)
inlinestatic

Deinterlace 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 1450 of file postprocess_template.c.

Referenced by postProcess().

◆ deInterlaceInterpolateCubic()

static void RENAME() deInterlaceInterpolateCubic ( uint8_t  src[],
int  stride 
)
inlinestatic

Deinterlace 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 1503 of file postprocess_template.c.

Referenced by postProcess().

◆ deInterlaceFF()

static void RENAME() deInterlaceFF ( uint8_t  src[],
int  stride,
uint8_t tmp 
)
inlinestatic

Deinterlace 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 1590 of file postprocess_template.c.

Referenced by postProcess().

◆ deInterlaceL5()

static void RENAME() deInterlaceL5 ( uint8_t  src[],
int  stride,
uint8_t tmp,
uint8_t tmp2 
)
inlinestatic

Deinterlace 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 1669 of file postprocess_template.c.

Referenced by postProcess().

◆ deInterlaceBlendLinear()

static void RENAME() deInterlaceBlendLinear ( uint8_t  src[],
int  stride,
uint8_t tmp 
)
inlinestatic

Deinterlace 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 1770 of file postprocess_template.c.

Referenced by postProcess().

◆ deInterlaceMedian()

static void RENAME() deInterlaceMedian ( uint8_t  src[],
int  stride 
)
inlinestatic

Deinterlace 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 1871 of file postprocess_template.c.

Referenced by postProcess().

◆ tempNoiseReducer()

static void RENAME() tempNoiseReducer ( uint8_t src,
int  stride,
uint8_t tempBlurred,
uint32_t *  tempBlurredPast,
const int maxNoise 
)
inlinestatic

Definition at line 2157 of file postprocess_template.c.

Referenced by postProcess().

◆ postProcess()

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

Filter array of bytes (Y or U or V values)

Definition at line 3311 of file postprocess_template.c.

Referenced by tempNoiseReducer().

◆ blockCopy()

static void RENAME() blockCopy ( uint8_t  dst[],
int  dstStride,
const uint8_t  src[],
int  srcStride,
int  levelFix,
int64_t *  packedOffsetAndScale 
)
inlinestatic

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

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

Definition at line 3093 of file postprocess_template.c.

Referenced by postProcess().

◆ duplicate()

static void RENAME() duplicate ( uint8_t  src[],
int  stride 
)
inlinestatic

Duplicate the given 8 src pixels ? times upward.

Definition at line 3221 of file postprocess_template.c.

Referenced by postProcess().

◆ prefetchnta()

static void RENAME() prefetchnta ( const void p)
inlinestatic

Definition at line 3274 of file postprocess_template.c.

Referenced by duplicate(), postProcess(), and prefetcht2().

◆ prefetcht0()

static void RENAME() prefetcht0 ( const void p)
inlinestatic

Definition at line 3278 of file postprocess_template.c.

Referenced by duplicate(), postProcess(), and prefetcht2().

◆ prefetcht1()

static void RENAME() prefetcht1 ( const void p)
inlinestatic

Definition at line 3282 of file postprocess_template.c.

Referenced by duplicate(), and prefetcht2().

◆ prefetcht2()

static void RENAME() prefetcht2 ( const void p)
inlinestatic

Definition at line 3286 of file postprocess_template.c.

Referenced by duplicate().