AJA NTV2 SDK  18.0.0.2122
NTV2 SDK 18.0.0.2122
ntv2csclut.cpp File Reference

Implements most of CNTV2Card's CSC/LUT-related functions. More...

#include "ntv2card.h"
#include "ntv2devicefeatures.h"
#include "ntv2utils.h"
#include "ntv2registerexpert.h"
#include "ajabase/system/debug.h"
#include <math.h>
#include <assert.h>
#include <deque>
Include dependency graph for ntv2csclut.cpp:

Go to the source code of this file.

Macros

#define HEX16(__x__)   "0x" << hex << setw(16) << setfill('0') << uint64_t(__x__) << dec
 
#define INSTP(_p_)   HEX16(uint64_t(_p_))
 
#define CSCFAIL(__x__)   AJA_sERROR (AJA_DebugUnit_CSC, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define CSCWARN(__x__)   AJA_sWARNING(AJA_DebugUnit_CSC, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define CSCNOTE(__x__)   AJA_sNOTICE (AJA_DebugUnit_CSC, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define CSCINFO(__x__)   AJA_sINFO (AJA_DebugUnit_CSC, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define CSCDBG(__x__)   AJA_sDEBUG (AJA_DebugUnit_CSC, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define LUTFAIL(__x__)   AJA_sERROR (AJA_DebugUnit_LUT, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define LUTWARN(__x__)   AJA_sWARNING(AJA_DebugUnit_LUT, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define LUTNOTE(__x__)   AJA_sNOTICE (AJA_DebugUnit_LUT, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define LUTINFO(__x__)   AJA_sINFO (AJA_DebugUnit_LUT, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define LUTDBG(__x__)   AJA_sDEBUG (AJA_DebugUnit_LUT, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 

Functions

static ULWord intClamp (const int inMin, const int inValue, const int inMax)
 
static const size_t kLUTArraySize ((512) *2)
 
static const size_t k12BitLUTArraySize ((2048) *2)
 

Variables

static const ULWord gChannelToEnhancedCSCRegNum []
 
static const ULWord gChannelToCSCoeff12RegNum []
 
static const ULWord gChannelToCSCoeff34RegNum []
 
static const ULWord gChannelToCSCoeff56RegNum []
 
static const ULWord gChannelToCSCoeff78RegNum []
 
static const ULWord gChannelToCSCoeff910RegNum []
 
static const ULWord gChannelTo1DLutControlRegNum []
 
static const ULWord gChannelCapabilities []
 
static const ULWord gChannelDmaLoad []
 
static const ULWord gChannelHostLoad []
 
static const NTV2ColorCorrectionHostAccessBank gLUTBank0 []
 

Detailed Description

Implements most of CNTV2Card's CSC/LUT-related functions.

Definition in file ntv2csclut.cpp.

Macro Definition Documentation

◆ CSCDBG

#define CSCDBG (   __x__)    AJA_sDEBUG (AJA_DebugUnit_CSC, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 28 of file ntv2csclut.cpp.

◆ CSCFAIL

#define CSCFAIL (   __x__)    AJA_sERROR (AJA_DebugUnit_CSC, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 24 of file ntv2csclut.cpp.

◆ CSCINFO

#define CSCINFO (   __x__)    AJA_sINFO (AJA_DebugUnit_CSC, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 27 of file ntv2csclut.cpp.

◆ CSCNOTE

#define CSCNOTE (   __x__)    AJA_sNOTICE (AJA_DebugUnit_CSC, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 26 of file ntv2csclut.cpp.

◆ CSCWARN

#define CSCWARN (   __x__)    AJA_sWARNING(AJA_DebugUnit_CSC, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 25 of file ntv2csclut.cpp.

◆ HEX16

#define HEX16 (   __x__)    "0x" << hex << setw(16) << setfill('0') << uint64_t(__x__) << dec

Definition at line 22 of file ntv2csclut.cpp.

◆ INSTP

#define INSTP (   _p_)    HEX16(uint64_t(_p_))

Definition at line 23 of file ntv2csclut.cpp.

◆ LUTDBG

#define LUTDBG (   __x__)    AJA_sDEBUG (AJA_DebugUnit_LUT, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 34 of file ntv2csclut.cpp.

◆ LUTFAIL

