Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
CrendKing committed Jun 29, 2021
1 parent 5a11c98 commit 3a11b5c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
7 changes: 3 additions & 4 deletions avisynth_filter/src/frame_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ namespace SynthFilter {
auto FrameHandler::AddInputSample(IMediaSample *inputSample) -> HRESULT {
HRESULT hr;

UpdateExtraSourceBuffer();

_addInputSampleCv.wait(_filter.m_csReceive, [this]() -> bool {
if (_isFlushing) {
return true;
Expand Down Expand Up @@ -95,10 +93,11 @@ auto FrameHandler::AddInputSample(IMediaSample *inputSample) -> HRESULT {
}
_newSourceFrameCv.notify_all();

Environment::GetInstance().Log(L"Stored source frame: %6i at %10lli ~ %10lli duration(literal) %10lli",
_nextSourceFrameNb, inputSampleStartTime, inputSampleStopTime, inputSampleStopTime - inputSampleStartTime);
Environment::GetInstance().Log(L"Stored source frame: %6i at %10lli ~ %10lli duration(literal) %10lli max_requested %6i extra_buffer %6i",
_nextSourceFrameNb, inputSampleStartTime, inputSampleStopTime, inputSampleStopTime - inputSampleStartTime, _maxRequestedFrameNb.load(), _extraSourceBuffer);

_nextSourceFrameNb += 1;
UpdateExtraSourceBuffer();

return S_OK;
}
Expand Down
3 changes: 1 addition & 2 deletions filter_common/src/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ static const GUID MEDIASUBTYPE_YV24 = FOURCCMap('
// interface version 7 = AviSynth+ 3.5
static constexpr const int MINIMUM_AVISYNTH_PLUS_INTERFACE_VERSION = 7;

static constexpr const double EXTRA_SOURCE_BUFFER_INCREASE_THRESHOLD = 0.95;
static constexpr const double EXTRA_SOURCE_BUFFER_DECREASE_THRESHOLD = 1.05;
static constexpr const double EXTRA_SOURCE_BUFFER_CHANGE_THRESHOLD = 0.05;
static constexpr const int MAXIMUM_EXTRA_SOURCE_BUFFER = 14;

/*
Expand Down
4 changes: 2 additions & 2 deletions filter_common/src/frame_handler_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ auto FrameHandler::UpdateExtraSourceBuffer() -> void {
if (const int sourceAvgFps = MainFrameServer::GetInstance().GetSourceAvgFrameRate();
_currentInputFrameRate > 0 && _nextSourceFrameNb % (sourceAvgFps / FRAME_RATE_SCALE_FACTOR) == 0) {
if (const double ratio = static_cast<double>(_currentInputFrameRate) / sourceAvgFps;
ratio < EXTRA_SOURCE_BUFFER_INCREASE_THRESHOLD) {
ratio < 1 - EXTRA_SOURCE_BUFFER_CHANGE_THRESHOLD) {
_extraSourceBuffer = min(_extraSourceBuffer, MAXIMUM_EXTRA_SOURCE_BUFFER) + 1;
} else if (ratio > EXTRA_SOURCE_BUFFER_DECREASE_THRESHOLD) {
} else if (ratio > 1 + EXTRA_SOURCE_BUFFER_CHANGE_THRESHOLD) {
_extraSourceBuffer = max(_extraSourceBuffer, 1) - 1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion filter_common/src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace SynthFilter {
#define FILTER_NAME_WIDE WIDEN(FILTER_NAME_BASE)
#define FILTER_VERSION_MAJOR 1
#define FILTER_VERSION_MINOR 1
#define FILTER_VERSION_PATCH 3
#define FILTER_VERSION_PATCH 4
#define FILTER_VERSION_STRING STRINGIZE(FILTER_VERSION_MAJOR) "." STRINGIZE(FILTER_VERSION_MINOR) "." STRINGIZE(FILTER_VERSION_PATCH) FILTER_VARIANT " # " FILTER_GIT_HASH
}
7 changes: 3 additions & 4 deletions vapoursynth_filter/src/frame_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ namespace SynthFilter {
auto FrameHandler::AddInputSample(IMediaSample *inputSample) -> HRESULT {
HRESULT hr;

UpdateExtraSourceBuffer();

_addInputSampleCv.wait(_filter.m_csReceive, [this]() -> bool {
if (_isFlushing) {
return true;
Expand Down Expand Up @@ -97,10 +95,11 @@ auto FrameHandler::AddInputSample(IMediaSample *inputSample) -> HRESULT {
std::forward_as_tuple(frame, inputSampleStartTime, hdrSideData));
}

Environment::GetInstance().Log(L"Stored source frame: %6i at %10lli ~ %10lli duration(literal) %10lli, last used: %6i",
_nextSourceFrameNb, inputSampleStartTime, inputSampleStopTime, inputSampleStopTime - inputSampleStartTime, _lastUsedSourceFrameNb.load());
Environment::GetInstance().Log(L"Stored source frame: %6i at %10lli ~ %10lli duration(literal) %10lli, last_used %6i, extra_buffer %6i",
_nextSourceFrameNb, inputSampleStartTime, inputSampleStopTime, inputSampleStopTime - inputSampleStartTime, _lastUsedSourceFrameNb.load(), _extraSourceBuffer);

_nextSourceFrameNb += 1;
UpdateExtraSourceBuffer();

/*
* Some video decoders set the correct start time but the wrong stop time (stop time always being start time + average frame time).
Expand Down

0 comments on commit 3a11b5c

Please sign in to comment.