#include <cuda.h>
#include <stdio.h>
#include <string.h>
#include "libavutil/avstring.h"
#include "libavutil/common.h"
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_cuda_internal.h"
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "scale.h"
#include "video.h"
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 int | cudascale_query_formats (AVFilterContext *ctx) |
|
static av_cold int | init_stage (CUDAScaleContext *s, AVBufferRef *device_ctx) |
|
static int | format_is_supported (enum AVPixelFormat fmt) |
|
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_config_props (AVFilterLink *outlink) |
|
static int | call_resize_kernel (CUDAScaleContext *s, CUfunction func, CUtexref tex, int channels, uint8_t *src_dptr, int src_width, int src_height, int src_pitch, uint8_t *dst_dptr, int dst_width, int dst_height, int dst_pitch, int pixel_size) |
|
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) |
|
#define DIV_UP |
( |
|
a, |
|
|
|
b |
|
) |
| ( ((a) + (b) - 1) / (b) ) |
#define ALIGN_UP |
( |
|
a, |
|
|
|
b |
|
) |
| (((a) + (b) - 1) & ~((b) - 1)) |
static int call_resize_kernel |
( |
CUDAScaleContext * |
s, |
|
|
CUfunction |
func, |
|
|
CUtexref |
tex, |
|
|
int |
channels, |
|
|
uint8_t * |
src_dptr, |
|
|
int |
src_width, |
|
|
int |
src_height, |
|
|
int |
src_pitch, |
|
|
uint8_t * |
dst_dptr, |
|
|
int |
dst_width, |
|
|
int |
dst_height, |
|
|
int |
dst_pitch, |
|
|
int |
pixel_size |
|
) |
| |
|
static |
Initial value:= {
}
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition at line 41 of file vf_scale_cuda.c.
Referenced by format_is_supported().
Initial value:= {
.class_name = "cudascale",
}
#define LIBAVUTIL_VERSION_INT
const char * av_default_item_name(void *ptr)
Return the context name.
static const AVOption options[]
Definition at line 516 of file vf_scale_cuda.c.
Initial value:= {
{
.name = "default",
},
}
static int cudascale_filter_frame(AVFilterLink *link, AVFrame *in)
Definition at line 523 of file vf_scale_cuda.c.
Initial value:= {
{
.name = "default",
},
}
static av_cold int cudascale_config_props(AVFilterLink *outlink)
Definition at line 532 of file vf_scale_cuda.c.
Initial value:= {
.name = "scale_cuda",
}
#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_outputs[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static const AVClass cudascale_class
static const AVFilterPad inputs[]
static const AVFilterPad outputs[]
static av_cold void cudascale_uninit(AVFilterContext *ctx)
static const AVFilterPad cudascale_inputs[]
static av_cold int cudascale_init(AVFilterContext *ctx)
static int cudascale_query_formats(AVFilterContext *ctx)
Definition at line 541 of file vf_scale_cuda.c.