Skip to content

Commit

Permalink
FIX: minor correction to super resolution estimation
Browse files Browse the repository at this point in the history
CLEANUP: Special linker paths not required here with MSYS2
  • Loading branch information
spillerrec committed Jan 19, 2020
1 parent 91f08cb commit 1a2815e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
1 change: 1 addition & 0 deletions interface/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,7 @@ void main_widget::create_sr_sample(){
creator.sample_count = scale * scale;
creator.render(images, img);
}
update_draw();
} );
}

Expand Down
9 changes: 1 addition & 8 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,6 @@ set(SOURCES_OTHERS
MultiPlaneIterator.cpp
)

# mingw uses a different naming for FFTW apparently # TODO: find a better solution
if( WIN32 )
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} -lfftw3-3)
else( WIN32 )
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} -lfftw3)
endif( WIN32 )

# TODO: do something smarter?
set(FFMPEG_LIBS -lavcodec -lavutil -lavformat)

Expand All @@ -113,7 +106,7 @@ add_library(OvermixCore
${WAIFU_SOURCES}
${SOURCES_OTHERS}
)
target_link_libraries(OvermixCore Qt5::Gui Qt5::Concurrent -lm -lpng -ljpeg -lz -llzma -lpugixml ${FFMPEG_LIBS} ${WAIFU_LIB} ${PLATFORM_LIBRARIES})
target_link_libraries(OvermixCore Qt5::Gui Qt5::Concurrent -lm -lpng -ljpeg -lz -llzma -lpugixml -lfftw3 ${FFMPEG_LIBS} ${WAIFU_LIB})

# C++14
set_property(TARGET OvermixCore PROPERTY CXX_STANDARD 14)
Expand Down
2 changes: 2 additions & 0 deletions src/renders/EstimatorRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ ImageEx EstimatorRender::render(const AContainer &group, AProcessWatcher *watche
est[c] = output_copy;
}
}

est.alpha_plane() = {};

return est;
}
3 changes: 2 additions & 1 deletion src/utils/SRSampleCreator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ using namespace Overmix;

void SRSampleCreator::render( ImageContainer& add_to, const ImageEx& img ) const{
//TODO:
Point<unsigned> size( (img.get_width()-3) / scale * scale, (img.get_height()-3) / scale * scale );
Point<unsigned> size( (img.get_width()-(scale-1)) / scale * scale, (img.get_height()-(scale-1)) / scale * scale );
Point<unsigned> size_lr( size.x / scale, size.y / scale );
for( int x=0; x<scale; x++ )
for( int y=0; y<scale; y++ ){
Expand All @@ -39,4 +39,5 @@ void SRSampleCreator::render( ImageContainer& add_to, const ImageEx& img ) const
add_to.addImage( std::move(sample), -1, -1, QString::fromUtf8(("lr_" + std::to_string(x) + "_" + std::to_string(y)).c_str()) );
add_to.setPos( add_to.count()-1, offset );
}
add_to.setAligned();
}

0 comments on commit 1a2815e

Please sign in to comment.