mmx/mmx2/3dnow postprocess code. More...
#include "libavutil/x86_cpu.h"
Go to the source code of this file.
Macros | |
#define | ALIGN_MASK "$-8" |
#define | REAL_PAVGB(a, b) "pavgb " #a ", " #b " \n\t" |
#define | PAVGB(a, b) REAL_PAVGB(a,b) |
#define | PMINUB(a, b, t) "pminub " #a ", " #b " \n\t" |
#define | PMAXUB(a, b) "pmaxub " #a ", " #b " \n\t" |
#define | REAL_FIND_MIN_MAX(addr) |
#define | FIND_MIN_MAX(addr) REAL_FIND_MIN_MAX(addr) |
#define | REAL_DERING_CORE(dst, src, ppsx, psx, sx, pplx, plx, lx, t0, t1) |
#define | DERING_CORE(dst, src, ppsx, psx, sx, pplx, plx, lx, t0, t1) REAL_DERING_CORE(dst,src,ppsx,psx,sx,pplx,plx,lx,t0,t1) |
#define | REAL_DEINT_CUBIC(a, b, c, d, e) |
#define | DEINT_CUBIC(a, b, c, d, e) REAL_DEINT_CUBIC(a,b,c,d,e) |
#define | REAL_DEINT_FF(a, b, c, d) |
#define | DEINT_FF(a, b, c, d) REAL_DEINT_FF(a,b,c,d) |
#define | REAL_DEINT_L5(t1, t2, a, b, c) |
#define | DEINT_L5(t1, t2, a, b, c) REAL_DEINT_L5(t1,t2,a,b,c) |
#define | FAST_L2_DIFF |
#define | REAL_L2_DIFF_CORE(a, b) |
#define | L2_DIFF_CORE(a, b) REAL_L2_DIFF_CORE(a, b) |
#define | NEXT |
#define | PREV |
#define | REAL_SCALED_CPY(src1, src2, dst1, dst2) |
#define | SCALED_CPY(src1, src2, dst1, dst2) REAL_SCALED_CPY(src1, src2, dst1, dst2) |
#define | REAL_SIMPLE_CPY(src1, src2, dst1, dst2) |
#define | SIMPLE_CPY(src1, src2, dst1, dst2) REAL_SIMPLE_CPY(src1, src2, dst1, dst2) |
Functions | |
static int | vertClassify_TMPL (uint8_t src[], int stride, PPContext *c) |
Check if the middle 8x8 Block in the given 8x16 block is flat. | |
static void | doVertLowPass_TMPL (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_TMPL (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_TMPL (uint8_t src[], int stride, PPContext *c) |
static void | dering_TMPL (uint8_t src[], int stride, PPContext *c) |
static void | deInterlaceInterpolateLinear_TMPL (uint8_t src[], int stride) |
Deinterlace the given block by linearly interpolating every second line. | |
static void | deInterlaceInterpolateCubic_TMPL (uint8_t src[], int stride) |
Deinterlace the given block by cubic interpolating every second line. | |
static void | deInterlaceFF_TMPL (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. | |
static void | deInterlaceL5_TMPL (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. | |
static void | deInterlaceBlendLinear_TMPL (uint8_t src[], int stride, uint8_t *tmp) |
Deinterlace the given block by filtering all lines with a (1 2 1) filter. | |
static void | deInterlaceMedian_TMPL (uint8_t src[], int stride) |
Deinterlace the given block by applying a median filter to every second line. | |
static void | transpose1_TMPL (uint8_t *dst1, uint8_t *dst2, uint8_t *src, int srcStride) |
Transpose and shift the given 8x8 Block into dst1 and dst2. | |
static void | transpose2_TMPL (uint8_t *dst, int dstStride, uint8_t *src) |
Transpose the given 8x8 block. | |
static void | tempNoiseReducer_TMPL (uint8_t *src, int stride, uint8_t *tempBlurred, uint32_t *tempBlurredPast, int *maxNoise) |
static av_always_inline void | do_a_deblock_TMPL (uint8_t *src, int step, int stride, PPContext *c) |
accurate deblock filter | |
static void | postProcess_TMPL (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) |
Filter array of bytes (Y or U or V values) | |
static void | blockCopy_TMPL (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. | |
static void | duplicate_TMPL (uint8_t src[], int stride) |
Duplicate the given 8 src pixels ? times upward. |
mmx/mmx2/3dnow postprocess code.
Definition in file postprocess_template.c.
#define ALIGN_MASK "$-8" |
Definition at line 28 of file postprocess_template.c.
Referenced by dering_TMPL(), do_a_deblock_TMPL(), and doVertDefFilter_TMPL().
#define DEINT_CUBIC | ( | a, | |
b, | |||
c, | |||
d, | |||
e | |||
) | REAL_DEINT_CUBIC(a,b,c,d,e) |
Referenced by deInterlaceInterpolateCubic_TMPL().
#define DEINT_FF | ( | a, | |
b, | |||
c, | |||
d | |||
) | REAL_DEINT_FF(a,b,c,d) |
Referenced by deInterlaceFF_TMPL().
Referenced by deInterlaceL5_TMPL().
#define DERING_CORE | ( | dst, | |
src, | |||
ppsx, | |||
psx, | |||
sx, | |||
pplx, | |||
plx, | |||
lx, | |||
t0, | |||
t1 | |||
) | REAL_DERING_CORE(dst,src,ppsx,psx,sx,pplx,plx,lx,t0,t1) |
Referenced by dering_TMPL().
#define FAST_L2_DIFF |
#define FIND_MIN_MAX | ( | addr | ) | REAL_FIND_MIN_MAX(addr) |
Referenced by dering_TMPL().
#define L2_DIFF_CORE | ( | a, | |
b | |||
) | REAL_L2_DIFF_CORE(a, b) |
Referenced by tempNoiseReducer_TMPL().
#define NEXT |
Referenced by do_a_deblock_TMPL().
#define PAVGB | ( | a, | |
b | |||
) | REAL_PAVGB(a,b) |
Definition at line 40 of file postprocess_template.c.
Referenced by deInterlaceBlendLinear_TMPL(), deInterlaceInterpolateLinear_TMPL(), dering_TMPL(), doVertDefFilter_TMPL(), doVertLowPass_TMPL(), tempNoiseReducer_TMPL(), and vertX1Filter_TMPL().
Definition at line 52 of file postprocess_template.c.
Referenced by do_a_deblock_TMPL(), doVertDefFilter_TMPL(), and vertClassify_TMPL().
Definition at line 43 of file postprocess_template.c.
Referenced by do_a_deblock_TMPL(), doVertDefFilter_TMPL(), and vertClassify_TMPL().
#define PREV |
Referenced by do_a_deblock_TMPL().
#define REAL_DEINT_CUBIC | ( | a, | |
b, | |||
c, | |||
d, | |||
e | |||
) |
#define REAL_DEINT_FF | ( | a, | |
b, | |||
c, | |||
d | |||
) |
#define REAL_FIND_MIN_MAX | ( | addr | ) |
#define REAL_L2_DIFF_CORE | ( | a, | |
b | |||
) |
Definition at line 36 of file postprocess_template.c.
#define REAL_SCALED_CPY | ( | src1, | |
src2, | |||
dst1, | |||
dst2 | |||
) |
#define REAL_SIMPLE_CPY | ( | src1, | |
src2, | |||
dst1, | |||
dst2 | |||
) |
#define SCALED_CPY | ( | src1, | |
src2, | |||
dst1, | |||
dst2 | |||
) | REAL_SCALED_CPY(src1, src2, dst1, dst2) |
Referenced by blockCopy_TMPL().
#define SIMPLE_CPY | ( | src1, | |
src2, | |||
dst1, | |||
dst2 | |||
) | REAL_SIMPLE_CPY(src1, src2, dst1, dst2) |
Referenced by blockCopy_TMPL().
|
inlinestatic |
Copy a block from src to dst and fixes the blacklevel.
levelFix == 0 -> do not touch the brighness & contrast
Definition at line 3016 of file postprocess_template.c.
|
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 1695 of file postprocess_template.c.
|
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 1515 of file postprocess_template.c.
|
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 1451 of file postprocess_template.c.
|
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 1398 of file postprocess_template.c.
|
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 1594 of file postprocess_template.c.
|
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 1796 of file postprocess_template.c.
Definition at line 1044 of file postprocess_template.c.
|
static |
accurate deblock filter
Definition at line 2471 of file postprocess_template.c.
Definition at line 486 of file postprocess_template.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.
Definition at line 181 of file postprocess_template.c.
|
inlinestatic |
Duplicate the given 8 src pixels ? times upward.
Definition at line 3144 of file postprocess_template.c.
|
static |
Filter array of bytes (Y or U or V values)
Definition at line 3169 of file postprocess_template.c.
|
inlinestatic |
Definition at line 2082 of file postprocess_template.c.
|
inlinestatic |
Transpose and shift the given 8x8 Block into dst1 and dst2.
Definition at line 1917 of file postprocess_template.c.
|
inlinestatic |
Transpose the given 8x8 block.
Definition at line 2002 of file postprocess_template.c.
|
inlinestatic |
Check if the middle 8x8 Block in the given 8x16 block is flat.
Definition at line 64 of file postprocess_template.c.
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.