#define LUTFAIL (   __x__)    AJA_sERROR (AJA_DebugUnit_LUT, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 30 of file ntv2csclut.cpp.

◆ LUTINFO

#define LUTINFO (   __x__)    AJA_sINFO (AJA_DebugUnit_LUT, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 33 of file ntv2csclut.cpp.

◆ LUTNOTE

#define LUTNOTE (   __x__)    AJA_sNOTICE (AJA_DebugUnit_LUT, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 32 of file ntv2csclut.cpp.

◆ LUTWARN

#define LUTWARN (   __x__)    AJA_sWARNING(AJA_DebugUnit_LUT, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 31 of file ntv2csclut.cpp.

Function Documentation

◆ intClamp()

static ULWord intClamp ( const int  inMin,
const int  inValue,
const int  inMax 
)
inlinestatic

Definition at line 845 of file ntv2csclut.cpp.

◆ k12BitLUTArraySize()

static const size_t k12BitLUTArraySize ( (2048) *  2)
static

◆ kLUTArraySize()

static const size_t kLUTArraySize ( (512) *  2)
static

Variable Documentation

◆ gChannelCapabilities

const ULWord gChannelCapabilities[]
static
Initial value:
= {
(( (0xd800) + (0 * (16) )) / 4 + regCCLUTV3Capabilities),
(( (0xd800) + (1 * (16) )) / 4 + regCCLUTV3Capabilities),
(( (0xd800) + (2 * (16) )) / 4 + regCCLUTV3Capabilities),
(( (0xd800) + (3 * (16) )) / 4 + regCCLUTV3Capabilities),
(( (0xd800) + (4 * (16) )) / 4 + regCCLUTV3Capabilities),
(( (0xd800) + (5 * (16) )) / 4 + regCCLUTV3Capabilities),
(( (0xd800) + (6 * (16) )) / 4 + regCCLUTV3Capabilities),
(( (0xd800) + (7 * (16) )) / 4 + regCCLUTV3Capabilities),
0 }

Definition at line 64 of file ntv2csclut.cpp.

◆ gChannelDmaLoad

const ULWord gChannelDmaLoad[]
static
Initial value:
= {
(( (0xd800) + (0 * (16) )) / 4 + regCCLUTV3DmaLoad),
(( (0xd800) + (1 * (16) )) / 4 + regCCLUTV3DmaLoad),
(( (0xd800) + (2 * (16) )) / 4 + regCCLUTV3DmaLoad),
(( (0xd800) + (3 * (16) )) / 4 + regCCLUTV3DmaLoad),
(( (0xd800) + (4 * (16) )) / 4 + regCCLUTV3DmaLoad),
(( (0xd800) + (5 * (16) )) / 4 + regCCLUTV3DmaLoad),
(( (0xd800) + (6 * (16) )) / 4 + regCCLUTV3DmaLoad),
(( (0xd800) + (7 * (16) )) / 4 + regCCLUTV3DmaLoad),
0 }

Definition at line 75 of file ntv2csclut.cpp.

◆ gChannelHostLoad

const ULWord gChannelHostLoad[]
static
Initial value:
= {
(( (0xd800) + (0 * (16) )) / 4 + regCCLUTV3HostLoad),
(( (0xd800) + (1 * (16) )) / 4 + regCCLUTV3HostLoad),
(( (0xd800) + (2 * (16) )) / 4 + regCCLUTV3HostLoad),
(( (0xd800) + (3 * (16) )) / 4 + regCCLUTV3HostLoad),
(( (0xd800) + (4 * (16) )) / 4 + regCCLUTV3HostLoad),
(( (0xd800) + (5 * (16) )) / 4 + regCCLUTV3HostLoad),
(( (0xd800) + (6 * (16) )) / 4 + regCCLUTV3HostLoad),
(( (0xd800) + (7 * (16) )) / 4 + regCCLUTV3HostLoad),
0 }

Definition at line 86 of file ntv2csclut.cpp.

◆ gChannelTo1DLutControlRegNum

◆ gChannelToCSCoeff12RegNum

◆ gChannelToCSCoeff34RegNum

◆ gChannelToCSCoeff56RegNum

◆ gChannelToCSCoeff78RegNum

◆ gChannelToCSCoeff910RegNum

◆ gChannelToEnhancedCSCRegNum

◆ gLUTBank0