renderer: always hash along edges
This commit is contained in:
@@ -109,7 +109,7 @@ bool Block::HashPassthrough(const QString &input, QCryptographicHash &hash, cons
|
||||
new_globals.set_time(t);
|
||||
|
||||
Node *out = GetConnectedOutput(input);
|
||||
out->Hash(GetValueHintForInput(input, -1), hash, new_globals, video_params);
|
||||
Node::Hash(out, GetValueHintForInput(input), hash, new_globals, video_params);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -130,7 +130,7 @@ void Block::Retranslate()
|
||||
SetInputName(kEnabledInput, tr("Enabled"));
|
||||
}
|
||||
|
||||
void Block::Hash(const ValueHint &hint, QCryptographicHash &, const NodeGlobals &, const VideoParams &) const
|
||||
void Block::Hash(QCryptographicHash &, const NodeGlobals &, const VideoParams &) const
|
||||
{
|
||||
// A block does nothing by default, so we hash nothing
|
||||
}
|
||||
|
||||
@@ -115,8 +115,6 @@ public:
|
||||
index_ = i;
|
||||
}
|
||||
|
||||
virtual void Hash(const Node::ValueHint &hint, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
|
||||
|
||||
virtual void InvalidateCache(const TimeRange& range, const QString& from, int element = -1, InvalidateCacheOptions options = InvalidateCacheOptions()) override;
|
||||
|
||||
static const QString kLengthInput;
|
||||
@@ -134,6 +132,8 @@ signals:
|
||||
protected:
|
||||
virtual void InputValueChangedEvent(const QString& input, int element) override;
|
||||
|
||||
virtual void Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
|
||||
|
||||
bool HashPassthrough(const QString &input, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const;
|
||||
|
||||
Block* previous_;
|
||||
|
||||
@@ -51,7 +51,7 @@ ClipBlock::ClipBlock() :
|
||||
IgnoreHashingFrom(kReverseInput);
|
||||
|
||||
PrependInput(kBufferIn, NodeValue::kNone, InputFlags(kInputFlagNotKeyframable));
|
||||
SetValueHintForInput(kBufferIn, -1, {NodeValue::kBuffer, -1, QString()});
|
||||
SetValueHintForInput(kBufferIn, {NodeValue::kBuffer, -1, QString()});
|
||||
}
|
||||
|
||||
Node *ClipBlock::copy() const
|
||||
@@ -264,7 +264,7 @@ void ClipBlock::Retranslate()
|
||||
SetInputName(kReverseInput, tr("Reverse"));
|
||||
}
|
||||
|
||||
void ClipBlock::Hash(const ValueHint &out, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
|
||||
void ClipBlock::Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
|
||||
{
|
||||
HashPassthrough(kBufferIn, hash, globals, video_params);
|
||||
}
|
||||
|
||||
@@ -59,8 +59,6 @@ public:
|
||||
|
||||
virtual void Retranslate() override;
|
||||
|
||||
virtual void Hash(const Node::ValueHint& output, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
|
||||
|
||||
double speed() const
|
||||
{
|
||||
return GetStandardValue(kSpeedInput).toDouble();
|
||||
@@ -111,6 +109,8 @@ protected:
|
||||
|
||||
virtual void InputValueChangedEvent(const QString &input, int element) override;
|
||||
|
||||
virtual void Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
|
||||
|
||||
private:
|
||||
rational SequenceToMediaTime(const rational& sequence_time, bool ignore_reverse = false) const;
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ double TransitionBlock::GetInProgress(const double &time) const
|
||||
return clamp((GetInternalTransitionTime(time) - out_offset().toDouble()) / in_offset().toDouble(), 0.0, 1.0);
|
||||
}
|
||||
|
||||
void TransitionBlock::Hash(const ValueHint &output, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
|
||||
void TransitionBlock::Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
|
||||
{
|
||||
if (HashPassthrough(kInBlockInput, hash, globals, video_params)
|
||||
|| HashPassthrough(kOutBlockInput, hash, globals, video_params)) {
|
||||
|
||||
@@ -65,8 +65,6 @@ public:
|
||||
double GetOutProgress(const double &time) const;
|
||||
double GetInProgress(const double &time) const;
|
||||
|
||||
virtual void Hash(const ValueHint& output, QCryptographicHash& hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
|
||||
|
||||
virtual void Value(const NodeValueRow& value, const NodeGlobals &globals, NodeValueTable *table) const override;
|
||||
|
||||
virtual void InvalidateCache(const TimeRange& range, const QString& from, int element = -1, InvalidateCacheOptions options = InvalidateCacheOptions()) override;
|
||||
@@ -91,6 +89,8 @@ protected:
|
||||
|
||||
virtual TimeRange OutputTimeAdjustment(const QString& input, int element, const TimeRange& input_time) const override;
|
||||
|
||||
virtual void Hash(QCryptographicHash& hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
|
||||
|
||||
private:
|
||||
enum CurveType {
|
||||
kLinear,
|
||||
|
||||
Reference in New Issue
Block a user