FFmpeg
Loading...
Searching...
No Matches
vf_scale_d3d12.c File Reference

Go to the source code of this file.

Data Structures

struct  ScaleD3D12Context
 

Macros

#define COBJMACROS
 This file is part of FFmpeg.
 
#define OFFSET(x)
 
#define FLAGS   (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)
 

Functions

static av_cold int scale_d3d12_init (AVFilterContext *ctx)
 
static void release_d3d12_resources (ScaleD3D12Context *s)
 
static DXGI_COLOR_SPACE_TYPE get_dxgi_colorspace (enum AVColorSpace colorspace, enum AVColorTransferCharacteristic trc, int is_10bit)
 
static AVRational get_input_framerate (AVFilterContext *ctx, AVFilterLink *inlink, AVFrame *in)
 
static int scale_d3d12_configure_processor (ScaleD3D12Context *s, AVFilterContext *ctx)
 
static int scale_d3d12_filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int scale_d3d12_config_props (AVFilterLink *outlink)
 
static av_cold void scale_d3d12_uninit (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (scale_d3d12)
 

Variables

static const AVFilterPad scale_d3d12_inputs []
 
static const AVFilterPad scale_d3d12_outputs []
 
static const AVOption scale_d3d12_options []
 
const FFFilter ff_vf_scale_d3d12
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

This file is part of FFmpeg.

FFmpeg is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

FFmpeg is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with FFmpeg; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Definition at line 19 of file vf_scale_d3d12.c.

◆ OFFSET

#define OFFSET ( x)
Value:

Definition at line 746 of file vf_scale_d3d12.c.

◆ FLAGS

Definition at line 747 of file vf_scale_d3d12.c.

Function Documentation

◆ scale_d3d12_init()

static av_cold int scale_d3d12_init ( AVFilterContext * ctx)
static

Definition at line 70 of file vf_scale_d3d12.c.

◆ release_d3d12_resources()

static void release_d3d12_resources ( ScaleD3D12Context * s)
static

Definition at line 74 of file vf_scale_d3d12.c.

Referenced by scale_d3d12_config_props(), and scale_d3d12_uninit().

◆ get_dxgi_colorspace()

static DXGI_COLOR_SPACE_TYPE get_dxgi_colorspace ( enum AVColorSpace colorspace,
enum AVColorTransferCharacteristic trc,
int is_10bit )
static

< HDR10

< HLG

< Rec.709 10-bit

< Default to Rec.709

Definition at line 128 of file vf_scale_d3d12.c.

Referenced by scale_d3d12_filter_frame().

◆ get_input_framerate()

static AVRational get_input_framerate ( AVFilterContext * ctx,
AVFilterLink * inlink,
AVFrame * in )
static

Definition at line 156 of file vf_scale_d3d12.c.

Referenced by scale_d3d12_filter_frame().

◆ scale_d3d12_configure_processor()

static int scale_d3d12_configure_processor ( ScaleD3D12Context * s,
AVFilterContext * ctx )
static

Definition at line 182 of file vf_scale_d3d12.c.

Referenced by scale_d3d12_filter_frame().

◆ scale_d3d12_filter_frame()

static int scale_d3d12_filter_frame ( AVFilterLink * inlink,
AVFrame * in )
static

< Increment reference count

Definition at line 360 of file vf_scale_d3d12.c.

◆ scale_d3d12_config_props()

static int scale_d3d12_config_props ( AVFilterLink * outlink)
static

Definition at line 601 of file vf_scale_d3d12.c.

◆ scale_d3d12_uninit()

static av_cold void scale_d3d12_uninit ( AVFilterContext * ctx)
static

Definition at line 718 of file vf_scale_d3d12.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( scale_d3d12 )

Variable Documentation

◆ scale_d3d12_inputs

const AVFilterPad scale_d3d12_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = scale_d3d12_filter_frame,
},
}
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
static int scale_d3d12_filter_frame(AVFilterLink *inlink, AVFrame *in)

Definition at line 730 of file vf_scale_d3d12.c.

◆ scale_d3d12_outputs

const AVFilterPad scale_d3d12_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = scale_d3d12_config_props,
},
}
static int scale_d3d12_config_props(AVFilterLink *outlink)

Definition at line 738 of file vf_scale_d3d12.c.

◆ scale_d3d12_options

const AVOption scale_d3d12_options[]
static
Initial value:
= {
{ "w", "Output video width", OFFSET(w_expr), AV_OPT_TYPE_STRING, {.str = "iw"}, .flags = FLAGS },
{ "h", "Output video height", OFFSET(h_expr), AV_OPT_TYPE_STRING, {.str = "ih"}, .flags = FLAGS },
{ "format", "Output video pixel format", OFFSET(format), AV_OPT_TYPE_PIXEL_FMT, { .i64 = AV_PIX_FMT_NONE }, INT_MIN, INT_MAX, .flags=FLAGS },
{ NULL }
}
static const char *const format[]
Definition af_aiir.c:444
#define FLAGS
Definition cmdutils.c:598
#define NULL
Definition coverity.c:32
#define OFFSET(x)
@ AV_OPT_TYPE_PIXEL_FMT
Underlying C type is enum AVPixelFormat.
Definition opt.h:306
@ 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:275
@ AV_PIX_FMT_NONE
Definition pixfmt.h:72

Definition at line 749 of file vf_scale_d3d12.c.

◆ ff_vf_scale_d3d12

const FFFilter ff_vf_scale_d3d12
Initial value:
= {
.p.name = "scale_d3d12",
.p.description = NULL_IF_CONFIG_SMALL("Scale video using Direct3D12"),
.priv_size = sizeof(ScaleD3D12Context),
.p.priv_class = &scale_d3d12_class,
.uninit = scale_d3d12_uninit,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}
#define AVFILTER_FLAG_HWDEVICE
The filter can create hardware frames using AVFilterContext.hw_device_ctx.
Definition avfilter.h:187
#define FILTER_INPUTS(array)
Definition filters.h:264
#define FILTER_OUTPUTS(array)
Definition filters.h:265
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
Definition filters.h:208
#define FILTER_SINGLE_PIXFMT(pix_fmt_)
Definition filters.h:254
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
@ AV_PIX_FMT_D3D12
Hardware surfaces for Direct3D 12.
Definition pixfmt.h:440
static const AVFilterPad scale_d3d12_inputs[]
static av_cold int scale_d3d12_init(AVFilterContext *ctx)
static av_cold void scale_d3d12_uninit(AVFilterContext *ctx)
static const AVFilterPad scale_d3d12_outputs[]

Definition at line 758 of file vf_scale_d3d12.c.