fix: bug-fix sweep across node, audio, render, plugin subsystems
Node core: - MathNode/TrigonometryNode combo strings realigned with Operation enums - mathbase scalar/vector operand pick no longer uses bitwise type checks - NodeSetPositionAndDependenciesRecursively moves dependencies again - RemoveAllKeyframes undo actually restores keyframes - NodeGroup GetInputName null-deref guard, passthrough ids use input id - NodeValueTable::Has is an exact type match; tag fallback only for empty tags; kStrCombo/kPushButton get data type names - delete_all_keyframes no longer loops forever on unparented keyframes; keyframe-load failures propagate; rational interpolation falls back to double; OpacityEffect no longer leaks its internal MathNode Audio/footage: - AudioVisualWaveform: GetSummaryFromTime underflow OOB read, TrimIn prepend length bookkeeping, OverwriteSums source channel indexing - PanNode inserts the pan value into the sample job (keyframed pan works); OutputParamsChanged is emitted on device change; PortAudio device indices are validated before Pa_GetDeviceInfo - Footage: AdjustTimeByLoopMode no longer hangs/UBs on degenerate lengths, GetStreamIndex bounds-checked, CheckFootage clears stale state on missing files, failed probes are not cached, FootageDescription::Load requires its own root element Render/track: - ViewerOutput pushes the tagged samples value; TrackList disconnects the track-height lambda; GetTrackFromReference validity check - RenderManager dummy backend: null-initialized threads, guarded decoder-cache/timer paths; Renderer::Destroy releases color cache shaders/textures; unknown dynamic backends no longer alias to oakgl - SharedMemoryRegion POSIX attach validates segment size; ReadMessage skips blank lines instead of failing; GC counter clamped; IsRenderingCustomRange implemented; TimeOffsetNode gets a true inverse OutputTimeAdjustment; zero-speed clips return the held frame Plugin/nodes: - OliveClip: stored default region of definition is honored, on-demand images are cached; OliveHost sets host identity properties and logs instead of showing modal dialogs offscreen; Plugin.h dead decls gone - DespillNode guards graph-less use with Rec.709 fallback; description typos fixed (despill, swirl); mosaic applies when only one axis matches; Windows-only Project filename separator test fixed
This commit is contained in:
@@ -184,23 +184,19 @@ TEST(TrigonometryNode, RetranslateSetsInputNamesAndComboStrings)
|
||||
node.GetInputProperty(olive::TrigonometryNode::kMethodIn,
|
||||
QStringLiteral("combo_str"))
|
||||
.toStringList();
|
||||
ASSERT_EQ(methods.size(), 11);
|
||||
ASSERT_EQ(methods.size(), 9);
|
||||
EXPECT_EQ(methods.at(0), QStringLiteral("Sine"));
|
||||
EXPECT_EQ(methods.at(1), QStringLiteral("Cosine"));
|
||||
EXPECT_EQ(methods.at(2), QStringLiteral("Tangent"));
|
||||
EXPECT_TRUE(methods.at(3).isEmpty());
|
||||
EXPECT_EQ(methods.at(4), QStringLiteral("Inverse Sine"));
|
||||
EXPECT_EQ(methods.at(5), QStringLiteral("Inverse Cosine"));
|
||||
EXPECT_EQ(methods.at(6), QStringLiteral("Inverse Tangent"));
|
||||
EXPECT_TRUE(methods.at(7).isEmpty());
|
||||
EXPECT_EQ(methods.at(8), QStringLiteral("Hyperbolic Sine"));
|
||||
EXPECT_EQ(methods.at(9), QStringLiteral("Hyperbolic Cosine"));
|
||||
EXPECT_EQ(methods.at(10), QStringLiteral("Hyperbolic Tangent"));
|
||||
EXPECT_EQ(methods.at(3), QStringLiteral("Inverse Sine"));
|
||||
EXPECT_EQ(methods.at(4), QStringLiteral("Inverse Cosine"));
|
||||
EXPECT_EQ(methods.at(5), QStringLiteral("Inverse Tangent"));
|
||||
EXPECT_EQ(methods.at(6), QStringLiteral("Hyperbolic Sine"));
|
||||
EXPECT_EQ(methods.at(7), QStringLiteral("Hyperbolic Cosine"));
|
||||
EXPECT_EQ(methods.at(8), QStringLiteral("Hyperbolic Tangent"));
|
||||
|
||||
// NOTE: The combo list contains separator entries at indexes 3 and 7 that
|
||||
// the Operation enum used by Value() does not have, so combo indexes 4
|
||||
// and above no longer match the enum (suspected bug, documented here and
|
||||
// in ComboIndexBeyondSeparatorComputesWrongFunction).
|
||||
// The combo list contains no separator entries, so combo indexes match
|
||||
// the Operation enum used by Value() exactly
|
||||
}
|
||||
|
||||
TEST(TrigonometryNode, SineCosineTangent)
|
||||
@@ -264,7 +260,7 @@ TEST(TrigonometryNode, HyperbolicOperations)
|
||||
EXPECT_NEAR(GenerateTrigResult(node), std::tanh(1.0), 1e-12);
|
||||
}
|
||||
|
||||
TEST(TrigonometryNode, ComboIndexBeyondSeparatorComputesWrongFunction)
|
||||
TEST(TrigonometryNode, ComboIndexMatchesOperationEnum)
|
||||
{
|
||||
olive::ColorManager::SetUpDefaultConfig();
|
||||
olive::Project project;
|
||||
@@ -272,15 +268,20 @@ TEST(TrigonometryNode, ComboIndexBeyondSeparatorComputesWrongFunction)
|
||||
|
||||
auto *node = AddNode<olive::TrigonometryNode>(&project);
|
||||
|
||||
// NOTE: The combo box labels index 4 as "Inverse Sine", but Value()
|
||||
// casts the index to the Operation enum where 4 is kOpArcCosine, because
|
||||
// the combo string list contains separator entries that the enum does
|
||||
// not have (suspected bug, test documents current behavior).
|
||||
// The combo list has no separator entries, so a combo index selects the
|
||||
// Operation enum value with the same index
|
||||
node->SetStandardValue(olive::TrigonometryNode::kMethodIn, 3);
|
||||
node->SetStandardValue(olive::TrigonometryNode::kXIn, 0.5);
|
||||
EXPECT_NEAR(GenerateTrigResult(node), std::asin(0.5), 1e-12);
|
||||
|
||||
node->SetStandardValue(olive::TrigonometryNode::kMethodIn, 4);
|
||||
node->SetStandardValue(olive::TrigonometryNode::kXIn, 0.5);
|
||||
EXPECT_NEAR(GenerateTrigResult(node), std::acos(0.5), 1e-12);
|
||||
|
||||
// Index 8 is labeled "Hyperbolic Sine" but computes hyperbolic tangent
|
||||
node->SetStandardValue(olive::TrigonometryNode::kMethodIn, 6);
|
||||
node->SetStandardValue(olive::TrigonometryNode::kXIn, 1.0);
|
||||
EXPECT_NEAR(GenerateTrigResult(node), std::sinh(1.0), 1e-12);
|
||||
|
||||
node->SetStandardValue(olive::TrigonometryNode::kMethodIn, 8);
|
||||
node->SetStandardValue(olive::TrigonometryNode::kXIn, 1.0);
|
||||
EXPECT_NEAR(GenerateTrigResult(node), std::tanh(1.0), 1e-12);
|
||||
|
||||
Reference in New Issue
Block a user