FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_hwmap.c File Reference
#include "libavutil/buffer.h"
#include "libavutil/hwcontext.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  HWMapContext
 

Macros

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

Functions

static int hwmap_query_formats (AVFilterContext *avctx)
 
static int hwmap_config_output (AVFilterLink *outlink)
 
static AVFramehwmap_get_buffer (AVFilterLink *inlink, int w, int h)
 
static int hwmap_filter_frame (AVFilterLink *link, AVFrame *input)
 
static av_cold void hwmap_uninit (AVFilterContext *avctx)
 
 AVFILTER_DEFINE_CLASS (hwmap)
 

Variables

static const AVOption hwmap_options []
 
static const AVFilterPad hwmap_inputs []
 
static const AVFilterPad hwmap_outputs []
 
AVFilter ff_vf_hwmap
 

Macro Definition Documentation

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

Definition at line 279 of file vf_hwmap.c.

Definition at line 280 of file vf_hwmap.c.

Function Documentation

static int hwmap_query_formats ( AVFilterContext avctx)
static

Definition at line 40 of file vf_hwmap.c.

static int hwmap_config_output ( AVFilterLink outlink)
static

Definition at line 53 of file vf_hwmap.c.

static AVFrame* hwmap_get_buffer ( AVFilterLink inlink,
int  w,
int  h 
)
static

Definition at line 172 of file vf_hwmap.c.

static int hwmap_filter_frame ( AVFilterLink link,
AVFrame input 
)
static

Definition at line 211 of file vf_hwmap.c.

static av_cold void hwmap_uninit ( AVFilterContext avctx)
static

Definition at line 271 of file vf_hwmap.c.

AVFILTER_DEFINE_CLASS ( hwmap  )

Variable Documentation

const AVOption hwmap_options[]
static
Initial value:
= {
{ "mode", "Frame mapping mode",
0, INT_MAX, FLAGS, "mode" },
{ "read", "Mapping should be readable",
INT_MIN, INT_MAX, FLAGS, "mode" },
{ "write", "Mapping should be writeable",
INT_MIN, INT_MAX, FLAGS, "mode" },
{ "overwrite", "Mapping will always overwrite the entire frame",
INT_MIN, INT_MAX, FLAGS, "mode" },
{ "direct", "Mapping should not involve any copying",
INT_MIN, INT_MAX, FLAGS, "mode" },
{ NULL }
}
#define NULL
Definition: coverity.c:32
The mapped frame will be overwritten completely in subsequent operations, so the current frame data n...
Definition: hwcontext.h:454
The mapping must be writeable.
Definition: hwcontext.h:448
#define OFFSET(x)
Definition: vf_hwmap.c:279
#define FLAGS
Definition: vf_hwmap.c:280
The mapping must be readable.
Definition: hwcontext.h:444
The mapping must be direct.
Definition: hwcontext.h:460
mode
Use these values in ebur128_init (or'ed).
Definition: ebur128.h:83

Definition at line 281 of file vf_hwmap.c.

const AVFilterPad hwmap_inputs[]
static
Initial value:
= {
{
.name = "default",
.get_video_buffer = hwmap_get_buffer,
.filter_frame = hwmap_filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int hwmap_filter_frame(AVFilterLink *link, AVFrame *input)
Definition: vf_hwmap.c:211
static AVFrame * hwmap_get_buffer(AVFilterLink *inlink, int w, int h)
Definition: vf_hwmap.c:172

Definition at line 305 of file vf_hwmap.c.

const AVFilterPad hwmap_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = hwmap_config_output,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int hwmap_config_output(AVFilterLink *outlink)
Definition: vf_hwmap.c:53

Definition at line 315 of file vf_hwmap.c.

AVFilter ff_vf_hwmap
Initial value:
= {
.name = "hwmap",
.description = NULL_IF_CONFIG_SMALL("Map hardware frames"),
.uninit = hwmap_uninit,
.priv_size = sizeof(HWMapContext),
.priv_class = &hwmap_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
Definition: internal.h:393
static av_cold void hwmap_uninit(AVFilterContext *avctx)
Definition: vf_hwmap.c:271
static int hwmap_query_formats(AVFilterContext *avctx)
Definition: vf_hwmap.c:40
static const AVFilterPad hwmap_inputs[]
Definition: vf_hwmap.c:305
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
static const AVFilterPad hwmap_outputs[]
Definition: vf_hwmap.c:315
static int query_formats(AVFilterContext *ctx)
Definition: aeval.c:244

Definition at line 324 of file vf_hwmap.c.