FFmpeg
Data Structures | Macros | Functions | Variables
vf_pp.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "filters.h"
#include "qp_table.h"
#include "video.h"
#include "libpostproc/postprocess.h"

Go to the source code of this file.

Data Structures

struct  PPFilterContext
 

Macros

#define OFFSET(x)   offsetof(PPFilterContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (pp)
 
static av_cold int pp_init (AVFilterContext *ctx)
 
static int pp_process_command (AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
 
static int pp_config_props (AVFilterLink *inlink)
 
static int pp_filter_frame (AVFilterLink *inlink, AVFrame *inbuf)
 
static av_cold void pp_uninit (AVFilterContext *ctx)
 

Variables

static const AVOption pp_options []
 
static enum AVPixelFormat pix_fmts []
 
static const AVFilterPad pp_inputs []
 
const AVFilter ff_vf_pp
 

Detailed Description

libpostproc filter, ported from MPlayer.

Definition in file vf_pp.c.

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(PPFilterContext, x)

Definition at line 45 of file vf_pp.c.

◆ FLAGS

Definition at line 46 of file vf_pp.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( pp  )

◆ pp_init()

static av_cold int pp_init ( AVFilterContext ctx)
static

Definition at line 54 of file vf_pp.c.

◆ pp_process_command()

static int pp_process_command ( AVFilterContext ctx,
const char *  cmd,
const char *  args,
char *  res,
int  res_len,
int  flags 
)
static

Definition at line 68 of file vf_pp.c.

◆ pp_config_props()

static int pp_config_props ( AVFilterLink inlink)
static

Definition at line 91 of file vf_pp.c.

◆ pp_filter_frame()

static int pp_filter_frame ( AVFilterLink inlink,
AVFrame inbuf 
)
static

Definition at line 117 of file vf_pp.c.

◆ pp_uninit()

static av_cold void pp_uninit ( AVFilterContext ctx)
static

Definition at line 159 of file vf_pp.c.

Variable Documentation

◆ pp_options

const AVOption pp_options[]
static
Initial value:
= {
{ "subfilters", "set postprocess subfilters", OFFSET(subfilters), AV_OPT_TYPE_STRING, {.str="de"}, .flags = FLAGS },
{ NULL }
}

Definition at line 47 of file vf_pp.c.

◆ pix_fmts

enum AVPixelFormat pix_fmts[]
static

◆ pp_inputs

const AVFilterPad pp_inputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = pp_config_props,
.filter_frame = pp_filter_frame,
},
}

Definition at line 170 of file vf_pp.c.

◆ ff_vf_pp

const AVFilter ff_vf_pp
Initial value:
= {
.name = "pp",
.description = NULL_IF_CONFIG_SMALL("Filter video using libpostproc."),
.priv_size = sizeof(PPFilterContext),
.process_command = pp_process_command,
.priv_class = &pp_class,
}

Definition at line 179 of file vf_pp.c.

pp_config_props
static int pp_config_props(AVFilterLink *inlink)
Definition: vf_pp.c:91
FILTER_PIXFMTS_ARRAY
#define FILTER_PIXFMTS_ARRAY(array)
Definition: filters.h:242
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
AV_PIX_FMT_YUV440P
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
Definition: pixfmt.h:106
ff_video_default_filterpad
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
Definition: video.c:37
AV_PIX_FMT_YUVJ422P
@ AV_PIX_FMT_YUVJ422P
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
Definition: pixfmt.h:86
pp_inputs
static const AVFilterPad pp_inputs[]
Definition: vf_pp.c:170
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:73
pp_init
static av_cold int pp_init(AVFilterContext *ctx)
Definition: vf_pp.c:54
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
AV_PIX_FMT_YUVJ444P
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
Definition: pixfmt.h:87
NULL
#define NULL
Definition: coverity.c:32
AV_PIX_FMT_YUVJ420P
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
Definition: pixfmt.h:85
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:81
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:94
FLAGS
#define FLAGS
Definition: vf_pp.c:46
AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:182
uninit
static void uninit(AVBSFContext *ctx)
Definition: pcm_rechunk.c:68
OFFSET
#define OFFSET(x)
Definition: vf_pp.c:45
AV_PIX_FMT_YUVJ440P
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
Definition: pixfmt.h:107
PPFilterContext
Definition: vf_pp.c:37
pp_process_command
static int pp_process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: vf_pp.c:68
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:72
AV_PIX_FMT_YUV444P
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:78
AV_PIX_FMT_GBRP
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
Definition: pixfmt.h:165
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_PIX_FMT_YUV422P
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:77
pp_uninit
static av_cold void pp_uninit(AVFilterContext *ctx)
Definition: vf_pp.c:159
AV_PIX_FMT_YUV411P
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition: pixfmt.h:80
pp_filter_frame
static int pp_filter_frame(AVFilterLink *inlink, AVFrame *inbuf)
Definition: vf_pp.c:117
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: vf_pp.c:80
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
Definition: opt.h:276