Go to the documentation of this file.
32 #define DENOISE_MAX 64
33 #define DENOISE_DEFAULT 0
36 #define SHARPNESS_MIN 0
37 #define SHARPNESS_MAX 64
38 #define SHARPNESS_DEFAULT 44
52 static float map(
int x,
int in_min,
int in_max,
float out_min,
float out_max)
56 slope = 1.0 * (out_max - out_min) / (in_max - in_min);
57 output = out_min + slope * (
x - in_min);
70 uint32_t num_caps = 1;
72 VAProcFilterParameterBuffer
denoise;
75 VAProcFilterNoiseReduction,
77 if (vas != VA_STATUS_SUCCESS) {
79 "context: %d (%s).\n", vas, vaErrorStr(vas));
83 denoise.type = VAProcFilterNoiseReduction;
86 caps.range.max_value);
88 VAProcFilterParameterBufferType,
100 uint32_t num_caps = 1;
102 VAProcFilterParameterBuffer sharpness;
105 VAProcFilterSharpening,
107 if (vas != VA_STATUS_SUCCESS) {
109 "context: %d (%s).\n", vas, vaErrorStr(vas));
113 sharpness.type = VAProcFilterSharpening;
114 sharpness.value =
map(
ctx->sharpness,
116 caps.range.min_value,
117 caps.range.max_value);
119 VAProcFilterParameterBufferType,
120 &sharpness,
sizeof(sharpness), 1);
129 VAProcPipelineParameterBuffer params;
202 #define DOFFSET(x) offsetof(DenoiseVAAPIContext, x)
203 #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM)
205 {
"denoise",
"denoise level",
210 #define SOFFSET(x) offsetof(SharpnessVAAPIContext, x)
212 {
"sharpness",
"sharpness level",
240 .
name =
"denoise_vaapi",
248 .priv_class = &denoise_vaapi_class,
253 .
name =
"sharpness_vaapi",
261 .priv_class = &sharpness_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)
static av_cold int init(AVCodecContext *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)
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
static av_cold int sharpness_vaapi_init(AVFilterContext *avctx)
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce output
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
AVFILTER_DEFINE_CLASS(denoise_vaapi)
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
static int sharpness_vaapi_build_filter_params(AVFilterContext *avctx)
This structure describes decoded (raw) audio or video data.
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
VADisplay display
The VADisplay handle, to be filled by the user.
static int denoise_vaapi_build_filter_params(AVFilterContext *avctx)
const char * name
Filter name.
A link between two filters.
static const AVOption denoise_vaapi_options[]
static const AVOption sharpness_vaapi_options[]
int(* build_filter_params)(AVFilterContext *avctx)
void * priv
private data for use by the filter
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo x
A filter pad used for either input or output.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define SHARPNESS_DEFAULT
static const AVFilterPad outputs[]
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
enum AVPixelFormat output_format
int ff_vaapi_vpp_make_param_buffers(AVFilterContext *avctx, int type, const void *data, size_t size, int count)
AVVAAPIDeviceContext * hwctx
static av_cold int denoise_vaapi_init(AVFilterContext *avctx)
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
AVFilter ff_vf_denoise_vaapi
int ff_vaapi_vpp_config_input(AVFilterLink *inlink)
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
void ff_vaapi_vpp_ctx_uninit(AVFilterContext *avctx)
int ff_vaapi_vpp_query_formats(AVFilterContext *avctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static int misc_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames,...
static float map(int x, int in_min, int in_max, float out_min, float out_max)
static int output_frame(H264Context *h, AVFrame *dst, H264Picture *srcp)
static const AVFilterPad misc_vaapi_outputs[]
VABufferID filter_buffers[VAProcFilterCount]
static const AVFilterPad misc_vaapi_inputs[]
const char * name
Pad name.
AVFilter ff_vf_sharpness_vaapi
int ff_vaapi_vpp_config_output(AVFilterLink *outlink)
void(* pipeline_uninit)(AVFilterContext *avctx)
static int query_formats(AVFilterContext *ctx)
static av_cold int uninit(AVCodecContext *avctx)
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
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