Blackmagic RAW SDK User manual

Type
User manual
Developer Information
Blackmagic
RAW SDK
September 2020
Blackmagic RAW SDK
Contents
Introduction and Overview 8
1.0 API Overview 8
1.1 Decoder Overview 8
1.2 Sidecar 8
2.0 Interface Overview 10
2.2 Clip Object 10
2.3 Frame Object 11
3.0 SDK Operations and flow 11
3.1 Manual Decoders 11
4.0 GPU Configuration 11
4.1 Pipeline iterators 12
4.2 Pipeline device iterators 12
4.3 Pipeline preparation 12
4.4 Multi GPU Devices 12
Recommended UI Controls and Behavior 13
Custom Gamma Controls 14
Basic Types 17
BlackmagicRawVariantType 20
BlackmagicRawResourceType 20
BlackmagicRawResourceFormat 21
BlackmagicRawResourceUsage 21
BlackmagicRawPipeline 21
BlackmagicRawInstructionSet 21
BlackmagicRawAudioFormat 22
BlackmagicRawResolutionScale 22
BlackmagicRawClipProcessingAttribute 22
BlackmagicRawFrameProcessingAttribute 23
BlackmagicRawInterop 23
Interface Reference 24
IBlackmagicRaw Interface 24
IBlackmagicRaw::OpenClip method 24
IBlackmagicRaw::SetCallback method 25
IBlackmagicRaw::PreparePipeline method 25
2Contents
IBlackmagicRaw::PreparePipelineForDevice method 26
IBlackmagicRaw::FlushJobs method 26
IBlackmagicRawFactory Interface 26
IBlackmagicRawFactory::CreateCodec method 26
IBlackmagicRawFactory::CreatePipelineIterator method 27
IBlackmagicRawFactory::CreatePipelineDeviceIterator method 27
IBlackmagicRawPipelineIterator Interface 28
IBlackmagicRawPipelineIterator::Next method 28
IBlackmagicRawPipelineIterator::GetName method 28
IBlackmagicRawPipelineIterator::GetInterop method 28
IBlackmagicRawPipelineIterator::GetPipeline method 29
IBlackmagicRawPipelineDeviceIterator Interface 29
IBlackmagicRawPipelineDeviceIterator::Next method 29
IBlackmagicRawPipelineDeviceIterator::GetPipeline method 29
IBlackmagicRawPipelineDeviceIterator::GetInterop method 30
IBlackmagicRawPipelineDeviceIterator::CreateDevice method 30
IBlackmagicRawOpenGLInteropHelper Interface 30
IBlackmagicRawOpenGLInteropHelper::GetPreferredResourceFormat method 30
IBlackmagicRawOpenGLInteropHelper::SetImage method 31
IBlackmagicRawPipelineDevice Interface 31
IBlackmagicRawPipelineDevice::SetBestInstructionSet method 32
IBlackmagicRawPipelineDevice::SetInstructionSet method 32
IBlackmagicRawPipelineDevice::GetInstructionSet method 32
IBlackmagicRawPipelineDevice::GetIndex method 32
IBlackmagicRawPipelineDevice::GetName method 33
IBlackmagicRawPipelineDevice::GetInterop method 33
IBlackmagicRawPipelineDevice::GetPipeline method 33
IBlackmagicRawPipelineDevice::GetPipelineName method 34
IBlackmagicRawPipelineDevice::GetOpenGLInteropHelper method 34
IBlackmagicRawToneCurve Interface 34
IBlackmagicRawToneCurve::GetToneCurve method 35
IBlackmagicRawToneCurve::EvaluateToneCurve method 36
IBlackmagicRawConstants Interface 37
IBlackmagicRawConstants::GetClipProcessingAttributeRange method 37
IBlackmagicRawConstants::GetClipProcessingAttributeList method 38
IBlackmagicRawConstants::GetFrameProcessingAttributeRange method 38
IBlackmagicRawConstants::GetFrameProcessingAttributeList method 39
IBlackmagicRawConstants::GetISOListForAnalogGain method 40
3Contents
IBlackmagicRawConfiguration Interface 41
IBlackmagicRawConfiguration::SetPipeline method 41
IBlackmagicRawConfiguration::GetPipeline method 42
IBlackmagicRawConfiguration::IsPipelineSupported method 42
IBlackmagicRawConfiguration::SetCPUThreads method 43
IBlackmagicRawConfiguration::GetCPUThreads method 43
IBlackmagicRawConfiguration::GetMaxCPUThreadCount method 43
IBlackmagicRawConfiguration::SetWriteMetadataPerFrame method 44
IBlackmagicRawConfiguration::GetWriteMetadataPerFrame method 44
IBlackmagicRawConfiguration::SetFromDevice method 44
IBlackmagicRawConfigurationEx Interface 45
IBlackmagicRawConfigurationEx::GetResourceManager method 45
IBlackmagicRawConfigurationEx::SetResourceManager method 45
IBlackmagicRawConfigurationEx::GetInstructionSet method 46
IBlackmagicRawConfigurationEx::SetInstructionSet method 46
IBlackmagicRawResourceManager Interface 46
IBlackmagicRawResourceManager::CreateResource method 47
IBlackmagicRawResourceManager::ReleaseResource method 47
IBlackmagicRawResourceManager::CopyResource method 48
IBlackmagicRawResourceManager::GetResourceHostPointer method 48
IBlackmagicRawMetadataIterator Interface 49
IBlackmagicRawMetadataIterator::Next method 49
IBlackmagicRawMetadataIterator::GetKey method 49
IBlackmagicRawMetadataIterator::GetData method 49
IBlackmagicRawClipProcessingAttributes Interface 50
IBlackmagicRawClipProcessingAttributes::GetClipAttribute method 50
IBlackmagicRawClipProcessingAttributes::SetClipAttribute method 50
IBlackmagicRawClipProcessingAttributes::GetPost3DLUT method 51
IBlackmagicRawPost3DLUT Interface 51
IBlackmagicRawPost3DLUT::GetName method 51
IBlackmagicRawPost3DLUT::GetTitle method 52
IBlackmagicRawPost3DLUT::GetSize method 52
IBlackmagicRawPost3DLUT::GetResourceGPU method 52
IBlackmagicRawPost3DLUT::GetResourceCPU method 53
IBlackmagicRawPost3DLUT::GetResourceSizeBytes method 53
IBlackmagicRawFrameProcessingAttributes Interface 53
IBlackmagicRawFrameProcessingAttributes::GetFrameAttribute method 54
IBlackmagicRawFrameProcessingAttributes::SetFrameAttribute method 54
4Contents
IBlackmagicRawProcessedImage Interface 54
IBlackmagicRawProcessedImage::GetWidth method 55
IBlackmagicRawProcessedImage::GetHeight method 55
IBlackmagicRawProcessedImage::GetResource method 55
IBlackmagicRawProcessedImage::GetResourceType method 56
IBlackmagicRawProcessedImage::GetResourceFormat method 56
IBlackmagicRawProcessedImage::GetResourceSizeBytes method 56
IBlackmagicRawProcessedImage::GetResourceContextAndCommandQueue method 56
IBlackmagicRawJob Interface 57
IBlackmagicRawJob::Submit method 57
IBlackmagicRawJob::Abort method 58
IBlackmagicRawJob::SetUserData method 58
IBlackmagicRawJob::GetUserData method 58
IBlackmagicRawCallback Interface 59
IBlackmagicRawCallback::ReadComplete method 59
IBlackmagicRawCallback::DecodeComplete method 60
IBlackmagicRawCallback::ProcessComplete method 60
IBlackmagicRawCallback::TrimProgress method 60
IBlackmagicRawCallback::TrimComplete method 61
IBlackmagicRawCallback::SidecarMetadataParseWarning method 61
IBlackmagicRawCallback::SidecarMetadataParseError method 61
IBlackmagicRawCallback::PreparePipelineComplete method 62
IBlackmagicRawClipAudio Interface 62
IBlackmagicRawClipAudio::GetAudioFormat method 62
IBlackmagicRawClipAudio::GetAudioBitDepth method 63
IBlackmagicRawClipAudio::GetAudioChannelCount method 63
IBlackmagicRawClipAudio::GetAudioSampleRate method 63
IBlackmagicRawClipAudio::GetAudioSampleCount method 64
IBlackmagicRawClipAudio::GetAudioSamples method 64
IBlackmagicRawFrame Interface 65
IBlackmagicRawFrame::GetFrameIndex method 66
IBlackmagicRawFrame::GetTimecode method 66
IBlackmagicRawFrame::GetMetadataIterator method 66
IBlackmagicRawFrame::GetMetadata method 67
IBlackmagicRawFrame::SetMetadata method 67
IBlackmagicRawFrame::CloneFrameProcessingAttributes method 67
IBlackmagicRawFrame::SetResolutionScale method 68
IBlackmagicRawFrame::GetResolutionScale method 68
5Contents
IBlackmagicRawFrame::SetResourceFormat method 68
IBlackmagicRawFrame::GetResourceFormat method 69
IBlackmagicRawFrame::CreateJobDecodeAndProcessFrame method 69
IBlackmagicRawFrameEx Interface 70
IBlackmagicRawFrameEx::GetBitStreamSizeBytes method 70
IBlackmagicRawFrameEx::GetProcessedImageResolution method 70
IBlackmagicRawManualDecoderFlow1 Interface 71
IBlackmagicRawManualDecoderFlow1::PopulateFrameStateBuer method 71
IBlackmagicRawManualDecoderFlow1::GetFrameStateSizeBytes method 72
IBlackmagicRawManualDecoderFlow1::GetDecodedSizeBytes method 72
IBlackmagicRawManualDecoderFlow1::GetProcessedSizeBytes method 73
IBlackmagicRawManualDecoderFlow1::GetPost3DLUTSizeBytes method 73
IBlackmagicRawManualDecoderFlow1::CreateJobDecode method 74
IBlackmagicRawManualDecoderFlow1::CreateJobProcess method 74
IBlackmagicRawManualDecoderFlow2 Interface 75
IBlackmagicRawManualDecoderFlow2::PopulateFrameStateBuer method 76
IBlackmagicRawManualDecoderFlow2::GetFrameStateSizeBytes method 76
IBlackmagicRawManualDecoderFlow2::GetDecodedSizeBytes method 77
IBlackmagicRawManualDecoderFlow2::GetWorkingSizeBytes method 77
IBlackmagicRawManualDecoderFlow2::GetProcessedSizeBytes method 77
IBlackmagicRawManualDecoderFlow2::GetPost3DLUTSizeBytes method 78
IBlackmagicRawManualDecoderFlow2::CreateJobDecode method 78
IBlackmagicRawManualDecoderFlow2::CreateJobProcess method 79
IBlackmagicRawClip Interface 80
IBlackmagicRawClip::GetWidth method 81
IBlackmagicRawClip::GetHeight method 81
IBlackmagicRawClip::GetFrameRate method 81
IBlackmagicRawClip::GetFrameCount method 82
IBlackmagicRawClip::GetTimecodeForFrame method 82
IBlackmagicRawClip::GetMetadataIterator method 82
IBlackmagicRawClip::GetMetadata method 83
IBlackmagicRawClip::SetMetadata method 83
IBlackmagicRawClip::GetCameraType method 83
IBlackmagicRawClip::CloneClipProcessingAttributes method 84
IBlackmagicRawClip::GetMulticardFileCount method 84
IBlackmagicRawClip::IsMulticardFilePresent method 84
IBlackmagicRawClip::GetSidecarFileAttached method 85
IBlackmagicRawClip::SaveSidecarFile method 85
6Contents
IBlackmagicRawClip::ReloadSidecarFile method 85
IBlackmagicRawClip::CreateJobReadFrame method 86
IBlackmagicRawClip::CreateJobTrim method 86
IBlackmagicRawClipEx Interface 87
IBlackmagicRawClipEx::GetMaxBitStreamSizeBytes method 87
IBlackmagicRawClipEx::GetBitStreamSizeBytes method 88
IBlackmagicRawClipEx::CreateJobReadFrame method 88
IBlackmagicRawClipEx::QueryTimecodeInfo method 89
IBlackmagicRawClipResolutions Interface 89
IBlackmagicRawClipResolutions::GetResolutionCount method 89
IBlackmagicRawClipResolutions::GetResolution method 90
IBlackmagicRawClipResolutions::GetClosestResolutionForScale method 90
IBlackmagicRawClipResolutions::GetClosestScaleForResolution method 91
7Contents
Introduction and Overview
1.0 API Overview
The Blackmagic RAW SDK provides a highly optimised decoder and image processing pipeline.
Blackmagic RAW API
.Braw
Reader
.Sidecar
Reader
DECODER
SSE AVX AVX2
METAL CUDA OPENCL
Available on Mac, Windows, and Linux platforms, the SDK supports supports multiple CPU
architectures and multiple GPU APIs in order to take full advantage of your machine.
The goal is to provide an easy to use yet powerful SDK, which will utilise cross-platform efficient
decoding of .braw files produced by Blackmagic Cameras.
1.1 Decoder Overview
The CPU decoder has been designed to scale from laptops to workstations with a large number of
cores. The CPU decoder will utilise SSE, AVX and AVX2 instructions if available. The user has
control to limit the CPU decoder to fewer threads if desired.
There are several GPU decoders available, including Metal, CUDA, and OpenCL. The final
processed image from each decoder will be provided in a buffer object native to the respective GPU
API. This will allow quick access for further processing or display.
The GPU decoders are dynamically loaded, meaning they will require the system to have the
relevant APIs installed in order to function.
The SDK has been designed for multi-GPU and multi-process capabilities allowing high level
workstations to use all the resources available in the system.
1.2 Sidecar
A .sidecar file may be used, storing any metadata that is modified after the original .braw file
isproduced. The intent here is to not modify the original .braw file. This sidecar file can be manually
deleted if the user wants to restore the movie metadata to its original state.
When metadata or image processing values (such as white balance) are modified via the SDK, the
user can then choose to save this data to the sidecar file. Now when the movie is loaded (potentially
in a different application) the sidecar file be applied and the picture will look consistent.
At this time, the user can run the ‘trim’ operation which will bake the sidecar changes into anewly
created .braw file saved to disk. This can be run on any frame range right down to asingle frame
which produces handy images to pass between colleagues.
The .sidecar file is stored as a text JSON file, allowing users to manually edit or use external tools if
they wish to modify it.
8 Introduction and Overview
3DLUT data (in DaVinci Resolve .cube format) can be embedded into .braw clips and also be stored
in sidecar files. This provides additional ways for 3DLUTs to travel with .braw clips to maintain
consistency in viewing. The SDK allows users to optionally process the clip with the embedded
3DLUT in the clip itself, from the sidecar, or for 3DLUT processing to be disabled. Tetrahedral
interpolation is used for both GPU and CPU pipelines.
An example sidecar with an identity 3DLUT follows. The information has been truncated for brevity.
{
“tone_curve_contrast” : 1.450000,
“tone_curve_saturation” : 1.150000,
“tone_curve_midpoint” : 0.409000,
“tone_curve_highlights” : 0.600000,
“tone_curve_shadows” : 1.800000,
“tone_curve_black_level” : 0.000000,
“tone_curve_white_level” : 1.000000,
“tone_curve_video_black_level” : 1,
“highlight_recovery” : 1,
“viewing_gamma” : “Blackmagic Design Custom”,
“viewing_gamut” : “Blackmagic Design”,
“exposure”: {
“14:57:33:00” : 0.200000
},
“white_balance_kelvin”: {
“14:57:33:00” : 4520
},
“white_balance_tint”: {
“14:57:33:00” : 5
},
“iso”: {
“14:57:33:00” : 500
},
“post_3dlut_mode” : “Sidecar”,
“post_3dlut_sidecar_name” : “Identity3DLUT.cube”,
“post_3dlut_sidecar_title” : “My Identity 3D LUT”,
“post_3dlut_sidecar_size” : 33,
“post_3dlut_sidecar_data” : “0.0000000000 0.0000000000 0.0000000000
0.0312500000 0.0000000000 0.0000000000
0.0625000000 0.0000000000 0.0000000000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0.9375000000 1.0000000000 1.0000000000
0.9687500000 1.0000000000 1.0000000000
1.0000000000 1.0000000000 1.0000000000”
}
9 Introduction and Overview
2.0 Interface Overview
This chapter covers a basic overview of the interfaces used via the Blackmagic RAW API
IBlackmagicRawConstants
IBlackmagicRawConfiguration
IBlackmagicRawMetadataIterator
IBlackmagicRawClipAudio
IBlackmagicRawClipProcessingAttributes
IBlackmagicRawMetadataIterator
IBlackmagicRawFrameProcessingAttributes
IBlackmagicRawProcessedImage
IBlackmagicRawFactory
IBlackmagicRaw
IBlackmagicRawClip
IBlackmagicRawFrame
IBlackmagicRawFactory is the API entry point. From here the user creates a IBlackmagicRaw object.
This object owns a single decoder instance.
This object can be configured via IBlackmagicRawConfiguration allowing the user to define CPU
constraints or set up the SDK to use desired GPU APIs.
After completing the above steps, the user can start opening clips. Once the first clip has been
opened, the decoder is started and any further configuration changes will be discarded.
2.2 Clip Object
Once a clip is opened its components can now be accessed. A metadata iterator is available
toprovide all clip-level metadata (see frame-level metadata in 2.4 below).
Clip audio & clip-level processing attributes can also be accessed. The clip-level processing
attributes allow the user to modify fields such as displayed gamma, displayed gamut, Blackmagic
colour science generation and custom gamma parameters.
Finally with the clip object we create an asynchronous job to read a frame from the clip.
Thiswillprovide a frame object.
10 Introduction and Overview
2.3 Frame Object
A frame object provides access to frame-level metadata & frame-level processing attributes. The
frame-level processing attributes allow the user to modify fields that can change on aper-frame
basis. They include white balance tint/kelvin, exposure & ISO.
The user can also specify output scale & the desired pixel format of the processed image whichis
produced upon request from the frame.
Once ready, the user creates an asynchronous job to produce the processed image. Thisimageis
then ready for display.
3.0 SDK Operations and flow
This chapter provides a brief explanation of how the above objects work together to
produceafinal image.
The SDK provides three main operations, read, decode and process. The read operation isreading
the compressed image from an opened IBlackmagicRawClip file into a IBlackmagicRawFrame. The
decode operation decodes this compressed image format andprepares it for processing. The
process operation applies colour processing (suchaswhitebalancing, exposure) and provides the
final image.
Each of these operations are asynchronous and occur across multiple CPU threads / GPU contexts.
By default this is all handled internally to provide an easy yet efficient solution.
The flow described above is: open a clip, read a frame, decode and process frame:
IBlackmagicRawClip IBlackmagicRawFrame IBlackmagicRawProcessedImage
ReadFrame() DecodeAndProcess()
3.1 Manual Decoders
There are manual decoders available which split the 3 above operations into separated user-driven
steps. These are for advanced use and provide closer access to buffer control, memory use, GPU
contexts and so forth, should your application require it.
Please see the IBlackmagicRawManualDecoder* interfaces available in the API header to
usethis approach.
4.0 GPU Configuration
When utilising the GPU, at configuration time (described above in section 2.0) the GPU devices must
be provided to the IBlackmagicRawConfiguration object. This includes passing in a context and
commandQueue for the desired device.
To create a context and commandQueue the user needs to utilise their desired compute API library
(i.e. Metal, CUDA or OpenCL).
To make this easier for the user, Blackmagic RAW SDK offers pipeline and device iterators. These
allow creation of devices in an abstract way, removing the need to deal directly with compute APIs.
11 Introduction and Overview
4.1 Pipeline iterators
Iterating through the available pipelines will allow your application to query for the presence and
usability of CUDA, Metal, OpenCL and CPU based decoder pipelines. Each of these may be used to
create a pipeline device iterator, with which associated compatible devices may be created.
Using this interface allows applications to check for various compute APIs without the need to set-up
and call any of the API functions and hence removes the requirement of linking against API libraries
and associated dependencies explicitly.
The pipeline iterator is created via IBlackmagicRawFactory’s CreatePipelineIterator method.
4.2 Pipeline device iterators
The pipeline device iterator (IBlackmagicRawPipelineDeviceIterator) is used to iterate over all
devices that a specific pipeline supports.
Once a (IBlackmagicRawPipelineDevice) device has been created via the device iterator, it may be
used to configure a decoder with the SetFromDevice method of IBlackmagicRawConfiguration.
This is equivalent to, but more convenient than, querying the context and command queue from the
device with the GetPipeline method and providing these parameters to the decoder configuration
via SetPipeline.
The context and command queue owned by a device are compute-level API objects
that are used directly by the decoder. The life-time of these compute-level API objects
must outlive that of the decoder, therefore the device instance MUST outlive the
decoder instance.
4.3 Pipeline preparation
A pipeline may have resources which require preparation, such as compilation or binding of GPU
kernels to a device. The SDK provides a mechanism whereby the user may prepare these resources
ahead of time, removing any stall necessitated by the use of these resources in the actual
decoding process.
The preparation of these resources is a potentially time-consuming process and as such is executed
asynchronously. The callback interface has a method (PreparePipelineComplete) to allow the user to
respond to the completion of a pipeline preparation.
A pipeline is prepared on IBlackmagicRaw with either PreparePipeline (providing context and
command queue) or PreparePipelineForDevice (providing an instance of
IBlackmagicRawPipelineDevice), noting that the pipeline configuration MUST have been set prior.
4.4 Multi GPU Devices
When using multiple GPUs, a default GPU device is provided to the
IBlackmagicRawConfiguration object.
Taking advantage of the manual decoders (specified in section 3.1 above) allows the user to
distribute decoding operations across multiple devices.
12 Introduction and Overview
Recommended UI Controls and Behavior
Decode Quality
Type: Drop down selector
Default: Full Res.
Options: – Full Res.
ͽ 1/2 Res.
ͽ 1/4 Res.
ͽ 1/8 Res.
Color Science Version
Type: Drop down selector
Default: Read from metadata
Options: Use IBlackmagicRawConstants::GetClipProcessingAttributeList()
- blackmagicRawClipProcessingAttributeColorScienceGen
Color Space/Gamut
Type: Drop down selector
Default: Read from metadata
Options: Use IBlackmagicRawConstants::GetClipProcessingAttributeList()
- blackmagicRawClipProcessingAttributeGamut
Gamma
Type: Drop down selector
Default: Read from metadata.
Options: Use IBlackmagicRawConstants::GetClipProcessingAttributeList()
- blackmagicRawClipProcessingAttributeGamma
ISO
Type: Drop down selector
Default: Read from metadata.
Options: Use IBlackmagicRawConstants::GetClipProcessingAttributeList()
- blackmagicRawFrameProcessingAttributeISO
Exposure
Type: Slider
Default: 0.
Range: Use IBlackmagicRawConstants::GetFrameProcessingAttributeRange()
- blackmagicRawFrameProcessingAttributeExposure
13 Recommended UI Controls and Behavior
Color Temp
Type: Slider
Default: 5600
Range: Use IBlackmagicRawConstants::GetFrameProcessingAttributeRange()
- blackmagicRawFrameProcessingAttributeWhiteBalanceKelvin
Tint
Type: Slider
Default: 10
Range: Use IBlackmagicRawConstants::GetFrameProcessingAttributeRange()
- blackmagicRawFrameProcessingAttributeWhiteBalanceTint
Highlight Recovery
Type: Checkbox
Default: Off
Export Frame
Type: Button
Exports a single frame of the currently viewed video frame.
Update Sidecar
Type: Button
Saves sidecar file with the currently set parameters for the clip.
Custom Gamma Controls
Custom gamma controls should only be enabled and selectable for the following gammaselections:
Blackmagic Design Film
Blackmagic Design Extended Video
Blackmagic Design Custom
Note: Blackmagic Design Video should have the custom gamma controls DISABLED.
When selecting Blackmagic Design Film or Blackmagic Design Extended Video the custom gamma
controls take on the values supplied by the SDK. When a user adjusts a custom gamma control
slider, the gamma selection should automatically change to Blackmagic Design Custom which
should be written with the current values shown in the UI. The user is now creating their own custom
gamma which can be stored.
The following image examples show the custom gamma controls selectable with Blackmagic Design
Film, and disabled with an incompatible gamma such as Rec.709.
14 Custom Gamma Controls
Example: The custom gamma controls (last 3rd of the RAW panel)
are enabled and selectable with Blackmagic Design Extended Video.
Example: The custom gamma controls (last 3rd of the RAW panel) are
disabled with Blackmagic Design Video gamma.
Saturation
Type: Slider
Default: 1.0
Range: Use IBlackmagicRawConstants::GetFrameProcessingAttributeRange()
- blackmagicRawClipProcessingAttributeToneCurveSaturation
Contrast
Type: Slider
Default: 0.5
Range: Use IBlackmagicRawConstants::GetFrameProcessingAttributeRange()
- blackmagicRawClipProcessingAttributeToneCurveContrast
Midpoint
Type: Slider
Default: 0.41
Range: Use IBlackmagicRawConstants::GetFrameProcessingAttributeRange()
- blackmagicRawClipProcessingAttributeToneCurveMidpoint
15 Custom Gamma Controls
Highlight Rolloff
Type: Slider
Default: 1.0
Range: Use IBlackmagicRawConstants::GetFrameProcessingAttributeRange()
- blackmagicRawClipProcessingAttributeToneCurveHighlights
Shadow Rolloff
Type: Slider
Default: 1.0
Range: Use IBlackmagicRawConstants::GetFrameProcessingAttributeRange()
- blackmagicRawClipProcessingAttributeToneCurveShadows
Black Level
Type: Slider
Default: 1.0
Range: Use IBlackmagicRawConstants::GetFrameProcessingAttributeRange()
- blackmagicRawClipProcessingAttributeToneCurveBlackLevel
White Level
Type: Slider
Default: 1.0
Range: Use IBlackmagicRawConstants::GetFrameProcessingAttributeRange()
- blackmagicRawClipProcessingAttributeToneCurveWhiteLevel
Set Video Black Level
Type: Checkbox
Default: Off
IBlackmagicRawToneCurve::EvaluateToneCurve()
The EvaluateToneCurve method can be used to return a buffer that can then be used to draw and
visualize the result of the custom gamma controls. This is particularly useful when users are creating
their own custom gammas. An example of such a UI is shown below:
16 Custom Gamma Controls
3D LUT
Type: Drop down selector
Default: Read from metadata.
Options: Use IBlackmagicRawConstants::GetClipProcessingAttributeList()
- blackmagicRawClipProcessingAttributePost3DLUTMode
Example: For clips that have an embedded or sidecar 3DLUT available,
an “Apply LUT” checkbox and “LUT Source” dropdown are shown.
Basic Types
enum
The enumerator type is represented differently on each platform, using the most appropriate
system type:
Windows
unsigned int
macOS
uint32_t
Linux
uint32_t
uuid
The Universally unique identifier type is represented differently on each platform, using the most
appropriate system type:
Windows
GUID
macOS
CFUUIDBytes
Linux
GUID
Boolean
A boolean is represented differently on each platform, using the most appropriate system type:
Windows
BOOL
macOS
bool
Linux
bool
17 Basic Types
int8_t
The signed 8 bit integer type is represented differently on each platform, using the most appropriate
system type:
Windows
signed char
macOS
int8_t
Linux
int8_t
uint8_t
The unsigned 8 bit integer type is represented differently on each platform, using the most
appropriate system type:
Windows
unsigned char
macOS
uint8_t
Linux
uint8_t
int16_t
The signed 16 bit integer type is represented differently on each platform, using the most
appropriate system type:
Windows
short
macOS
int16_t
Linux
int16_t
uint16_t
The unsigned 16 bit integer type is represented differently on each platform, using the most
appropriate system type:
Windows
unsigned short
macOS
uint16_t
Linux
uint16_t
int32_t
The signed 32 bit integer type is represented differently on each platform, using the most
appropriate system type:
Windows
int
macOS
int32_t
Linux
int32_t
18 Basic Types
uint32_t
The unsigned 32 bit integer type is represented differently on each platform, using the most
appropriate system type:
Windows
unsigned int
macOS
uint32_t
Linux
uint32_t
int64_t
The signed 64 bit integer type is represented differently on each platform, using the most
appropriate system type:
Windows
long long
macOS
int64_t
Linux
int64_t
uint64_t
The unsigned 64 bit integer type is represented differently on each platform, using the most
appropriate system type:
Windows
unsigned long long
macOS
uint64_t
Linux
uint64_t
long
The long type is represented differently on each platform, using the most appropriate system type:
Windows
LONG
macOS
long
Linux
long
string
Strings are represented differently on each platform, using the most appropriate system type:
Windows
BSTR
macOS
CFStringRef
Linux
const char*
SafeArray
The SafeArray type is represented differently on each platform, using the most appropriate
system type:
macOS
SafeArray*
Linux
SafeArray*
19 Basic Types
SafeArrayData
The SafeArrayData type is represented differently on each platform, using the most appropriate
system type:
macOS
CFMutableDataRef
Linux
void*
Variant
The Variant type is represented differently on each platform, using the most appropriate
system type:
Windows
VARIANT
macOS
Variant
Linux
Variant
BlackmagicRawVariantType
Variant types that may be stored as metadata
Key
Value
Description
macOS
and
Linux Windows
blackmagicRawVariantTypeEmpty 0 VT_EMPTY Undefined type
blackmagicRawVariantTypeU8 1 VT_UI1 Unsigned 8 bit integer
blackmagicRawVariantTypeS16 2 VT_I2 Signed 16 bit integer
blackmagicRawVariantTypeU16 3 VT_UI2 Unsigned 16 bit integer
blackmagicRawVariantTypeS32 4 VT_I4 Signed 32 bit integer
blackmagicRawVariantTypeU32 5 VT_UI4 Unsigned 32 bit integer
blackmagicRawVariantTypeFloat32 6 VT_R4
Single precision 32 bit (IEEE
754) floating point number
blackmagicRawVariantTypeString 7 VT_BSTR String variable
blackmagicRawVariantTypeSafeArray 8 VT_SAFEARRAY Array variable
BlackmagicRawResourceType
Used in IBlackmagicRawResourceManager
Key Value Description
blackmagicRawResourceTypeBufferCPU ‘cpub' Page aligned CPU addressable memory
blackmagicRawResourceTypeBufferMetal ‘metb' Metal MTLBuffer
blackmagicRawResourceTypeBufferCUDA ‘cudb' CUDA CUdeviceptr device pointer
blackmagicRawResourceTypeBufferOpenCL ‘oclb' OpenCL cl_mem buffer object
20 Basic Types
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91

Blackmagic RAW SDK User manual

Type
User manual

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI