FFmpeg
|
#include "config.h"
#include "libavutil/avutil.h"
#include "libavutil/avassert.h"
#include "libavutil/cpu.h"
#include "libavutil/intreadwrite.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 "libavutil/ppc/util_altivec.h"
#include "postprocess_template.c"
Go to the source code of this file.
Macros | |
#define | GET_MODE_BUFFER_SIZE 500 |
#define | OPTIONS_ARRAY_SIZE 10 |
#define | BLOCK_SIZE 8 |
#define | TEMP_STRIDE 8 |
#define | TEMPLATE_PP_C 1 |
Typedefs | |
typedef void(* | pp_fn) (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) |
Functions | |
DECLARE_ASM_CONST (8, int, deringThreshold) | |
static int | isHorizDC_C (const uint8_t src[], int stride, const PPContext *c) |
Check if the given 8x8 Block is mostly "flat". More... | |
static int | isVertDC_C (const uint8_t src[], int stride, const PPContext *c) |
Check if the middle 8x8 Block in the given 8x16 block is flat. More... | |
static int | isHorizMinMaxOk_C (const uint8_t src[], int stride, int QP) |
static int | isVertMinMaxOk_C (const uint8_t src[], int stride, int QP) |
static int | horizClassify_C (const uint8_t src[], int stride, const PPContext *c) |
static int | vertClassify_C (const uint8_t src[], int stride, const PPContext *c) |
static void | doHorizDefFilter_C (uint8_t dst[], int stride, const PPContext *c) |
static void | doHorizLowPass_C (uint8_t dst[], int stride, const 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) More... | |
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. More... | |
static av_always_inline void | do_a_deblock_C (uint8_t *src, int step, int stride, const PPContext *c, int mode) |
accurate deblock filter More... | |
static void | postProcess (const uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height, const int8_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. More... | |
void | pp_free_mode (pp_mode *mode) |
static void | reallocAlign (void **p, int size) |
static void | reallocBuffers (PPContext *c, int width, int height, int stride, int qpStride) |
static const char * | context_to_name (void *ptr) |
av_cold pp_context * | pp_get_context (int width, int height, int cpuCaps) |
av_cold 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 int8_t *QP_store, int QPStride, pp_mode *vm, void *vc, int pict_type) |
Variables | |
static const struct PPFilter | filters [] |
static const char *const | replaceTable [] |
const char | pp_help [] |
a simple help text More... | |
static const AVClass | av_codec_context_class = { "Postproc", context_to_name, NULL } |
postprocessing.
Definition in file postprocess.c.
#define GET_MODE_BUFFER_SIZE 500 |
Definition at line 93 of file postprocess.c.
#define OPTIONS_ARRAY_SIZE 10 |
Definition at line 94 of file postprocess.c.
#define BLOCK_SIZE 8 |
Definition at line 95 of file postprocess.c.
#define TEMP_STRIDE 8 |
Definition at line 96 of file postprocess.c.
#define TEMPLATE_PP_C 1 |
Definition at line 498 of file postprocess.c.
typedef void(* pp_fn) (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) |
Definition at line 519 of file postprocess.c.
DECLARE_ASM_CONST | ( | 8 | , |
int | , | ||
deringThreshold | |||
) |
Check if the given 8x8 Block is mostly "flat".
Definition at line 154 of file postprocess.c.
Referenced by horizClassify_C().
Check if the middle 8x8 Block in the given 8x16 block is flat.
Definition at line 177 of file postprocess.c.
Referenced by vertClassify_C().
Definition at line 199 of file postprocess.c.
Referenced by horizClassify_C().
Definition at line 215 of file postprocess.c.
Referenced by vertClassify_C().
Definition at line 228 of file postprocess.c.
Definition at line 237 of file postprocess.c.
Definition at line 246 of file postprocess.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)
Definition at line 285 of file postprocess.c.
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 325 of file postprocess.c.
Referenced by postProcess_TMPL().
|
static |
accurate deblock filter
Definition at line 382 of file postprocess.c.
|
inlinestatic |
Definition at line 522 of file postprocess.c.
Referenced by pp_postprocess().
|
static |
Definition at line 796 of file postprocess.c.
Referenced by reallocBuffers().
|
static |
Definition at line 801 of file postprocess.c.
Referenced by pp_get_context(), and pp_postprocess().
|
static |
Definition at line 828 of file postprocess.c.
|
static |
Definition at line 113 of file postprocess.c.
Referenced by pp_get_mode_by_name_and_quality().
|
static |
Definition at line 138 of file postprocess.c.
Referenced by pp_get_mode_by_name_and_quality().
Definition at line 832 of file postprocess.c.
Referenced by pp_get_context().