#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"
Go to the source code of this file.
Defines | |
#define | GET_MODE_BUFFER_SIZE 500 |
#define | OPTIONS_ARRAY_SIZE 10 |
#define | BLOCK_SIZE 8 |
#define | TEMP_STRIDE 8 |
#define | HAVE_MMX 0 |
#define | HAVE_MMX2 0 |
#define | HAVE_AMD3DNOW 0 |
#define | HAVE_ALTIVEC 0 |
Functions | |
unsigned | postproc_version (void) |
Returns the LIBPOSTPROC_VERSION_INT constant. | |
DECLARE_ASM_CONST (8, int, deringThreshold) | |
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) |
returns a pp_mode or NULL if an error occurred name is the string after "-pp" on the command line quality is a number from 0 to PP_QUALITY_MAX | |
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 struct PPFilter | filters [] |
static const char * | replaceTable [] |
const char *const | pp_help |
a simple help text | |
static const AVClass | av_codec_context_class = { "Postproc", context_to_name, NULL } |
Definition in file postprocess.c.
#define BLOCK_SIZE 8 |
Definition at line 101 of file postprocess.c.
Referenced by doHorizDefFilter_C(), doHorizLowPass_C(), doVertLowPass_TMPL(), horizX1Filter(), isHorizDC_C(), isVertDC_C(), and isVertMinMaxOk_C().
#define GET_MODE_BUFFER_SIZE 500 |
#define HAVE_ALTIVEC 0 |
Definition at line 587 of file postprocess.c.
#define HAVE_AMD3DNOW 0 |
#define HAVE_MMX 0 |
#define HAVE_MMX2 0 |
Definition at line 583 of file postprocess.c.
#define OPTIONS_ARRAY_SIZE 10 |
#define TEMP_STRIDE 8 |
Definition at line 102 of file postprocess.c.
static const char* context_to_name | ( | void * | ptr | ) | [static] |
Definition at line 946 of file postprocess.c.
DECLARE_ASM_CONST | ( | 8 | , | |
int | , | |||
deringThreshold | ||||
) |
static av_always_inline void do_a_deblock_C | ( | uint8_t * | src, | |
int | step, | |||
int | stride, | |||
PPContext * | c | |||
) | [static] |
static void doHorizDefFilter_C | ( | uint8_t | dst[], | |
int | stride, | |||
PPContext * | c | |||
) | [inline, static] |
Definition at line 319 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 358 of file postprocess.c.
static int horizClassify_C | ( | uint8_t | src[], | |
int | stride, | |||
PPContext * | c | |||
) | [inline, static] |
Definition at line 295 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 398 of file postprocess.c.
Referenced by postProcess_TMPL().
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 189 of file postprocess.c.
Referenced by horizClassify_C().
static int isHorizMinMaxOk_C | ( | uint8_t | src[], | |
int | stride, | |||
int | QP | |||
) | [inline, static] |
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 212 of file postprocess.c.
Referenced by vertClassify_C().
static int isVertMinMaxOk_C | ( | uint8_t | src[], | |
int | stride, | |||
int | QP | |||
) | [inline, static] |
unsigned postproc_version | ( | void | ) |
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] |
CONFIG_RUNTIME_CPUDETECT
Definition at line 638 of file postprocess.c.
Referenced by pp_postprocess().
void pp_free_context | ( | void * | vc | ) |
Definition at line 975 of file postprocess.c.
void pp_free_mode | ( | pp_mode * | mode | ) |
Definition at line 910 of file postprocess.c.
pp_context* pp_get_context | ( | int | width, | |
int | height, | |||
int | cpuCaps | |||
) |
Definition at line 952 of file postprocess.c.
pp_mode* pp_get_mode_by_name_and_quality | ( | const char * | name, | |
int | quality | |||
) |
returns a pp_mode or NULL if an error occurred name is the string after "-pp" on the command line quality is a number from 0 to PP_QUALITY_MAX
Definition at line 735 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 996 of file postprocess.c.
static void reallocAlign | ( | void ** | p, | |
int | alignment, | |||
int | size | |||
) | [static] |
static void reallocBuffers | ( | PPContext * | c, | |
int | width, | |||
int | height, | |||
int | stride, | |||
int | qpStride | |||
) | [static] |
static int vertClassify_C | ( | uint8_t | src[], | |
int | stride, | |||
PPContext * | c | |||
) | [inline, static] |
Definition at line 307 of file postprocess.c.
const AVClass av_codec_context_class = { "Postproc", context_to_name, NULL } [static] |
Definition at line 950 of file postprocess.c.
Initial value:
{ {"hb", "hdeblock", 1, 1, 3, H_DEBLOCK}, {"vb", "vdeblock", 1, 2, 4, V_DEBLOCK}, {"h1", "x1hdeblock", 1, 1, 3, H_X1_FILTER}, {"v1", "x1vdeblock", 1, 2, 4, V_X1_FILTER}, {"ha", "ahdeblock", 1, 1, 3, H_A_DEBLOCK}, {"va", "avdeblock", 1, 2, 4, V_A_DEBLOCK}, {"dr", "dering", 1, 5, 6, DERING}, {"al", "autolevels", 0, 1, 2, LEVEL_FIX}, {"lb", "linblenddeint", 1, 1, 4, LINEAR_BLEND_DEINT_FILTER}, {"li", "linipoldeint", 1, 1, 4, LINEAR_IPOL_DEINT_FILTER}, {"ci", "cubicipoldeint", 1, 1, 4, CUBIC_IPOL_DEINT_FILTER}, {"md", "mediandeint", 1, 1, 4, MEDIAN_DEINT_FILTER}, {"fd", "ffmpegdeint", 1, 1, 4, FFMPEG_DEINT_FILTER}, {"l5", "lowpass5", 1, 1, 4, LOWPASS5_DEINT_FILTER}, {"tn", "tmpnoise", 1, 7, 8, TEMP_NOISE_FILTER}, {"fq", "forcequant", 1, 0, 0, FORCE_QUANT}, {NULL, NULL,0,0,0,0} }
Definition at line 119 of file postprocess.c.
const char* const pp_help |
const char* replaceTable[] [static] |
Initial value:
{ "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 142 of file postprocess.c.
Referenced by pp_get_mode_by_name_and_quality().