Go to the documentation of this file.
25 #include <libplacebo/renderer.h>
26 #include <libplacebo/utils/libav.h>
27 #include <libplacebo/vulkan.h>
184 av_log(log_ctx, av_lev,
"%s\n", msg);
190 const struct pl_hook *hook;
192 hook = pl_mpv_user_shader_parse(
s->gpu, shader,
len);
198 s->hooks[
s->num_hooks++] = hook;
203 const struct pl_filter_config **opt,
206 const struct pl_filter_preset *
preset;
207 if (!strcmp(
name,
"help")) {
232 s->log = pl_log_create(PL_API_VER, pl_log_params(
241 if (
s->out_format_string) {
245 s->out_format_string);
278 hwctx = avhwctx->
hwctx;
281 s->vulkan = pl_vulkan_import(
s->log, pl_vulkan_import_params(
282 .instance = hwctx->
inst,
290 .index = hwctx->queue_family_index,
291 .count = hwctx->nb_graphics_queues,
294 .index = hwctx->queue_family_comp_index,
295 .count = hwctx->nb_comp_queues,
298 .index = hwctx->queue_family_tx_index,
299 .count = hwctx->nb_tx_queues,
302 .max_api_version = VK_API_VERSION_1_2,
312 s->gpu =
s->vulkan->gpu;
313 s->renderer = pl_renderer_create(
s->log,
s->gpu);
316 if (
s->shader_bin_len)
319 if (
s->shader_path &&
s->shader_path[0]) {
336 pl_tex_destroy(
s->gpu, &
s->tex[
i]);
337 for (
int i = 0;
i <
s->num_hooks;
i++)
338 pl_mpv_user_shader_destroy(&
s->hooks[
i]);
339 pl_renderer_destroy(&
s->renderer);
340 pl_vulkan_destroy(&
s->vulkan);
341 pl_log_destroy(&
s->log);
350 struct pl_render_params params;
351 enum pl_tone_map_mode tonemapping_mode =
s->tonemapping_mode;
353 enum pl_gamut_mode gamut_mode =
s->gamut_mode;
354 struct pl_frame image, target;
355 ok = pl_map_avframe_ex(
s->gpu, &image, pl_avframe_params(
358 .map_dovi =
s->apply_dovi,
362 ok &= pl_map_avframe_ex(
s->gpu, &target, pl_avframe_params(
367 ok &= pl_frame_recreate_from_avframe(
s->gpu, &target,
s->tex + 4,
out);
375 if (!
s->apply_filmgrain)
376 image.film_grain.type = PL_FILM_GRAIN_NONE;
378 if (
s->target_sar.num) {
379 float aspect = pl_rect2df_aspect(&target.crop) *
av_q2d(
s->target_sar);
380 pl_rect2df_aspect_set(&target.crop, aspect,
s->pad_crop_ratio);
384 if (!tonemapping_mode && (
s->desat_str >= 0.0f ||
s->desat_exp >= 0.0f)) {
385 float str =
s->desat_str < 0.0f ? 0.9f :
s->desat_str;
386 float exp =
s->desat_exp < 0.0f ? 0.2f :
s->desat_exp;
388 tonemapping_mode = PL_TONE_MAP_RGB;
389 }
else if (
str > 0.1
f) {
390 tonemapping_mode = PL_TONE_MAP_HYBRID;
392 tonemapping_mode = PL_TONE_MAP_LUMA;
396 if (
s->gamut_warning)
397 gamut_mode = PL_GAMUT_WARN;
398 if (
s->gamut_clipping)
399 gamut_mode = PL_GAMUT_DESATURATE;
402 params = (
struct pl_render_params) {
404 .lut_entries =
s->lut_entries,
405 .antiringing_strength =
s->antiringing,
407 .deband_params = !
s->deband ?
NULL : pl_deband_params(
408 .iterations =
s->deband_iterations,
409 .threshold =
s->deband_threshold,
410 .radius =
s->deband_radius,
411 .grain =
s->deband_grain,
414 .sigmoid_params =
s->sigmoid ? &pl_sigmoid_default_params :
NULL,
416 .color_adjustment = &(
struct pl_color_adjustment) {
417 .brightness =
s->brightness,
418 .contrast =
s->contrast,
419 .saturation =
s->saturation,
424 .peak_detect_params = !
s->peakdetect ?
NULL : pl_peak_detect_params(
425 .smoothing_period =
s->smoothing,
426 .minimum_peak =
s->min_peak,
427 .scene_threshold_low =
s->scene_low,
428 .scene_threshold_high =
s->scene_high,
429 .overshoot_margin =
s->overshoot,
432 .color_map_params = pl_color_map_params(
434 .gamut_mode = gamut_mode,
436 .tone_mapping_param =
s->tonemapping_param,
437 .tone_mapping_mode = tonemapping_mode,
438 .inverse_tone_mapping =
s->inverse_tonemapping,
439 .tone_mapping_crosstalk =
s->crosstalk,
440 .lut_size =
s->tonemapping_lut_size,
443 .dither_params =
s->dithering < 0 ?
NULL : pl_dither_params(
444 .method =
s->dithering,
445 .lut_size =
s->dither_lut_size,
446 .temporal =
s->dither_temporal,
449 .cone_params = !
s->cones ?
NULL : pl_cone_params(
451 .strength =
s->cone_str,
455 .num_hooks =
s->num_hooks,
457 .skip_anti_aliasing =
s->skip_aa,
458 .polar_cutoff =
s->polar_cutoff,
459 .disable_linear_scaling =
s->disable_linear,
460 .disable_builtin_scalers =
s->disable_builtin,
461 .force_icc_lut =
s->force_icc_lut,
462 .force_dither =
s->force_dither,
463 .disable_fbos =
s->disable_fbos,
469 pl_render_image(
s->renderer, &image, &target, ¶ms);
470 pl_unmap_avframe(
s->gpu, &image);
473 pl_unmap_avframe(
s->gpu, &target);
474 }
else if (!pl_download_avframe(
s->gpu, &target,
out)) {
480 pl_gpu_flush(
s->gpu);
484 pl_unmap_avframe(
s->gpu, &image);
485 pl_unmap_avframe(
s->gpu, &target);
491 int err, changed_csp;
505 out->width = outlink->
w;
506 out->height = outlink->
h;
516 if (
s->colorspace >= 0)
517 out->colorspace =
s->colorspace;
518 if (
s->color_range >= 0)
519 out->color_range =
s->color_range;
520 if (
s->color_trc >= 0)
521 out->color_trc =
s->color_trc;
522 if (
s->color_primaries >= 0)
523 out->color_primaries =
s->color_primaries;
535 if (
s->apply_dovi || changed_csp) {
539 if (
s->apply_filmgrain)
573 if (!pl_test_pixfmt(
s->gpu,
pixfmt))
586 }
else if (
pixfmt ==
s->out_format) {
596 if (!infmts || !outfmts) {
612 if (outfmts && !outfmts->refcount)
626 s->vkctx.input_format =
inlink->format;
642 &outlink->
w, &outlink->
h));
645 s->force_original_aspect_ratio,
646 s->force_divisible_by);
649 if (
inlink->sample_aspect_ratio.num)
652 if (
s->normalize_sar) {
655 s->target_sar = scale_sar;
660 if (
inlink->sample_aspect_ratio.num)
667 s->vkctx.output_width = outlink->
w;
668 s->vkctx.output_height = outlink->
h;
671 s->vkctx.output_format =
s->vkctx.input_format;
673 s->vkctx.output_format =
s->out_format;
678 vkfc->
usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
686 #define OFFSET(x) offsetof(LibplaceboContext, x)
687 #define STATIC (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)
688 #define DYNAMIC (STATIC | AV_OPT_FLAG_RUNTIME_PARAM)
694 {
"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,
STATIC,
"force_oar" },
698 {
"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,
STATIC },
700 {
"pad_crop_ratio",
"ratio between padding and cropping when normalizing SAR (0=pad, 1=crop)",
OFFSET(pad_crop_ratio),
AV_OPT_TYPE_FLOAT, {.dbl=0.0}, 0.0, 1.0,
DYNAMIC },
727 {
"auto",
"keep the same color primaries", 0,
AV_OPT_TYPE_CONST, {.i64=-1}, INT_MIN, INT_MAX,
STATIC,
"color_primaries"},
743 {
"auto",
"keep the same color transfer", 0,
AV_OPT_TYPE_CONST, {.i64=-1}, INT_MIN, INT_MAX,
STATIC,
"color_trc"},
788 {
"relative",
"Relative colorimetric", 0,
AV_OPT_TYPE_CONST, {.i64 = PL_INTENT_RELATIVE_COLORIMETRIC}, 0, 0,
STATIC,
"intent" },
789 {
"absolute",
"Absolute colorimetric", 0,
AV_OPT_TYPE_CONST, {.i64 = PL_INTENT_ABSOLUTE_COLORIMETRIC}, 0, 0,
STATIC,
"intent" },
790 {
"saturation",
"Saturation mapping", 0,
AV_OPT_TYPE_CONST, {.i64 = PL_INTENT_SATURATION}, 0, 0,
STATIC,
"intent" },
791 {
"gamut_mode",
"Gamut-mapping mode",
OFFSET(gamut_mode),
AV_OPT_TYPE_INT, {.i64 = PL_GAMUT_CLIP}, 0, PL_GAMUT_MODE_COUNT - 1,
DYNAMIC,
"gamut_mode" },
792 {
"clip",
"Hard-clip gamut boundary", 0,
AV_OPT_TYPE_CONST, {.i64 = PL_GAMUT_CLIP}, 0, 0,
STATIC,
"gamut_mode" },
793 {
"warn",
"Highlight out-of-gamut colors", 0,
AV_OPT_TYPE_CONST, {.i64 = PL_GAMUT_WARN}, 0, 0,
STATIC,
"gamut_mode" },
794 {
"darken",
"Darken image to fit gamut", 0,
AV_OPT_TYPE_CONST, {.i64 = PL_GAMUT_DARKEN}, 0, 0,
STATIC,
"gamut_mode" },
795 {
"desaturate",
"Colorimetrically desaturate colors", 0,
AV_OPT_TYPE_CONST, {.i64 = PL_GAMUT_DESATURATE}, 0, 0,
STATIC,
"gamut_mode" },
799 #if PL_API_VER >= 246
811 {
"tonemapping_param",
"Tunable parameter for some tone-mapping functions",
OFFSET(tonemapping_param),
AV_OPT_TYPE_FLOAT, {.dbl = 0.0}, 0.0, 100.0, .flags =
DYNAMIC },
812 {
"tonemapping_mode",
"Tone-mapping mode",
OFFSET(tonemapping_mode),
AV_OPT_TYPE_INT, {.i64 = PL_TONE_MAP_AUTO}, 0, PL_TONE_MAP_MODE_COUNT - 1,
DYNAMIC,
"tonemap_mode" },
813 {
"auto",
"Automatic selection", 0,
AV_OPT_TYPE_CONST, {.i64 = PL_TONE_MAP_AUTO}, 0, 0,
STATIC,
"tonemap_mode" },
816 {
"hybrid",
"Hybrid of Luma/RGB", 0,
AV_OPT_TYPE_CONST, {.i64 = PL_TONE_MAP_HYBRID}, 0, 0,
STATIC,
"tonemap_mode" },
818 {
"inverse_tonemapping",
"Inverse tone mapping (range expansion)",
OFFSET(inverse_tonemapping),
AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1,
DYNAMIC },
827 {
"dithering",
"Dither method to use",
OFFSET(dithering),
AV_OPT_TYPE_INT, {.i64 = PL_DITHER_BLUE_NOISE}, -1, PL_DITHER_METHOD_COUNT - 1,
DYNAMIC,
"dither" },
831 {
"ordered_fixed",
"Fixed function ordered", 0,
AV_OPT_TYPE_CONST, {.i64 = PL_DITHER_ORDERED_FIXED}, 0, 0,
STATIC,
"dither" },
850 {
"force_icc_lut",
"Force the use of a full ICC 3DLUT for color mapping",
OFFSET(force_icc_lut),
AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1,
DYNAMIC },
876 .
name =
"libplacebo",
885 .priv_class = &libplacebo_class,
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
enum AVColorTransferCharacteristic color_trc
void * hwctx
The format-specific data, allocated and freed by libavutil along with this context.
enum AVPixelFormat out_format
VkPhysicalDevice phys_dev
Physical device.
#define AV_LOG_WARNING
Something somehow does not look correct.
enum AVColorRange color_range
MPEG vs JPEG YUV range.
AVPixelFormat
Pixel format.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
@ AVCOL_PRI_EBU3213
EBU Tech. 3213-E (nothing there) / one of JEDEC P22 group phosphors.
static int libplacebo_query_format(AVFilterContext *ctx)
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
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
#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.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
uint8_t * data
The data buffer.
@ AVCOL_TRC_LINEAR
"Linear transfer characteristics"
@ AV_FRAME_DATA_DOVI_METADATA
Parsed Dolby Vision metadata, suitable for passing to a software implementation.
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
@ AV_FRAME_DATA_FILM_GRAIN_PARAMS
Film grain parameters for a frame, described by AVFilmGrainParams.
enum AVColorPrimaries color_primaries
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
enum AVColorSpace colorspace
YUV colorspace type.
This structure describes decoded (raw) audio or video data.
@ AVCOL_TRC_NB
Not part of ABI.
PFN_vkGetInstanceProcAddr get_proc_addr
Pointer to the instance-provided vkGetInstanceProcAddr loading function.
@ AVCOL_RANGE_JPEG
Full range content.
static void pl_av_log(void *log_ctx, enum pl_log_level level, const char *msg)
@ AVCOL_SPC_NB
Not part of ABI.
#define FILTER_QUERY_FUNC(func)
const AVPixFmtDescriptor * av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)
Iterate over all pixel format descriptors known to libavutil.
@ AV_FRAME_DATA_DOVI_RPU_BUFFER
Dolby Vision RPU raw data, suitable for passing to x265 or other libraries.
VkInstance inst
Vulkan instance.
#define AV_LOG_VERBOSE
Detailed information.
@ AVCOL_SPC_RGB
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB), YZX and ST 428-1
int ff_scale_eval_dimensions(void *log_ctx, const char *w_expr, const char *h_expr, AVFilterLink *inlink, AVFilterLink *outlink, int *ret_w, int *ret_h)
Parse and evaluate string expressions for width and height.
@ AVCOL_TRC_BT2020_12
ITU-R BT2020 for 12-bit system.
AVBufferRef * hw_device_ctx
For filters which will create hardware frames, sets the device the filter should create them in.
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
static int process_frames(AVFilterContext *avctx, AVFrame *out, AVFrame *in)
void ff_vk_uninit(FFVulkanContext *s)
Frees the main Vulkan context.
const char * name
Filter name.
A link between two filters.
@ AVCOL_SPC_BT2020_CL
ITU-R BT2020 constant luminance system.
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
@ AV_HWDEVICE_TYPE_VULKAN
static int libplacebo_config_output(AVFilterLink *outlink)
@ AVCOL_SPC_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
@ AV_OPT_TYPE_BINARY
offset must point to a pointer immediately followed by an int for the length
@ AVCOL_TRC_IEC61966_2_1
IEC 61966-2-1 (sRGB or sYCC)
int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, int log_offset, void *log_ctx)
Read the file with name filename, and put its content in a newly allocated buffer or map it with mmap...
void * priv
private data for use by the filter
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
@ AVCOL_RANGE_NB
Not part of ABI.
@ AVCOL_TRC_GAMMA28
also ITU-R BT470BG
Allocated as AVHWFramesContext.hwctx, used to set pool-specific options.
static int find_scaler(AVFilterContext *avctx, const struct pl_filter_config **opt, const char *name)
static int filter_frame(AVFilterLink *link, AVFrame *in)
@ AVCOL_TRC_GAMMA22
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
A filter pad used for either input or output.
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define FF_ARRAY_ELEMS(a)
const AVFilter ff_vf_libplacebo
@ AVCOL_PRI_NB
Not part of ABI.
int force_original_aspect_ratio
@ AVCOL_TRC_BT1361_ECG
ITU-R BT1361 Extended Colour Gamut.
@ AVCOL_SPC_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above
static int init_vulkan(AVFilterContext *avctx)
static double av_q2d(AVRational a)
Convert an AVRational to a double.
static const AVFilterPad libplacebo_inputs[]
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
int(* init)(AVBSFContext *ctx)
static void libplacebo_uninit(AVFilterContext *avctx)
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
@ AVCOL_PRI_SMPTE428
SMPTE ST 428-1 (CIE 1931 XYZ)
static const struct pl_tone_map_function *const tonemapping_funcs[TONE_MAP_COUNT]
const char * av_hwdevice_get_type_name(enum AVHWDeviceType type)
Get the string name of an AVHWDeviceType.
@ AVCOL_PRI_SMPTE240M
identical to above, also called "SMPTE C" even though it uses D65
#define FILTER_INPUTS(array)
void av_file_unmap(uint8_t *bufptr, size_t size)
Unmap or free the buffer bufptr created by av_file_map().
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
@ AVCOL_PRI_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
@ AVCOL_PRI_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
int av_log_get_level(void)
Get the current log level.
Main Vulkan context, allocated as AVHWDeviceContext.hwctx.
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
int nb_enabled_dev_extensions
Rational number (pair of numerator and denominator).
@ AVCOL_TRC_IEC61966_2_4
IEC 61966-2-4.
AVFilterLink ** inputs
array of pointers to input links
@ AVCOL_PRI_BT709
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP 177 Annex B
int ff_vk_filter_config_output(AVFilterLink *outlink)
@ AV_FRAME_DATA_MASTERING_DISPLAY_METADATA
Mastering display metadata associated with a video frame.
VkImageUsageFlagBits usage
Defines extra usage of output frames.
@ AVCOL_TRC_BT2020_10
ITU-R BT2020 for 10-bit system.
@ AVCOL_SPC_YCGCO
used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16
uint64_t flags
Combination of AV_PIX_FMT_FLAG_...
@ AVCOL_RANGE_UNSPECIFIED
static int parse_shader(AVFilterContext *avctx, const void *shader, size_t len)
static int libplacebo_config_input(AVFilterLink *inlink)
@ AVCOL_PRI_BT2020
ITU-R BT2020.
static const AVColorPrimariesDesc color_primaries[AVCOL_PRI_NB]
@ AVCOL_TRC_SMPTE2084
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems.
@ AVCOL_PRI_SMPTE431
SMPTE ST 431-2 (2011) / DCI P3.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
@ AVCOL_PRI_FILM
colour filters using Illuminant C
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
AVFILTER_DEFINE_CLASS(libplacebo)
int format
agreed upon media format
static const AVOption libplacebo_options[]
AVFilterContext * src
source filter
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type)
Remove and free all side data instances of the given type.
#define AVERROR_EXTERNAL
Generic error in an external library.
enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc)
#define AV_LOG_INFO
Standard information.
@ AVCOL_TRC_BT709
also ITU-R BT1361
const VkFormat * av_vkfmt_from_pixfmt(enum AVPixelFormat p)
Returns the format of each image up to the number of planes for a given sw_format.
@ AVCOL_SPC_SMPTE240M
derived from 170M primaries and D65 white point, 170M is derived from BT470 System M's primaries
static enum pl_log_level get_log_level(void)
@ AV_FRAME_DATA_CONTENT_LIGHT_LEVEL
Content light level (based on CTA-861.3).
#define i(width, name, range_min, range_max)
@ AVCOL_SPC_BT2020_NCL
ITU-R BT2020 non-constant luminance system.
int w
agreed upon image width
AVBufferRef * hw_frames_ctx
For hwaccel pixel formats, this should be a reference to the AVHWFramesContext describing the frames.
#define AV_PIX_FMT_FLAG_BE
Pixel format is big-endian.
const char * name
Pad name.
@ AVCOL_RANGE_MPEG
Narrow or limited range content.
This struct describes a set or pool of "hardware" frames (i.e.
@ AVCOL_PRI_BT470M
also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
#define AV_LOG_FATAL
Something went wrong and recovery is not possible.
enum AVPixelFormat pixfmt
enum AVHWDeviceType type
This field identifies the underlying API used for hardware access.
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 the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
void * hwctx
The format-specific data, allocated and freed automatically along with this context.
int ff_scale_adjust_dimensions(AVFilterLink *inlink, int *ret_w, int *ret_h, int force_original_aspect_ratio, int force_divisible_by)
Transform evaluated width and height obtained from ff_scale_eval_dimensions into actual target width ...
enum AVPixelFormat av_get_pix_fmt(const char *name)
Return the pixel format corresponding to name.
@ AVCOL_TRC_ARIB_STD_B67
ARIB STD-B67, known as "Hybrid log-gamma".
int h
agreed upon image height
static const AVFilterPad libplacebo_outputs[]
@ AVCOL_TRC_SMPTE170M
also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
AVRational av_mul_q(AVRational b, AVRational c)
Multiply two rationals.
const char *const * enabled_dev_extensions
Enabled device extensions.
int ff_vk_filter_config_input(AVFilterLink *inlink)
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
VkDevice act_dev
Active device.
@ AVCOL_PRI_SMPTE432
SMPTE ST 432-1 (2010) / P3 D65 / Display P3.
#define FILTER_OUTPUTS(array)
static av_cold int uninit(AVCodecContext *avctx)
#define AVERROR_EXIT
Immediate exit was requested; the called function should not be restarted.
VkPhysicalDeviceFeatures2 device_features
This structure should be set to the set of features that present and enabled during device creation.
static int libplacebo_init(AVFilterContext *avctx)
@ AVCOL_SPC_BT709
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / derived in SMPTE RP 177 Annex B
@ AVCOL_SPC_ICTCP
ITU-R BT.2100-0, ICtCp.
const struct pl_hook * hooks[2]
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.
static void log_cb(cmsContext ctx, cmsUInt32Number error, const char *str)
#define AV_OPT_FLAG_DEPRECATED
set if option is deprecated, users should refer to AVOption.help text for more information