FFmpeg
Loading...
Searching...
No Matches
ocio_wrapper.hpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2026 Sam Richards
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#pragma once
22#include <stdint.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28typedef void *OCIOHandle;
29
30// Create an OCIO processor for Display/View transform.
31// Returns NULL on failure.
33 const char *config_path,
34 const char *input_color_space,
35 const char *display,
36 const char *view, int inverse,
38
39// Create an OCIO processor for output colorspace transform.
40// Returns NULL on failure.
43 const char *config_path,
44 const char *input_color_space,
45 const char *output_color_space,
47
48// Create an OCIO processor for file transform.
49// Returns NULL on failure.
51 const char *file_transform,
52 int inverse);
53
54// Finalize OCIO processor for given bit depth.
55// is_half_float: true for half-float, false for float
56int ocio_finalize_processor(AVFilterContext *ctx, OCIOHandle handle, int input_format,
57 int output_format);
58
59// Apply processor to planar float RGB(A).
60// pixels: pointer to float samples
61// w,h: image dimensions
62// channels: 3 or 4
63// stride_bytes: bytes between row starts (use 0 for tightly packed)
65 int y_start, int height);
66
67// Destroy OCIO processor.
69
70#ifdef __cplusplus
71}
72#endif
SwsAArch64OpImplParams params
Definition ops.c:51
inverse
static AVFormatContext * ctx
static char * output_format
Definition ffprobe.c:145
static int output_frame(H264Context *h, AVFrame *dst, H264Picture *srcp)
Definition h264dec.c:860
void ocio_destroy_processor(AVFilterContext *ctx, OCIOHandle handle)
OCIOHandle ocio_create_display_view_processor(AVFilterContext *ctx, const char *config_path, const char *input_color_space, const char *display, const char *view, int inverse, AVDictionary *params)
OCIOHandle ocio_create_output_colorspace_processor(AVFilterContext *ctx, const char *config_path, const char *input_color_space, const char *output_color_space, AVDictionary *params)
int ocio_finalize_processor(AVFilterContext *ctx, OCIOHandle handle, int input_format, int output_format)
OCIOHandle ocio_create_file_transform_processor(AVFilterContext *ctx, const char *file_transform, int inverse)
void * OCIOHandle
int ocio_apply(AVFilterContext *ctx, OCIOHandle handle, AVFrame *input_frame, AVFrame *output_frame, int y_start, int height)
An instance of a filter.
Definition avfilter.h:273
This structure describes decoded (raw) audio or video data.
Definition frame.h:472
#define height
Definition dsp.h:89