aja: Fix Kona5/io4K+ 6G/12G-SDI routing and RGB HD-DualLink routing

This commit is contained in:
Paul Hindt
2022-01-13 13:12:47 -06:00
committed by Colin Edwards
parent 8f8b522ca7
commit cb51c974f4
4 changed files with 452 additions and 443 deletions
+3 -1
View File
@@ -1067,7 +1067,9 @@ VPIDStandard DetermineVPIDStandard(NTV2DeviceID id, IOSelection io,
else if (trx == SDITransport::SDI3Gb)
vpid = VPIDStandard_720_3Gb;
} else if (IsStandard1080p(standard)) {
if (trx == SDITransport::SDI3Ga)
if (trx == SDITransport::HDDualLink) {
vpid = VPIDStandard_1080_DualLink;
} else if (trx == SDITransport::SDI3Ga)
vpid = VPIDStandard_1080_Dual_3Ga;
else if (trx == SDITransport::SDI3Gb)
vpid = VPIDStandard_1080_Dual_3Gb;
File diff suppressed because it is too large Load Diff
+7 -6
View File
@@ -14,15 +14,16 @@ struct RoutingPreset {
std::string name;
ConnectionKind kind;
NTV2Mode mode;
uint32_t num_channels;
uint32_t num_framestores;
uint32_t flags;
bool is_rgb;
std::string route_string;
std::vector<NTV2DeviceID> device_ids;
RasterDefinition raster_def;
HDMIWireFormat hdmi_wire_format;
VPIDStandard vpid_standard;
uint32_t num_channels;
uint32_t num_framestores;
uint32_t flags;
std::string route_string;
std::vector<NTV2DeviceID> device_ids;
bool is_rgb;
bool verbatim;
};
using RoutingPresets = std::vector<RoutingPreset>;
+23 -7
View File
@@ -332,9 +332,8 @@ bool Routing::ConfigureOutputRoute(const OutputProps &props, NTV2Mode mode,
"No Output Destinations specified to configure routing!");
return false;
}
auto init_dest = *outputDests.begin();
auto init_channel = NTV2OutputDestinationToChannel(init_dest);
RoutingConfigurator rc;
RoutingPreset rp;
if (NTV2_OUTPUT_DEST_IS_SDI(init_dest)) {
@@ -384,14 +383,28 @@ bool Routing::ConfigureOutputRoute(const OutputProps &props, NTV2Mode mode,
std::string route_string = rp.route_string;
// Replace framestore channel placeholders
auto init_channel = NTV2OutputDestinationToChannel(init_dest);
ULWord start_framestore_index = InitialFramestoreOutputIndex(
deviceID, props.ioSelect, init_channel);
if (rp.verbatim) {
// Presets marked "verbatim" must only be routed on the specified channels
start_framestore_index = 0;
init_channel = NTV2_CHANNEL1;
}
// Channel-substitution for widgets associated with framestore channel(s)
const std::vector<std::string> fs_associated = {"fb", "tsi", "dlo"};
for (ULWord c = 0; c < NTV2_MAX_NUM_CHANNELS; c++) {
std::string fs_channel_placeholder =
std::string("fb[{ch" + aja::to_string(c + 1) + "}]");
route_string = aja::replace(
route_string, fs_channel_placeholder,
"fb[" + aja::to_string(start_framestore_index++) + "]");
for (const auto &name : fs_associated) {
std::string placeholder = std::string(
name + "[{ch" + aja::to_string(c + 1) + "}]");
route_string = aja::replace(
route_string, placeholder,
name + "[" +
aja::to_string(start_framestore_index) +
"]");
}
start_framestore_index++;
}
// Replace other channel placeholders
@@ -440,6 +453,9 @@ bool Routing::ConfigureOutputRoute(const OutputProps &props, NTV2Mode mode,
// Apply Framestore settings
start_framestore_index = InitialFramestoreOutputIndex(
deviceID, props.ioSelect, init_channel);
if (rp.verbatim) {
start_framestore_index = 0;
}
for (uint32_t i = (uint32_t)start_framestore_index;
i < (start_framestore_index + rp.num_framestores); i++) {
NTV2Channel channel = GetNTV2ChannelForIndex(i);