Go to the source code of this file.
|
static av_cold int | cudascale_init (AVFilterContext *ctx) |
|
static av_cold void | cudascale_uninit (AVFilterContext *ctx) |
|
static av_cold int | init_hwframe_ctx (CUDAScaleContext *s, AVBufferRef *device_ctx, int width, int height) |
|
static int | format_is_supported (enum AVPixelFormat fmt) |
|
static av_cold void | set_format_info (AVFilterContext *ctx, enum AVPixelFormat in_format, enum AVPixelFormat out_format) |
|
static av_cold int | init_processing_chain (AVFilterContext *ctx, int in_width, int in_height, int out_width, int out_height) |
|
static av_cold int | cudascale_load_functions (AVFilterContext *ctx) |
|
static av_cold int | cudascale_config_props (AVFilterLink *outlink) |
|
static int | call_resize_kernel (AVFilterContext *ctx, CUfunction func, CUtexObject src_tex[4], int src_left, int src_top, int src_width, int src_height, AVFrame *out_frame, int dst_width, int dst_height, int dst_pitch) |
|
static int | scalecuda_resize (AVFilterContext *ctx, AVFrame *out, AVFrame *in) |
|
static int | cudascale_scale (AVFilterContext *ctx, AVFrame *out, AVFrame *in) |
|
static int | cudascale_filter_frame (AVFilterLink *link, AVFrame *in) |
|
static AVFrame * | cudascale_get_video_buffer (AVFilterLink *inlink, int w, int h) |
|
◆ DIV_UP
#define DIV_UP |
( |
|
a, |
|
|
|
b |
|
) |
| ( ((a) + (b) - 1) / (b) ) |
◆ BLOCKX
◆ BLOCKY
◆ CHECK_CU
◆ OFFSET
◆ FLAGS
◆ anonymous enum
Enumerator |
---|
INTERP_ALGO_DEFAULT | |
INTERP_ALGO_NEAREST | |
INTERP_ALGO_BILINEAR | |
INTERP_ALGO_BICUBIC | |
INTERP_ALGO_LANCZOS | |
INTERP_ALGO_COUNT | |
Definition at line 61 of file vf_scale_cuda.c.
◆ cudascale_init()
◆ cudascale_uninit()
◆ init_hwframe_ctx()
◆ format_is_supported()
◆ set_format_info()
◆ init_processing_chain()
static av_cold int init_processing_chain |
( |
AVFilterContext * |
ctx, |
|
|
int |
in_width, |
|
|
int |
in_height, |
|
|
int |
out_width, |
|
|
int |
out_height |
|
) |
| |
|
static |
◆ cudascale_load_functions()
◆ cudascale_config_props()
◆ call_resize_kernel()
static int call_resize_kernel |
( |
AVFilterContext * |
ctx, |
|
|
CUfunction |
func, |
|
|
CUtexObject |
src_tex[4], |
|
|
int |
src_left, |
|
|
int |
src_top, |
|
|
int |
src_width, |
|
|
int |
src_height, |
|
|
AVFrame * |
out_frame, |
|
|
int |
dst_width, |
|
|
int |
dst_height, |
|
|
int |
dst_pitch |
|
) |
| |
|
static |
◆ scalecuda_resize()
◆ cudascale_scale()
◆ cudascale_filter_frame()
◆ cudascale_get_video_buffer()
◆ supported_formats
◆ options
Initial value:= {
{
"passthrough",
"Do not process frames at all if parameters match",
OFFSET(passthrough),
AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1,
FLAGS },
{
"force_original_aspect_ratio",
"decrease or increase w/h if necessary to keep the original AR",
OFFSET(force_original_aspect_ratio),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2,
FLAGS, .unit =
"force_oar" },
{
"force_divisible_by",
"enforce that the output resolution is divisible by a defined integer when force_original_aspect_ratio is used",
OFFSET(force_divisible_by),
AV_OPT_TYPE_INT, { .i64 = 1 }, 1, 256,
FLAGS },
}
Definition at line 596 of file vf_scale_cuda.c.
◆ cudascale_class
Initial value:= {
.class_name = "cudascale",
}
Definition at line 615 of file vf_scale_cuda.c.
◆ cudascale_inputs
Initial value:= {
{
.name = "default",
},
}
Definition at line 622 of file vf_scale_cuda.c.
◆ cudascale_outputs
Initial value:= {
{
.name = "default",
},
}
Definition at line 631 of file vf_scale_cuda.c.
◆ ff_vf_scale_cuda
static const AVOption options[]
@ AV_PIX_FMT_CUDA
HW acceleration through CUDA.
static av_cold int cudascale_init(AVFilterContext *ctx)
static av_cold void cudascale_uninit(AVFilterContext *ctx)
#define FILTER_INPUTS(array)
static const AVClass cudascale_class
static av_cold int cudascale_config_props(AVFilterLink *outlink)
#define AV_PIX_FMT_YUV444P16
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample format(the sample packing is implied by the sample format) and sample rate. The lists are not just lists
#define AV_PIX_FMT_0BGR32
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define FILTER_OUTPUTS(array)
#define LIBAVUTIL_VERSION_INT
const char * av_default_item_name(void *ptr)
Return the context name.
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
static const AVFilterPad cudascale_inputs[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
@ AV_OPT_TYPE_FLOAT
Underlying C type is float.
@ AV_PIX_FMT_NV12
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
#define AV_PIX_FMT_0RGB32
static AVFrame * cudascale_get_video_buffer(AVFilterLink *inlink, int w, int h)
@ AV_OPT_TYPE_INT
Underlying C type is int.
@ AV_OPT_TYPE_PIXEL_FMT
Underlying C type is enum AVPixelFormat.
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
static const AVFilterPad cudascale_outputs[]
static int cudascale_filter_frame(AVFilterLink *link, AVFrame *in)
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
#define SCALE_CUDA_PARAM_DEFAULT
@ 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...
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
#define FILTER_SINGLE_PIXFMT(pix_fmt_)