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


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


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)


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 364 of file vf_hwmap.c.

Definition at line 365 of file vf_hwmap.c.

Function Documentation

static int hwmap_query_formats ( AVFilterContext avctx)

Definition at line 40 of file vf_hwmap.c.

static int hwmap_config_output ( AVFilterLink outlink)

Definition at line 53 of file vf_hwmap.c.

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

Definition at line 258 of file vf_hwmap.c.

static int hwmap_filter_frame ( AVFilterLink link,
AVFrame input 

Definition at line 297 of file vf_hwmap.c.

static av_cold void hwmap_uninit ( AVFilterContext avctx)

Definition at line 357 of file vf_hwmap.c.


Variable Documentation

const AVOption hwmap_options[]
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" },
{ "derive_device", "Derive a new device of this type",
OFFSET(derive_device_type), AV_OPT_TYPE_STRING,
{ .str = NULL }, 0, 0, FLAGS },
{ "reverse", "Map in reverse (create and allocate in the sink)",
{ .i64 = 0 }, 0, 1, FLAGS },
{ NULL }
#define NULL
Definition: coverity.c:32
The mapping must be readable.
Definition: hwcontext.h:501
static uint32_t reverse(uint32_t num, int bits)
Definition: speedhq.c:565
The mapping must be direct.
Definition: hwcontext.h:517
#define OFFSET(x)
Definition: vf_hwmap.c:364
#define FLAGS
Definition: vf_hwmap.c:365
The mapped frame will be overwritten completely in subsequent operations, so the current frame data n...
Definition: hwcontext.h:511
The mapping must be writeable.
Definition: hwcontext.h:505
Use these values in ebur128_init (or'ed).
Definition: ebur128.h:83

Definition at line 366 of file vf_hwmap.c.

const AVFilterPad hwmap_inputs[]
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:297
static AVFrame * hwmap_get_buffer(AVFilterLink *inlink, int w, int h)
Definition: vf_hwmap.c:258

Definition at line 397 of file vf_hwmap.c.

const AVFilterPad hwmap_outputs[]
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 407 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,
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
Definition: internal.h:385
static av_cold void hwmap_uninit(AVFilterContext *avctx)
Definition: vf_hwmap.c:357
static int hwmap_query_formats(AVFilterContext *avctx)
Definition: vf_hwmap.c:40
static const AVFilterPad hwmap_inputs[]
Definition: vf_hwmap.c:397
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:389
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:379
static const AVFilterPad hwmap_outputs[]
Definition: vf_hwmap.c:407
static int query_formats(AVFilterContext *ctx)
Definition: aeval.c:244

Definition at line 416 of file vf_hwmap.c.