renderer: minor code improvements

This commit is contained in:
itsmattkc
2020-02-03 01:29:03 +11:00
parent 40e8aec285
commit caf0d3d42a
3 changed files with 5 additions and 7 deletions
@@ -139,7 +139,7 @@ void OpenGLRenderFunctions::OCIOBlit(OpenGLShaderPtr pipeline,
pipeline->setUniformValue("ove_ociolut", 2);
OpenGLRenderFunctions::Blit(pipeline, flipped, matrix);
Blit(pipeline, flipped, matrix);
pipeline->release();
+1 -1
View File
@@ -25,7 +25,7 @@ bool RenderBackend::Init()
return true;
}
threads_.resize(qMax(1, QThread::idealThreadCount() - 1));
threads_.resize(QThread::idealThreadCount());
for (int i=0;i<threads_.size();i++) {
QThread* thread = new QThread(this);
+3 -5
View File
@@ -245,18 +245,16 @@ TimeRange VideoRenderBackend::PopNextFrameFromQueue()
// Use this variable to find the closest frame in the range
rational closest_time = -1;
for (int i=0;i<cache_queue_.size();i++) {
const TimeRange& range_here = cache_queue_.at(i);
foreach (const TimeRange& range_here, cache_queue_) {
if (range_here.OverlapsWith(test_range, false, false)) {
closest_time = -1;
break;
}
for (int i=0;i<2;i++) {
for (int j=0;j<2;j++) {
rational compare;
if (i == 0) {
if (j == 0) {
compare = Timecode::snap_time_to_timebase(range_here.in(), params_.time_base());
if (compare > range_here.in()) {
compare -= params_.time_base();