FFmpeg
Loading...
Searching...
No Matches
ocio_wrapper.cpp File Reference
#include <OpenColorIO/OpenColorIO.h>
#include <exception>
#include "formats.h"
#include "ocio_wrapper.hpp"
#include <libavutil/frame.h>
#include <libavutil/pixdesc.h>
#include <libavutil/dict.h>

Go to the source code of this file.

Data Structures

struct  OCIOState
 

Functions

static OCIO::BitDepth get_ocio_depth (int format)
 
static OCIO::ConstContextRcPtr add_context_params (OCIO::ConstConfigRcPtr config, 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)
 
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_file_transform_processor (AVFilterContext *ctx, const char *file_transform, int inverse)
 
int ocio_finalize_processor (AVFilterContext *ctx, OCIOHandle handle, int input_format, int output_format)
 
static OCIO::ImageDesc * AVFrame2ImageDescSlice (AVFrame *frame, int y_start, int height)
 
int ocio_apply (AVFilterContext *ctx, OCIOHandle handle, AVFrame *input_frame, AVFrame *output_frame, int y_start, int height)
 
void ocio_destroy_processor (AVFilterContext *ctx, OCIOHandle handle)
 

Function Documentation

◆ get_ocio_depth()

static OCIO::BitDepth get_ocio_depth ( int format)
static

Definition at line 43 of file ocio_wrapper.cpp.

Referenced by AVFrame2ImageDescSlice(), and ocio_finalize_processor().

◆ add_context_params()

static OCIO::ConstContextRcPtr add_context_params ( OCIO::ConstConfigRcPtr config,
AVDictionary * params )
static

◆ ocio_create_output_colorspace_processor()

OCIOHandle ocio_create_output_colorspace_processor ( AVFilterContext * ctx,
const char * config_path,
const char * input_color_space,
const char * output_color_space,
AVDictionary * params )

Definition at line 99 of file ocio_wrapper.cpp.

Referenced by init().

◆ ocio_create_display_view_processor()

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 )

Definition at line 137 of file ocio_wrapper.cpp.

Referenced by init().

◆ ocio_create_file_transform_processor()

OCIOHandle ocio_create_file_transform_processor ( AVFilterContext * ctx,
const char * file_transform,
int inverse )

Definition at line 183 of file ocio_wrapper.cpp.

Referenced by init().

◆ ocio_finalize_processor()

int ocio_finalize_processor ( AVFilterContext * ctx,
OCIOHandle handle,
int input_format,
int output_format )

Definition at line 214 of file ocio_wrapper.cpp.

Referenced by config_props().

◆ AVFrame2ImageDescSlice()

static OCIO::ImageDesc * AVFrame2ImageDescSlice ( AVFrame * frame,
int y_start,
int height )
static

Definition at line 236 of file ocio_wrapper.cpp.

Referenced by ocio_apply().

◆ ocio_apply()

int ocio_apply ( AVFilterContext * ctx,
OCIOHandle handle,
AVFrame * input_frame,
AVFrame * output_frame,
int y_start,
int height )

Definition at line 275 of file ocio_wrapper.cpp.

Referenced by ocio_filter_slice().

◆ ocio_destroy_processor()

void ocio_destroy_processor ( AVFilterContext * ctx,
OCIOHandle handle )

Definition at line 309 of file ocio_wrapper.cpp.

Referenced by uninit().