postprocessing. More...
#include "config.h"#include "libavutil/avutil.h"#include <inttypes.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "postprocess.h"#include "postprocess_internal.h"#include "libavutil/avstring.h"#include "postprocess_template.c"Go to the source code of this file.
Defines | |
| #define | LICENSE_PREFIX "libpostproc license: " |
| #define | GET_MODE_BUFFER_SIZE 500 |
| #define | OPTIONS_ARRAY_SIZE 10 |
| #define | BLOCK_SIZE 8 |
| #define | TEMP_STRIDE 8 |
| #define | COMPILE_C |
| #define | COMPILE_MMX |
| #define | COMPILE_MMX2 |
| #define | COMPILE_3DNOW |
| #define | HAVE_MMX 0 |
| #define | HAVE_MMX2 0 |
| #define | HAVE_AMD3DNOW 0 |
| #define | HAVE_ALTIVEC 0 |
| #define | RENAME(a) a ## _C |
| #define | HAVE_MMX 1 |
| #define | RENAME(a) a ## _MMX |
| #define | HAVE_MMX 1 |
| #define | HAVE_MMX2 1 |
| #define | RENAME(a) a ## _MMX2 |
| #define | HAVE_MMX 1 |
| #define | HAVE_MMX2 0 |
| #define | HAVE_AMD3DNOW 1 |
| #define | RENAME(a) a ## _3DNow |
Functions | |
| unsigned | postproc_version (void) |
| Return the LIBPOSTPROC_VERSION_INT constant. | |
| const char * | postproc_configuration (void) |
| Return the libpostproc build-time configuration. | |
| const char * | postproc_license (void) |
| Return the libpostproc license. | |
| DECLARE_ASM_CONST (DECLARE_ASM_CONST(8, DECLARE_ASM_CONST(uint64_t, w05) | |
| static void | prefetchnta (void *p) |
| static void | prefetcht0 (void *p) |
| static void | prefetcht1 (void *p) |
| static void | prefetcht2 (void *p) |
| static int | isHorizDC_C (uint8_t src[], int stride, PPContext *c) |
| Check if the given 8x8 Block is mostly "flat". | |
| static int | isVertDC_C (uint8_t src[], int stride, PPContext *c) |
| Check if the middle 8x8 Block in the given 8x16 block is flat. | |
| static int | isHorizMinMaxOk_C (uint8_t src[], int stride, int QP) |
| static int | isVertMinMaxOk_C (uint8_t src[], int stride, int QP) |
| static int | horizClassify_C (uint8_t src[], int stride, PPContext *c) |
| static int | vertClassify_C (uint8_t src[], int stride, PPContext *c) |
| static void | doHorizDefFilter_C (uint8_t dst[], int stride, PPContext *c) |
| static void | doHorizLowPass_C (uint8_t dst[], int stride, PPContext *c) |
| Do a horizontal low pass filter on the 10x8 block (dst points to middle 8x8 Block) using the 9-Tap Filter (1,1,2,2,4,2,2,1,1)/16 (C version). | |
| static void | horizX1Filter (uint8_t *src, int stride, int QP) |
| Experimental Filter 1 (Horizontal) 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 not identical with the vertical one. | |
| static av_always_inline void | do_a_deblock_C (uint8_t *src, int step, int stride, PPContext *c) |
| accurate deblock filter | |
| static void | postProcess (const uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height, const QP_STORE_T QPs[], int QPStride, int isColor, pp_mode *vm, pp_context *vc) |
| pp_mode * | pp_get_mode_by_name_and_quality (const char *name, int quality) |
| Return a pp_mode or NULL if an error occurred. | |
| void | pp_free_mode (pp_mode *mode) |
| static void | reallocAlign (void **p, int alignment, int size) |
| static void | reallocBuffers (PPContext *c, int width, int height, int stride, int qpStride) |
| static const char * | context_to_name (void *ptr) |
| pp_context * | pp_get_context (int width, int height, int cpuCaps) |
| void | pp_free_context (void *vc) |
| void | pp_postprocess (const uint8_t *src[3], const int srcStride[3], uint8_t *dst[3], const int dstStride[3], int width, int height, const QP_STORE_T *QP_store, int QPStride, pp_mode *vm, void *vc, int pict_type) |
Variables | |
| static const char * | replaceTable [] |
| const char | pp_help [] = "\n" |
| a simple help text | |
| static const AVClass | av_codec_context_class = { "Postproc", context_to_name, NULL } |
postprocessing.
Definition in file postprocess.c.
| #define BLOCK_SIZE 8 |
Definition at line 113 of file postprocess.c.
Referenced by isVertDC_C().
| #define COMPILE_3DNOW |
Definition at line 556 of file postprocess.c.
| #define COMPILE_C |
Definition at line 538 of file postprocess.c.
| #define COMPILE_MMX |
Definition at line 548 of file postprocess.c.
| #define COMPILE_MMX2 |
Definition at line 552 of file postprocess.c.
| #define GET_MODE_BUFFER_SIZE 500 |
Definition at line 111 of file postprocess.c.
Referenced by pp_get_mode_by_name_and_quality().
| #define HAVE_ALTIVEC 0 |
Definition at line 567 of file postprocess.c.
| #define HAVE_AMD3DNOW 1 |
Definition at line 611 of file postprocess.c.
| #define HAVE_AMD3DNOW 0 |
Definition at line 611 of file postprocess.c.
| #define HAVE_MMX 1 |
Definition at line 609 of file postprocess.c.
| #define HAVE_MMX 1 |
Definition at line 609 of file postprocess.c.
| #define HAVE_MMX 0 |
Definition at line 609 of file postprocess.c.
| #define HAVE_MMX 1 |
Definition at line 609 of file postprocess.c.
| #define HAVE_MMX2 1 |
Definition at line 610 of file postprocess.c.
| #define HAVE_MMX2 0 |
Definition at line 610 of file postprocess.c.
| #define HAVE_MMX2 0 |
Definition at line 610 of file postprocess.c.
| #define LICENSE_PREFIX "libpostproc license: " |
| #define OPTIONS_ARRAY_SIZE 10 |
Definition at line 112 of file postprocess.c.
Referenced by pp_get_mode_by_name_and_quality().
| #define RENAME | ( | a | ) | a ## _3DNow |
Definition at line 612 of file postprocess.c.
| #define RENAME | ( | a | ) | a ## _C |
Definition at line 612 of file postprocess.c.
| #define RENAME | ( | a | ) | a ## _MMX |
Definition at line 612 of file postprocess.c.
| #define RENAME | ( | a | ) | a ## _MMX2 |
Definition at line 612 of file postprocess.c.
| #define TEMP_STRIDE 8 |
Definition at line 114 of file postprocess.c.
| static const char* context_to_name | ( | void * | ptr | ) | [static] |
Definition at line 923 of file postprocess.c.
| DECLARE_ASM_CONST | ( | DECLARE_ASM_CONST( | 8, | |
| DECLARE_ASM_CONST( | uint64_t, | |||
| w05 | ||||
| ) | [pure virtual] |
Definition at line 118 of file postprocess.c.
| static av_always_inline void do_a_deblock_C | ( | uint8_t * | src, | |
| int | step, | |||
| int | stride, | |||
| PPContext * | c | |||
| ) | [static] |
accurate deblock filter
Definition at line 436 of file postprocess.c.
| static void doHorizDefFilter_C | ( | uint8_t | dst[], | |
| int | stride, | |||
| PPContext * | c | |||
| ) | [inline, static] |
Definition at line 299 of file postprocess.c.
| static void doHorizLowPass_C | ( | uint8_t | dst[], | |
| int | stride, | |||
| PPContext * | c | |||
| ) | [inline, static] |
Do a horizontal low pass filter on the 10x8 block (dst points to middle 8x8 Block) using the 9-Tap Filter (1,1,2,2,4,2,2,1,1)/16 (C version).
Definition at line 338 of file postprocess.c.
| static int horizClassify_C | ( | uint8_t | src[], | |
| int | stride, | |||
| PPContext * | c | |||
| ) | [inline, static] |
Definition at line 275 of file postprocess.c.
| static void horizX1Filter | ( | uint8_t * | src, | |
| int | stride, | |||
| int | QP | |||
| ) | [inline, static] |
Experimental Filter 1 (Horizontal) 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 not identical with the vertical one.
Definition at line 378 of file postprocess.c.
Referenced by postProcess_3DNow().
| static int isHorizDC_C | ( | uint8_t | src[], | |
| int | stride, | |||
| PPContext * | c | |||
| ) | [inline, static] |
Check if the given 8x8 Block is mostly "flat".
Definition at line 201 of file postprocess.c.
Referenced by horizClassify_C().
| static int isHorizMinMaxOk_C | ( | uint8_t | src[], | |
| int | stride, | |||
| int | QP | |||
| ) | [inline, static] |
Definition at line 246 of file postprocess.c.
Referenced by horizClassify_C().
| static int isVertDC_C | ( | uint8_t | src[], | |
| int | stride, | |||
| PPContext * | c | |||
| ) | [inline, static] |
Check if the middle 8x8 Block in the given 8x16 block is flat.
Definition at line 224 of file postprocess.c.
Referenced by vertClassify_C().
| static int isVertMinMaxOk_C | ( | uint8_t | src[], | |
| int | stride, | |||
| int | QP | |||
| ) | [inline, static] |
Definition at line 262 of file postprocess.c.
Referenced by vertClassify_C().
| const char* postproc_configuration | ( | void | ) |
Return the libpostproc build-time configuration.
Definition at line 96 of file postprocess.c.
| const char* postproc_license | ( | void | ) |
Return the libpostproc license.
Definition at line 101 of file postprocess.c.
| unsigned postproc_version | ( | void | ) |
Return the LIBPOSTPROC_VERSION_INT constant.
Definition at line 91 of file postprocess.c.
| static void postProcess | ( | const uint8_t | src[], | |
| int | srcStride, | |||
| uint8_t | dst[], | |||
| int | dstStride, | |||
| int | width, | |||
| int | height, | |||
| const QP_STORE_T | QPs[], | |||
| int | QPStride, | |||
| int | isColor, | |||
| pp_mode * | vm, | |||
| pp_context * | vc | |||
| ) | [inline, static] |
Definition at line 618 of file postprocess.c.
Referenced by pp_postprocess().
| void pp_free_context | ( | void * | vc | ) |
Definition at line 952 of file postprocess.c.
| void pp_free_mode | ( | pp_mode * | mode | ) |
Definition at line 887 of file postprocess.c.
| pp_context* pp_get_context | ( | int | width, | |
| int | height, | |||
| int | cpuCaps | |||
| ) |
Definition at line 929 of file postprocess.c.
| pp_mode* pp_get_mode_by_name_and_quality | ( | const char * | name, | |
| int | quality | |||
| ) |
Return a pp_mode or NULL if an error occurred.
| name | the string after "-pp" on the command line | |
| quality | a number from 0 to PP_QUALITY_MAX |
Definition at line 711 of file postprocess.c.
| void pp_postprocess | ( | const uint8_t * | src[3], | |
| const int | srcStride[3], | |||
| uint8_t * | dst[3], | |||
| const int | dstStride[3], | |||
| int | width, | |||
| int | height, | |||
| const QP_STORE_T * | QP_store, | |||
| int | QPStride, | |||
| pp_mode * | vm, | |||
| void * | vc, | |||
| int | pict_type | |||
| ) |
Definition at line 973 of file postprocess.c.
| static void prefetchnta | ( | void * | p | ) | [inline, static] |
Definition at line 166 of file postprocess.c.
| static void prefetcht0 | ( | void * | p | ) | [inline, static] |
Definition at line 173 of file postprocess.c.
| static void prefetcht1 | ( | void * | p | ) | [inline, static] |
Definition at line 180 of file postprocess.c.
| static void prefetcht2 | ( | void * | p | ) | [inline, static] |
Definition at line 187 of file postprocess.c.
| static void reallocAlign | ( | void ** | p, | |
| int | alignment, | |||
| int | size | |||
| ) | [static] |
Definition at line 891 of file postprocess.c.
Referenced by reallocBuffers().
| static void reallocBuffers | ( | PPContext * | c, | |
| int | width, | |||
| int | height, | |||
| int | stride, | |||
| int | qpStride | |||
| ) | [static] |
Definition at line 896 of file postprocess.c.
Referenced by pp_get_context(), and pp_postprocess().
| static int vertClassify_C | ( | uint8_t | src[], | |
| int | stride, | |||
| PPContext * | c | |||
| ) | [inline, static] |
Definition at line 287 of file postprocess.c.
const AVClass av_codec_context_class = { "Postproc", context_to_name, NULL } [static] |
Definition at line 927 of file postprocess.c.
| const char pp_help[] = "\n" |
a simple help text
Definition at line 667 of file postprocess.c.
const char* replaceTable[] [static] |
{
"default", "hb:a,vb:a,dr:a",
"de", "hb:a,vb:a,dr:a",
"fast", "h1:a,v1:a,dr:a",
"fa", "h1:a,v1:a,dr:a",
"ac", "ha:a:128:7,va:a,dr:a",
NULL
}
Definition at line 154 of file postprocess.c.
Referenced by pp_get_mode_by_name_and_quality().