HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DeepCompositing Class Reference

#include <ImfDeepCompositing.h>

Public Member Functions

IMF_EXPORT DeepCompositing ()
 
virtual IMF_EXPORT ~DeepCompositing ()
 
virtual IMF_EXPORT void composite_pixel (float outputs[], const float *inputs[], const char *channel_names[], int num_channels, int num_samples, int sources)
 
virtual IMF_EXPORT void sort (int order[], const float *inputs[], const char *channel_names[], int num_channels, int num_samples, int sources)
 

Detailed Description

Definition at line 24 of file ImfDeepCompositing.h.

Constructor & Destructor Documentation

IMF_EXPORT DeepCompositing::DeepCompositing ( )
virtual IMF_EXPORT DeepCompositing::~DeepCompositing ( )
virtual

Member Function Documentation

virtual IMF_EXPORT void DeepCompositing::composite_pixel ( float  outputs[],
const float inputs[],
const char *  channel_names[],
int  num_channels,
int  num_samples,
int  sources 
)
virtual

composite together the given channels

Parameters
outputs- return array of pixel values -
inputs- arrays of input sample
channel_names- array of channel names for corresponding channels
num_channels- number of active channels (3 or greater)
num_samples- number of values in all input arrays
sources- number of different sources

each array input has num_channels entries: outputs[n] should be the composited values in array inputs[n], whose name will be given by channel_names[n]

The channel ordering shall be as follows: Position Channel 0 Z 1 ZBack (if no ZBack, then inputs[1]==inputs[0] and channel_names[1]==channel_names[0]) 2 A (alpha channel) 3-n other channels - only channels in the frame buffer will appear here

since a Z and Alpha channel is required, and channel[1] is ZBack or another copy of Z there will always be 3 or more channels.

The default implementation calls sort() if and only if more than one source is active, composites all samples together using the Over operator from front to back, stopping as soon as a sample with alpha=1 is found It also blanks all outputs if num_samples==0

note - multiple threads may call composite_pixel simultaneously for different pixels

virtual IMF_EXPORT void DeepCompositing::sort ( int  order[],
const float inputs[],
const char *  channel_names[],
int  num_channels,
int  num_samples,
int  sources 
)
virtual

find the depth order for samples with given channel values does not sort the values in-place. Instead it populates array 'order' with the desired sorting order

the default operation sorts samples from front to back according to their Z channel

Parameters
order- required output order. order[n] shall be the nth closest sample
inputs- arrays of input samples, one array per channel_name
channel_names- array of channel names for corresponding channels
num_channels- number of channels (3 or greater)
num_samples- number of samples in each array
sources- number of different sources the data arises from

the channel layout is identical to composite_pixel()


The documentation for this class was generated from the following file: