Go to the documentation of this file.
76 double var_values[
VARS_NB], res;
86 (
double)
inlink->sample_aspect_ratio.num /
inlink->sample_aspect_ratio.den : 1;
110 if (adjusted_aspect.
num && adjusted_aspect.
den) {
111 adjusted_aspect =
av_div_q(adjusted_aspect,
inlink->sample_aspect_ratio);
178 VAProcPipelineParameterBuffer params;
202 pad_ctx->
rect.x = pad_ctx->
x;
203 pad_ctx->
rect.y = pad_ctx->
y;
206 params.output_region = &pad_ctx->
rect;
208 params.output_background_color = (pad_ctx->
pad_rgba[3] << 24 |
238 #define OFFSET(x) offsetof(PadVAAPIContext, x)
239 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
276 .priv_class = &pad_vaapi_class,
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
void ff_vaapi_vpp_pipeline_uninit(AVFilterContext *avctx)
void ff_vaapi_vpp_ctx_init(AVFilterContext *avctx)
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 they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
int ff_vaapi_vpp_render_picture(AVFilterContext *avctx, VAProcPipelineParameterBuffer *params, AVFrame *output_frame)
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
AVRational av_div_q(AVRational b, AVRational c)
Divide one rational by another.
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define FILTER_INPUTS(array)
This structure describes decoded (raw) audio or video data.
const char * name
Filter name.
@ AV_OPT_TYPE_RATIONAL
Underlying C type is AVRational.
A link between two filters.
int ff_vaapi_vpp_query_formats(const AVFilterContext *avctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
void * priv
private data for use by the filter
A filter pad used for either input or output.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
enum AVPixelFormat output_format
static const char *const var_names[]
#define FILTER_OUTPUTS(array)
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 they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a link
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
Rational number (pair of numerator and denominator).
@ AV_OPT_TYPE_COLOR
Underlying C type is uint8_t[4].
AVFilterLink ** inputs
array of pointers to input links
int ff_vaapi_vpp_config_input(AVFilterLink *inlink)
void ff_vaapi_vpp_ctx_uninit(AVFilterContext *avctx)
static const AVOption pad_vaapi_options[]
static const AVFilterPad pad_vaapi_outputs[]
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
static av_cold int pad_vaapi_init(AVFilterContext *avctx)
AVFILTER_DEFINE_CLASS(pad_vaapi)
int(* init)(AVBSFContext *ctx)
const AVFilter ff_vf_pad_vaapi
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int av_expr_parse_and_eval(double *d, const char *s, const char *const *const_names, const double *const_values, const char *const *func1_names, double(*const *funcs1)(void *, double), const char *const *func2_names, double(*const *funcs2)(void *, double, double), void *opaque, int log_offset, void *log_ctx)
Parse and evaluate an expression.
AVFilterContext * src
source filter
static int output_frame(H264Context *h, AVFrame *dst, H264Picture *srcp)
static int pad_vaapi_config_output(AVFilterLink *outlink)
static void uninit(AVBSFContext *ctx)
int w
agreed upon image width
#define FILTER_QUERY_FUNC2(func)
const char * name
Pad name.
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
AVBufferRef * hw_frames_ctx
For hwaccel-format frames, this should be a reference to the AVHWFramesContext describing the frame.
int ff_vaapi_vpp_config_output(AVFilterLink *outlink)
int h
agreed upon image height
void(* pipeline_uninit)(AVFilterContext *avctx)
static const AVFilterPad pad_vaapi_inputs[]
@ 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...
static int pad_vaapi_filter_frame(AVFilterLink *link, AVFrame *input_frame)
int ff_vaapi_vpp_init_params(AVFilterContext *avctx, VAProcPipelineParameterBuffer *params, const AVFrame *input_frame, AVFrame *output_frame)
AVFilterLink ** outputs
array of pointers to output links