FFmpeg
|
#include "libavutil/emms.h"
#include "libavutil/imgutils.h"
#include "libavutil/common.h"
#include "libavutil/mem.h"
#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "filters.h"
#include "gradfun.h"
#include "video.h"
Go to the source code of this file.
Macros | |
#define | OFFSET(x) offsetof(GradFunContext, x) |
#define | FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
Functions | |
void | ff_gradfun_filter_line_c (uint8_t *dst, const uint8_t *src, const uint16_t *dc, int width, int thresh, const uint16_t *dithers) |
void | ff_gradfun_blur_line_c (uint16_t *dc, uint16_t *buf, const uint16_t *buf1, const uint8_t *src, int src_linesize, int width) |
static void | filter (GradFunContext *ctx, uint8_t *dst, const uint8_t *src, int width, int height, int dst_linesize, int src_linesize, int r) |
static av_cold int | init (AVFilterContext *ctx) |
static av_cold void | uninit (AVFilterContext *ctx) |
static int | config_input (AVFilterLink *inlink) |
static int | filter_frame (AVFilterLink *inlink, AVFrame *in) |
AVFILTER_DEFINE_CLASS (gradfun) | |
Variables | |
static const uint16_t | dither [8][8] |
static enum AVPixelFormat | pix_fmts [] |
static const AVOption | gradfun_options [] |
static const AVFilterPad | avfilter_vf_gradfun_inputs [] |
const AVFilter | ff_vf_gradfun |
gradfun debanding filter, ported from MPlayer libmpcodecs/vf_gradfun.c
Apply a boxblur debanding algorithm (based on the gradfun2db AviSynth filter by prunedtree). For each pixel, if it is within the threshold of the blurred value, make it closer. So now we have a smoothed and higher bitdepth version of all the shallow gradients, while leaving detailed areas untouched. Dither it back to 8bit.
Definition in file vf_gradfun.c.
#define OFFSET | ( | x | ) | offsetof(GradFunContext, x) |
Definition at line 220 of file vf_gradfun.c.
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
Definition at line 221 of file vf_gradfun.c.
void ff_gradfun_filter_line_c | ( | uint8_t * | dst, |
const uint8_t * | src, | ||
const uint16_t * | dc, | ||
int | width, | ||
int | thresh, | ||
const uint16_t * | dithers | ||
) |
Definition at line 58 of file vf_gradfun.c.
Referenced by init().
void ff_gradfun_blur_line_c | ( | uint16_t * | dc, |
uint16_t * | buf, | ||
const uint16_t * | buf1, | ||
const uint8_t * | src, | ||
int | src_linesize, | ||
int | width | ||
) |
Definition at line 72 of file vf_gradfun.c.
Referenced by init().
|
static |
Definition at line 83 of file vf_gradfun.c.
Referenced by filter_frame().
|
static |
Definition at line 125 of file vf_gradfun.c.
|
static |
Definition at line 144 of file vf_gradfun.c.
|
static |
Definition at line 159 of file vf_gradfun.c.
|
static |
Definition at line 178 of file vf_gradfun.c.
AVFILTER_DEFINE_CLASS | ( | gradfun | ) |
|
static |
Definition at line 47 of file vf_gradfun.c.
Referenced by filter().
|
static |
Definition at line 150 of file vf_gradfun.c.
|
static |
Definition at line 223 of file vf_gradfun.c.
|
static |
Definition at line 231 of file vf_gradfun.c.
const AVFilter ff_vf_gradfun |
Definition at line 240 of file vf_gradfun.c.