diff -Nru slowmovideo-2.6.20120712/CMakeLists.txt slowmovideo-0.3/CMakeLists.txt --- slowmovideo-2.6.20120712/CMakeLists.txt 2012-07-21 07:06:37.000000000 +0000 +++ slowmovideo-0.3/CMakeLists.txt 2012-12-02 12:21:58.000000000 +0000 @@ -5,7 +5,6 @@ project(slowmoVideo) - # Installation prefix # Thanks to David Cole: http://www.mail-archive.com/cmake@cmake.org/msg07872.html #get_filename_component(SV_INST_DIR "${slowmoVideo_SOURCE_DIR}/../install/" ABSOLUTE) @@ -13,16 +12,28 @@ #set(CMAKE_INSTALL_PREFIX ${INSTALL_PREFIX} CACHE INTERNAL "Install prefix" FORCE) -## Compiler options ## +### Compiler options ### # To compile with clang: #set(CMAKE_CXX_COMPILER "clang++") set(CMAKE_BUILD_TYPE Debug) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O2 -mtune=corei7") #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall --verbose") +if(CMAKE_TOOLCHAIN_FILE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMXE") + set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -DMXE") +endif(CMAKE_TOOLCHAIN_FILE) + +### CMake Configuration ### +set(ADDITIONAL_LIBS "") +if(MSYS) + message(STATUS "MSYS system detected.") + include("${PROJECT_SOURCE_DIR}/cmake/MingwCrossEnv.cmake") +endif(MSYS) -## Find packages ## + +### Find packages ### set(CMAKE_MODULE_PATH ${slowmoVideo_SOURCE_DIR}/cmake @@ -37,7 +48,13 @@ include(${QT_USE_FILE}) include_directories(${QT_INCLUDES}) -find_package(FFMPEG) + +if(NOT MSYS) + find_package(FFMPEG) +else(NOT MSYS) + # Handled by MingwCrossEnv.cmake to avoid errors like: + # libavformat.a(avisynth.o):avisynth.c:(.text+0x6b): undefined reference to `AVIStreamRelease@4' +endif(NOT MSYS) include_directories(${FFMPEG_INCLUDE_DIR}) link_directories(${FFMPEG_LIBRARY_DIR}) @@ -45,10 +62,27 @@ include_directories(${OPENCV_INCLUDE_DIRS}) + +### Set up libraries ### +if(MSYS) + set(EXTERNAL_LIBS ${FFMPEG_LIBRARIES} ${QT_LIBRARIES} ${OpenCV_LIBS_OPT} ${OpenCV_EXTRA_LIBS_OPT} ${ADDITIONAL_LIBS}) +else(MSYS) + set(EXTERNAL_LIBS ${FFMPEG_LIBRARIES} ${QT_LIBRARIES} ${OpenCV_LIBS} ${ADDITIONAL_LIBS}) +endif(MSYS) + + +### Information output +set(BUILD_SLOWMO "NO") +if(QT_LIBRARIES AND FFMPEG_FOUND) set(BUILD_SLOWMO "YES") -if(QT_LIBRARIES AND FFMPEG_FOUND AND FFMPEG_SWSCALE_FOUND) -set(BUILD_SLOWMO "YES") -endif(QT_LIBRARIES AND FFMPEG_FOUND AND FFMPEG_SWSCALE_FOUND) +endif(QT_LIBRARIES AND FFMPEG_FOUND) +if(NOT FFMPEG_SWSCALE_FOUND) + if(CMAKE_TOOLCHAIN_FILE) + + else(CMAKE_TOOLCHAIN_FILE) + set(BUILD_SLOWMO "NO") + endif(CMAKE_TOOLCHAIN_FILE) +endif(NOT FFMPEG_SWSCALE_FOUND) message("==================================================") message("* slowmoVideo installation goes to ${CMAKE_INSTALL_PREFIX}.") @@ -78,6 +112,9 @@ endif(NOT BUILD_SLOWMO) + + + ## Include projects to build ## add_subdirectory(lib) diff -Nru slowmovideo-2.6.20120712/cmake/MingwCrossEnv.cmake slowmovideo-0.3/cmake/MingwCrossEnv.cmake --- slowmovideo-2.6.20120712/cmake/MingwCrossEnv.cmake 1970-01-01 00:00:00.000000000 +0000 +++ slowmovideo-0.3/cmake/MingwCrossEnv.cmake 2012-10-21 09:25:38.000000000 +0000 @@ -0,0 +1,47 @@ + +add_definitions(-DWINDOWS) +set(WINDOWS "yes") + + + +# Make QJson build statically (flag QJson patched by cross-env) +# Thanks to Mark Brand for the hint +add_definitions(-DQJSON_STATIC) + + + +# Find the FFMPEG libraries with PkgConfig +# Thanks to Martin Müllenhaupt for the code +message(STATUS "Checking ffmpeg with pkg_check_modules") +find_package(PkgConfig REQUIRED) + +pkg_check_modules(FFMPEG_avdevice libavdevice) +SET(FFMPEG_avdevice_LIBRARY ${FFMPEG_avdevice_STATIC_LIBRARIES}) + +pkg_check_modules(FFMPEG_avfilter libavfilter) +SET(FFMPEG_avfilter_LIBRARY ${FFMPEG_avfilter_STATIC_LIBRARIES}) + +pkg_check_modules(FFMPEG_avformat libavformat) +SET(FFMPEG_avformat_LIBRARY ${FFMPEG_avformat_STATIC_LIBRARIES}) + +pkg_check_modules(FFMPEG_avcodec libavcodec) +SET(FFMPEG_avcodec_LIBRARY ${FFMPEG_avcodec_STATIC_LIBRARIES}) + +pkg_check_modules(FFMPEG_postproc libpostproc) +SET(FFMPEG_postproc_LIBRARY ${FFMPEG_postproc_STATIC_LIBRARIES}) + +pkg_check_modules(FFMPEG_swscale libswscale) +SET(FFMPEG_swscale_LIBRARY ${FFMPEG_swscale_STATIC_LIBRARIES}) + +pkg_check_modules(FFMPEG_avutil libavutil) +SET(FFMPEG_avutil_LIBRARY ${FFMPEG_avutil_STATIC_LIBRARIES}) + +SET(FFMPEG_INCLUDE_DIRS ${FFMPEG_avdevice_INCLUDE_DIRS} ${FFMPEG_avfilter_INCLUDE_DIRS} ${FFMPEG_avformat_INCLUDE_DIRS} ${FFMPEG_avcodec_INCLUDE_DIRS} ${FFMPEG_postproc_INCLUDE_DIRS} ${FFMPEG_swscale_INCLUDE_DIRS} ${FFMPEG_avutil_INCLUDE_DIRS}) +SET(FFMPEG_LIBRARIES ${FFMPEG_avdevice_STATIC_LIBRARIES} ${FFMPEG_avfilter_STATIC_LIBRARIES} ${FFMPEG_avformat_STATIC_LIBRARIES} ${FFMPEG_avcodec_STATIC_LIBRARIES} ${FFMPEG_postproc_STATIC_LIBRARIES} ${FFMPEG_swscale_STATIC_LIBRARIES} ${FFMPEG_avutil_STATIC_LIBRARIES}) +SET(FFMPEG_INCLUDE_DIR ${FFMPEG_avcodec_INCLUDE_DIRS}) +SET(FFMPEG_FOUND ${FFMPEG_avcodec_FOUND}) + + +set(ADDITIONAL_LIBS + lzma lcms +) diff -Nru slowmovideo-2.6.20120712/debian/changelog slowmovideo-0.3/debian/changelog --- slowmovideo-2.6.20120712/debian/changelog 2012-07-21 13:36:08.000000000 +0000 +++ slowmovideo-0.3/debian/changelog 2012-11-25 18:36:53.000000000 +0000 @@ -1,4 +1,4 @@ -slowmovideo (2.6.20120712-dhor1~precise) precise; urgency=low +slowmovideo (0.3-20121125dhor~precise) precise; urgency=low * Initial release diff -Nru slowmovideo-2.6.20120712/lib/CMakeLists.txt slowmovideo-0.3/lib/CMakeLists.txt --- slowmovideo-2.6.20120712/lib/CMakeLists.txt 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/lib/CMakeLists.txt 2012-10-21 09:25:38.000000000 +0000 @@ -18,6 +18,7 @@ set(LIB_SRC_VIDEO defs_sV.h videoInfo_sV.c + avconvInfo_sV.cpp ) set(LIB_SRC_ARGS diff -Nru slowmovideo-2.6.20120712/lib/avconvInfo_sV.cpp slowmovideo-0.3/lib/avconvInfo_sV.cpp --- slowmovideo-2.6.20120712/lib/avconvInfo_sV.cpp 1970-01-01 00:00:00.000000000 +0000 +++ slowmovideo-0.3/lib/avconvInfo_sV.cpp 2012-10-21 09:25:38.000000000 +0000 @@ -0,0 +1,96 @@ +#include "avconvInfo_sV.h" + +#include "QProcess" +#include "QFileInfo" + +AvconvInfo::AvconvInfo() : + m_executablePath(""), + m_dist(Dist_avconv) +{} + + +bool AvconvInfo::testAvconvExecutable(QString path) +{ + QProcess ffmpeg(NULL); + QStringList args; + args << "-version"; + ffmpeg.start(path, args); + ffmpeg.waitForFinished(5000); + QByteArray output = ffmpeg.readAllStandardOutput(); + return output.size() > 0; + +} +bool AvconvInfo::locate(QString executablePath) +{ + QStringList paths; + + if (executablePath.size() > 0) { + paths << executablePath; + } + + paths + << "avconv" + << "ffmpeg" + #ifndef WINDOWS + << "/usr/bin/avconv" + << "/usr/bin/ffmpeg" + << "/usr/local/bin/avconv" + << "/usr/local/bin/ffmpeg" + #endif + ; + + bool found = false; + foreach (QString path, paths) { + if (testAvconvExecutable(path)) { + m_executablePath = path; + found = true; + identify(); + break; + } + } + + if (found) { + printInfo(); + } else { + qDebug() << "Did not find avconv/ffmpeg. Searched at the following locations:"; + foreach (QString path, paths) { + qDebug() << "* " << QFileInfo(path).absoluteFilePath(); + } + } + + return found; +} + +void AvconvInfo::identify() +{ + QProcess ffmpeg(NULL); + QStringList args; + args << "-version"; + ffmpeg.start(m_executablePath, args); + ffmpeg.waitForFinished(5000); + QByteArray output = ffmpeg.readAllStandardOutput(); + if (output.indexOf("avconv") >= 0) { + m_dist = Dist_avconv; + } else { + m_dist = Dist_ffmpeg; + } +} + +void AvconvInfo::printInfo() const +{ + qDebug() << "Found avconv/ffmpeg executable at " << QFileInfo(m_executablePath).absoluteFilePath() << + "\n\tDistribution: " << (m_dist == Dist_avconv ? "avconv" : "ffmpeg"); +} + +QString AvconvInfo::executablePath() const +{ + return m_executablePath; +} +QString AvconvInfo::optionSameQuant() const +{ + if (m_dist == Dist_avconv) { + return "-same_quant"; + } else { + return "-sameq"; + } +} diff -Nru slowmovideo-2.6.20120712/lib/avconvInfo_sV.h slowmovideo-0.3/lib/avconvInfo_sV.h --- slowmovideo-2.6.20120712/lib/avconvInfo_sV.h 1970-01-01 00:00:00.000000000 +0000 +++ slowmovideo-0.3/lib/avconvInfo_sV.h 2012-10-21 09:25:38.000000000 +0000 @@ -0,0 +1,33 @@ +#ifndef AVCONVINFO_H +#define AVCONVINFO_H + +#include "../lib/defs_sV.hpp" +#include + +class AvconvInfo +{ +public: + enum Distribution { Dist_ffmpeg, Dist_avconv }; + + + static bool testAvconvExecutable(QString path); + + + AvconvInfo(); + + bool locate(QString executablePath = ""); + + QString executablePath() const; + QString optionSameQuant() const; + + Distribution distribution() const; + void printInfo() const; + +private: + void identify(); + + QString m_executablePath; + Distribution m_dist; +}; + +#endif // AVCONVINFO_H diff -Nru slowmovideo-2.6.20120712/lib/defs_sV.h slowmovideo-0.3/lib/defs_sV.h --- slowmovideo-2.6.20120712/lib/defs_sV.h 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/lib/defs_sV.h 2012-10-21 09:25:38.000000000 +0000 @@ -3,7 +3,7 @@ #include "macros_sV.h" -#ifdef WINDOWS +#if defined(WINDOWS) && !defined(MXE) typedef __int64 int64_t; #else #include diff -Nru slowmovideo-2.6.20120712/lib/defs_sV.hpp slowmovideo-0.3/lib/defs_sV.hpp --- slowmovideo-2.6.20120712/lib/defs_sV.hpp 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/lib/defs_sV.hpp 2012-10-21 09:25:38.000000000 +0000 @@ -13,7 +13,7 @@ #include "macros_sV.h" -#ifdef WINDOWS +#if defined(WINDOWS) && !defined(MXE) typedef __int64 int64_t; #else #include @@ -27,8 +27,8 @@ #include #define SLOWMOVIDEO_VERSION_MAJOR 0 -#define SLOWMOVIDEO_VERSION_MINOR 2 -#define SLOWMOVIDEO_VERSION_MICRO 6 +#define SLOWMOVIDEO_VERSION_MINOR 3 +#define SLOWMOVIDEO_VERSION_MICRO 0 /// Contains information about this slowmoVideo version diff -Nru slowmovideo-2.6.20120712/lib/flowField_sV.cpp slowmovideo-0.3/lib/flowField_sV.cpp --- slowmovideo-2.6.20120712/lib/flowField_sV.cpp 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/lib/flowField_sV.cpp 2012-10-21 09:25:38.000000000 +0000 @@ -9,6 +9,7 @@ */ #include "flowField_sV.h" +#include "string.h" #include float FlowField_sV::nullValue = 65535; @@ -27,6 +28,9 @@ m_data = new float[2*m_width*m_height]; switch (format) { + case GLFormat_RG: + memcpy(m_data, data, width*height*2*sizeof(float)); + break; case GLFormat_RGB: default: float *fieldData = m_data; diff -Nru slowmovideo-2.6.20120712/lib/flowField_sV.h slowmovideo-0.3/lib/flowField_sV.h --- slowmovideo-2.6.20120712/lib/flowField_sV.h 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/lib/flowField_sV.h 2012-10-21 09:25:38.000000000 +0000 @@ -26,7 +26,7 @@ { public: /** OpenGL format */ - enum GLFormat { GLFormat_RGB }; + enum GLFormat { GLFormat_RGB, GLFormat_RG }; static float nullValue; diff -Nru slowmovideo-2.6.20120712/libgui/CMakeLists.txt slowmovideo-0.3/libgui/CMakeLists.txt --- slowmovideo-2.6.20120712/libgui/CMakeLists.txt 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/libgui/CMakeLists.txt 2012-10-21 09:25:38.000000000 +0000 @@ -15,7 +15,7 @@ include_directories(${CMAKE_BINARY_DIR}/libgui) add_library(sVgui STATIC ${SRCS} ${MOC_OUT}) -target_link_libraries(sVgui ${QT_LIBRARIES}) +target_link_libraries(sVgui ${EXTERNAL_LIBS}) # If the library is used in a different project, cmake requires: #include_directories(${slowmoVideo_SOURCE_DIR}/libgui) diff -Nru slowmovideo-2.6.20120712/project/CMakeLists.txt slowmovideo-0.3/project/CMakeLists.txt --- slowmovideo-2.6.20120712/project/CMakeLists.txt 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/project/CMakeLists.txt 2012-10-21 09:25:38.000000000 +0000 @@ -39,4 +39,4 @@ qt4_wrap_cpp(MOC_OUT ${SRCS_MOC}) add_library(sVproj STATIC ${SRCS_PROJ} ${MOC_OUT}) -target_link_libraries(sVproj sV sVinfo sVflow sVencode ${QT_LIBRARIES} ${OpenCV_LIBS}) +target_link_libraries(sVproj sV sVinfo sVflow sVencode ${EXTERNAL_LIBS}) diff -Nru slowmovideo-2.6.20120712/project/nodeList_sV.cpp slowmovideo-0.3/project/nodeList_sV.cpp --- slowmovideo-2.6.20120712/project/nodeList_sV.cpp 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/project/nodeList_sV.cpp 2012-10-21 09:25:38.000000000 +0000 @@ -52,6 +52,12 @@ return 0; } } +bool NodeList_sV::isInsideCurve(qreal targetTime) const +{ + return m_list.size() >= 2 && + startTime() <= targetTime && + targetTime <= endTime(); +} qreal NodeList_sV::totalTime() const { return endTime()-startTime(); diff -Nru slowmovideo-2.6.20120712/project/nodeList_sV.h slowmovideo-0.3/project/nodeList_sV.h --- slowmovideo-2.6.20120712/project/nodeList_sV.h 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/project/nodeList_sV.h 2012-10-21 09:25:38.000000000 +0000 @@ -64,6 +64,7 @@ qreal startTime() const; ///< Time of the first node qreal endTime() const; ///< Time of the rightmost node. See totalTime() for the curve length. qreal totalTime() const; ///< Length of the curve, ignores space (startTime())at the beginning. + bool isInsideCurve(qreal targetTime) const; ///< Returns true if startTime <= targetTime <= endTime /** Add a new node at the given position. diff -Nru slowmovideo-2.6.20120712/project/shutterFunction_sV.h slowmovideo-0.3/project/shutterFunction_sV.h --- slowmovideo-2.6.20120712/project/shutterFunction_sV.h 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/project/shutterFunction_sV.h 2012-10-21 09:25:38.000000000 +0000 @@ -69,12 +69,14 @@ /// Code used by this function QString function() const; /** - Evaluates the function with the given parameters. + Evaluates the function with the given parameters. The returned value is + the desired shutter duration in seconds. \param x x location between two nodes, scaled to
[0,1]
\param t Output time - \param fps Frames per second + \param fps Output frames per second \param y Source frame at position x \param dy y change to the next frame + \return Shutter duration in seconds */ float evaluate(const float x, const float t, const float fps, const float y, const float dy); diff -Nru slowmovideo-2.6.20120712/project/videoFrameSource_sV.cpp slowmovideo-0.3/project/videoFrameSource_sV.cpp --- slowmovideo-2.6.20120712/project/videoFrameSource_sV.cpp 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/project/videoFrameSource_sV.cpp 2012-10-21 09:25:38.000000000 +0000 @@ -57,32 +57,6 @@ delete m_videoInfo; } -bool VideoFrameSource_sV::testFfmpegExecutable(QString path) -{ - QProcess ffmpeg(this); - QStringList args; - args << "-version"; - ffmpeg.start(path, args); - ffmpeg.waitForFinished(2000); - QByteArray output = ffmpeg.readAllStandardOutput(); - return output.size() > 0; - -} -void VideoFrameSource_sV::locateFFmpeg() -{ - QString path = m_settings.value("binaries/ffmpeg", "ffmpeg").toString(); - if (!testFfmpegExecutable(path)) { - path = "avconv"; - if (!testFfmpegExecutable(path)) { - throw FrameSourceError(QString("ffmpeg/avconv executable not found! Cannot load video." - "\n(It is also possible that it took a little long to respond " - "due to high workload, so you might want to try again.)")); - } - qDebug() << "Changing from ffmpeg to avconv"; - m_settings.setValue("binaries/ffmpeg", "avconv"); - m_settings.sync(); - } -} void VideoFrameSource_sV::slotUpdateProjectDir() { @@ -149,7 +123,7 @@ QStringList args; args << "-i" << m_inFile.fileName(); args << "-f" << "image2"; - args << "-sameq"; + args << m_avconvInfo.optionSameQuant(); if (frameSize == FrameSize_Small) { int w = m_videoInfo->width; @@ -165,6 +139,15 @@ args << m_dirFramesOrig.absoluteFilePath("frame%05d.png"); } + qDebug() << "Extracting frames with " << m_settings.value("binaries/ffmpeg", "ffmpeg").toString() << args; +// { +// QStringList a2; +// a2 << "-version"; +// process->start(m_settings.value("binaries/ffmpeg").toString());//, "ffmpeg").toString(), a2); +// qDebug() << process->readAllStandardOutput(); +// qDebug() << process->readAllStandardError(); +// process->terminate(); +// } process->start(m_settings.value("binaries/ffmpeg", "ffmpeg").toString(), args); qDebug() << process->readAllStandardOutput(); qDebug() << process->readAllStandardError(); @@ -183,6 +166,18 @@ return needsRebuild; } +void VideoFrameSource_sV::locateFFmpeg() +{ + if (m_avconvInfo.locate(m_settings.value("binaries/ffmpeg", "").toString())) { + m_settings.setValue("binaries/ffmpeg", m_avconvInfo.executablePath()); + m_settings.sync(); + } else { + throw FrameSourceError(QString("ffmpeg/avconv executable not found! Cannot load video." + "\n(It is also possible that it took a little long to respond " + "due to high workload, so you might want to try again.)")); + } +} + void VideoFrameSource_sV::slotExtractSmallFrames() { emit signalNextTask("Extracting thumbnail-sized frames from the video file", m_videoInfo->framesCount); diff -Nru slowmovideo-2.6.20120712/project/videoFrameSource_sV.h slowmovideo-0.3/project/videoFrameSource_sV.h --- slowmovideo-2.6.20120712/project/videoFrameSource_sV.h 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/project/videoFrameSource_sV.h 2012-10-21 09:25:38.000000000 +0000 @@ -13,6 +13,7 @@ #include "abstractFrameSource_sV.h" #include "../lib/defs_sV.hpp" +#include "../lib/avconvInfo_sV.h" #include #include #include @@ -29,6 +30,7 @@ /** \brief Uses frames from a video file \todo Use libav directly for frame extraction? (not the ffmpeg command) + \todo Extract full frames only before rendering, only used ones */ class VideoFrameSource_sV : public AbstractFrameSource_sV { @@ -63,6 +65,7 @@ QDir m_dirFramesSmall; QDir m_dirFramesOrig; QSettings m_settings; + AvconvInfo m_avconvInfo; VideoInfoSV *m_videoInfo; Fps_sV m_fps; @@ -85,7 +88,9 @@ bool rebuildRequired(const FrameSize frameSize); void locateFFmpeg(); - bool testFfmpegExecutable(QString path); + +public: + static bool testFfmpegExecutable(QString path); signals: /** Emitted when the task for extracting original-sized images has finished (or has been terminated) */ diff -Nru slowmovideo-2.6.20120712/slowmoCLI/CMakeLists.txt slowmovideo-0.3/slowmoCLI/CMakeLists.txt --- slowmovideo-2.6.20120712/slowmoCLI/CMakeLists.txt 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/slowmoCLI/CMakeLists.txt 2012-10-21 09:25:38.000000000 +0000 @@ -11,10 +11,10 @@ ) add_executable(slowmoInterpolate ${SOURCES_MAIN}) -target_link_libraries(slowmoInterpolate sV sVflow ${QT_LIBRARIES}) +target_link_libraries(slowmoInterpolate sV sVflow ${EXTERNAL_LIBS}) add_executable(videoInfo ${SOURCES_VINFO}) -target_link_libraries(videoInfo sVinfo) +target_link_libraries(videoInfo sVinfo ${EXTERNAL_LIBS}) install(TARGETS slowmoInterpolate DESTINATION bin) install(TARGETS videoInfo DESTINATION bin) diff -Nru slowmovideo-2.6.20120712/slowmoFlowEdit/CMakeLists.txt slowmovideo-0.3/slowmoFlowEdit/CMakeLists.txt --- slowmovideo-2.6.20120712/slowmoFlowEdit/CMakeLists.txt 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/slowmoFlowEdit/CMakeLists.txt 2012-10-21 09:25:38.000000000 +0000 @@ -28,6 +28,6 @@ include_directories(${CMAKE_BINARY_DIR}/slowmoFlowEdit) add_executable(slowmoFlowEdit ${SRCS} ${MOC_OUT} ${UI_H_OUT}) -target_link_libraries(slowmoFlowEdit sVgui sVflow sVvis ${QT_LIBRARIES}) +target_link_libraries(slowmoFlowEdit sVgui sVflow sVvis ${EXTERNAL_LIBS}) install(TARGETS slowmoFlowEdit DESTINATION bin) diff -Nru slowmovideo-2.6.20120712/slowmoFlowEdit/mainwindow.cpp slowmovideo-0.3/slowmoFlowEdit/mainwindow.cpp --- slowmovideo-2.6.20120712/slowmoFlowEdit/mainwindow.cpp 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/slowmoFlowEdit/mainwindow.cpp 2012-10-21 09:25:38.000000000 +0000 @@ -102,25 +102,48 @@ QString MainWindow::nextFilename(QString originalName, int shift) const { - QStringList parts; - QRegExp e("(\\d+)"); - int min = originalName.indexOf("_"); - int pos = 0; - int prevPos = 0; - while ((pos = e.indexIn(originalName, pos)) != -1) { - parts << originalName.mid(prevPos, pos-prevPos); + if (false) { + QStringList parts; + QRegExp e("(\\d+)"); + int min = originalName.indexOf("_"); + int pos = 0; + int prevPos = 0; + while ((pos = e.indexIn(originalName, pos)) != -1) { + parts << originalName.mid(prevPos, pos-prevPos); + + if (pos > min) { + parts << QVariant(e.cap(1).toInt()+shift).toString(); + } else { + parts << e.cap(1); + } - if (pos > min) { - parts << QVariant(e.cap(1).toInt()+shift).toString(); + pos += e.matchedLength(); + prevPos = pos; + } + parts << originalName.mid(prevPos); + return parts.join(""); + } else { + QStringList filters; + filters << "*.sVflow"; + + QDir dir(QFileInfo(originalName).absolutePath()); + QStringList filenames = dir.entryList(filters, QDir::Files | QDir::Readable, QDir::Name); + + QString current = QFileInfo(originalName).fileName(); + QString next; + if (filenames.contains(current)) { + int index = filenames.indexOf(current); + if (filenames.size() > index+shift && index+shift >= 0) { + next = QFileInfo(originalName).absolutePath() + "/" + filenames[index+shift]; + } else { + qDebug() << "No file in this direction"; + } } else { - parts << e.cap(1); + qDebug() << filenames; } - pos += e.matchedLength(); - prevPos = pos; + return next; } - parts << originalName.mid(prevPos); - return parts.join(""); } void MainWindow::loadFlow(QString filename) diff -Nru slowmovideo-2.6.20120712/slowmoInfo/CMakeLists.txt slowmovideo-0.3/slowmoInfo/CMakeLists.txt --- slowmovideo-2.6.20120712/slowmoInfo/CMakeLists.txt 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/slowmoInfo/CMakeLists.txt 2012-10-21 09:25:38.000000000 +0000 @@ -1,5 +1,5 @@ add_executable(slowmoInfo slowmoInfo.cpp) -target_link_libraries(slowmoInfo sV ${QT_LIBRARIES}) +target_link_libraries(slowmoInfo sV ${EXTERNAL_LIBS}) -install(TARGETS slowmoInfo DESTINATION "bin") \ No newline at end of file +install(TARGETS slowmoInfo DESTINATION "bin") diff -Nru slowmovideo-2.6.20120712/slowmoRenderer/CMakeLists.txt slowmovideo-0.3/slowmoRenderer/CMakeLists.txt --- slowmovideo-2.6.20120712/slowmoRenderer/CMakeLists.txt 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/slowmoRenderer/CMakeLists.txt 2012-10-21 09:25:38.000000000 +0000 @@ -11,5 +11,5 @@ qt4_wrap_cpp(MOC_OUT ${SRCS_MOC}) add_executable(slowmoRenderer ${SRCS} ${MOC_OUT}) -target_link_libraries(slowmoRenderer sVproj) +target_link_libraries(slowmoRenderer sVproj ${EXTERNAL_LIBS}) install(TARGETS slowmoRenderer DESTINATION bin) diff -Nru slowmovideo-2.6.20120712/slowmoUI/CMakeLists.txt slowmovideo-0.3/slowmoUI/CMakeLists.txt --- slowmovideo-2.6.20120712/slowmoUI/CMakeLists.txt 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/slowmoUI/CMakeLists.txt 2012-10-21 09:25:38.000000000 +0000 @@ -77,6 +77,6 @@ include_directories(${CMAKE_BINARY_DIR}/slowmoUI) add_executable(slowmoUI ${SRCS} ${MOC_OUT} ${UI_H_OUT} ${RES_OUT}) -target_link_libraries(slowmoUI sVproj sVvis sVgui ${QT_LIBRARIES}) +target_link_libraries(slowmoUI sVproj sVvis sVgui ${EXTERNAL_LIBS}) install(TARGETS slowmoUI DESTINATION bin) diff -Nru slowmovideo-2.6.20120712/slowmoUI/canvas.cpp slowmovideo-0.3/slowmoUI/canvas.cpp --- slowmovideo-2.6.20120712/slowmoUI/canvas.cpp 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/slowmoUI/canvas.cpp 2012-10-21 09:25:38.000000000 +0000 @@ -205,6 +205,12 @@ repaint(); } +void Canvas::showHelp(bool show) +{ + m_showHelp = show; + repaint(); +} + void Canvas::toggleHelp() { m_showHelp = !m_showHelp; @@ -260,7 +266,24 @@ pos.y() < height()-m_distBottom; } - +QRect Canvas::leftDrawingRect(int y, const int height, const int min, const int max) const +{ + if (y < min) { y = min; } + if (max > 0 && y > max-height) { y = max-height; } + return QRect(8, y-6, m_distLeft-2*8, 50); +} +QRect Canvas::bottomDrawingRect(int x, const int width, const int min, const int max, bool rightJustified) const +{ + if (rightJustified) { + if (max > 0 && x > max) { x = max; } + if (min > 0 && x< min+width) { x = min+width; } + return QRect(x-width, height()-1 - (m_distBottom-8), width, m_distBottom-2*8); + } else { + if (max > 0 && x > max-width) { x = max-width; } + if (min > 0 && x < min) { x = min; } + return QRect(x, height()-1 - (m_distBottom-8), width, m_distBottom-2*8); + } +} void Canvas::paintEvent(QPaintEvent *) { @@ -335,19 +358,20 @@ // Frames/seconds davinci.setPen(lineCol); if (m_mouseWithinWidget && insideCanvas(m_states.prevMousePos)) { - QString timeText; + QString timeText, speedText; Node_sV time = convertCanvasToTime(m_states.prevMousePos); - int posX; - davinci.drawLine(m_states.prevMousePos.x(), m_distTop, m_states.prevMousePos.x(), height()-1 - m_distBottom); + const int mX = m_states.prevMousePos.x(); + const int mY = m_states.prevMousePos.y(); + + davinci.drawLine(mX, m_distTop, mX, height()-1 - m_distBottom); timeText = CanvasTools::outputTimeLabel(this, time); + speedText = CanvasTools::outputSpeedLabel(time, m_project); // Ensure that the text does not go over the right border - posX = m_states.prevMousePos.x() - 20; - if (posX > width()-m_distLeft-40) { - posX = width()-m_distLeft-40; - } - davinci.drawText(posX-180, height()-1 - (m_distBottom-8), 200, m_distBottom-2*8, Qt::AlignRight, timeText); - davinci.drawLine(m_distLeft, m_states.prevMousePos.y(), m_states.prevMousePos.x(), m_states.prevMousePos.y()); + + davinci.drawText(bottomDrawingRect(mX-20, 160, m_distLeft, -180+width()-m_distRight-50), Qt::AlignRight, timeText); + davinci.drawText(bottomDrawingRect(mX+20, 160, m_distLeft+180, width()-m_distRight-50, false), Qt::AlignLeft, speedText); + davinci.drawLine(m_distLeft, mY, mX, mY); if (time.y() < 60) { timeText = QString("f %1\n%2 s") .arg(time.y()*m_project->frameSource()->fps()->fps(), 2, 'f', 2) @@ -358,7 +382,32 @@ .arg(int(time.y()/60)) .arg(time.y()-60*int(time.y()/60), 0, 'f', 2); } - davinci.drawText(8, m_states.prevMousePos.y()-6, m_distLeft-2*8, 50, Qt::AlignRight, timeText); + davinci.drawText(leftDrawingRect(mY, 48, m_distTop+24, height()-m_distBottom), Qt::AlignRight, timeText); + } + { + Node_sV node; QString timeText ; + + // yMax + node = convertCanvasToTime(QPoint(m_distLeft, m_distTop)); + timeText = QString("f %1").arg(node.y(), 0, 'f', 1); + davinci.drawText(leftDrawingRect(m_distTop), Qt::AlignRight, timeText); + + // yMin + node = convertCanvasToTime(QPoint(m_distLeft, height()-1 - m_distBottom)); + timeText = QString("f %1").arg(node.y(), 0, 'f', 1); + davinci.drawText(leftDrawingRect(height()-m_distBottom-8), Qt::AlignRight, timeText); + + // xMin + node = convertCanvasToTime(QPoint(m_distLeft, height()-1 - m_distBottom)); + timeText = QString("f %1").arg(node.x(), 0, 'f', 1); + davinci.drawText(bottomDrawingRect(m_distLeft+8), Qt::AlignRight, timeText); + + // xMax + node = convertCanvasToTime(QPoint(width()-1 - m_distRight, height()-1 - m_distBottom)); + timeText = QString("f %1").arg(node.x(), 0, 'f', 1); + davinci.drawText(bottomDrawingRect(width()-1-m_distRight), Qt::AlignRight, timeText); + + } int bottom = height()-1 - m_distBottom; davinci.drawLine(m_distLeft, bottom, width()-1 - m_distRight, bottom); @@ -393,7 +442,7 @@ qreal outTime = time.x(); qreal sourceTime = time.y(); - qreal sourceFrame = sourceFrame * sourceFps; + qreal sourceFrame = sourceTime * sourceFps; float dy; if (outTime + 1/outFps <= m_nodes->endTime()) { diff -Nru slowmovideo-2.6.20120712/slowmoUI/canvas.h slowmovideo-0.3/slowmoUI/canvas.h --- slowmovideo-2.6.20120712/slowmoUI/canvas.h 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/slowmoUI/canvas.h 2012-10-21 09:25:38.000000000 +0000 @@ -103,6 +103,7 @@ void load(Project_sV *project); + void showHelp(bool show); void toggleHelp(); const QPointF prevMouseTime() const; @@ -239,6 +240,9 @@ private: void zoom(bool in, QPoint pos); + QRect leftDrawingRect(int y, const int height = 12, const int min = -1, const int max = -1) const; + QRect bottomDrawingRect(int x, const int width = 160, const int min = -1, const int max = -1, bool rightJustified = true) const; + }; QDebug operator<<(QDebug qd, const Canvas::ToolMode &mode); diff -Nru slowmovideo-2.6.20120712/slowmoUI/canvasTools.cpp slowmovideo-0.3/slowmoUI/canvasTools.cpp --- slowmovideo-2.6.20120712/slowmoUI/canvasTools.cpp 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/slowmoUI/canvasTools.cpp 2012-10-21 09:25:38.000000000 +0000 @@ -11,6 +11,7 @@ #include "canvasTools.h" #include "canvas.h" +#include "project/project_sV.h" #include "project/projectPreferences_sV.h" //#define DEBUG @@ -44,3 +45,33 @@ return timeText; } + +QString CanvasTools::outputSpeedLabel(Node_sV &time, Project_sV *project) +{ + if (!project->nodes()->isInsideCurve(time.x())) { + return ""; + } + + const qreal dx = 1.0/project->preferences()->canvas_xAxisFPS().fps(); + + + qreal t1, t2; + if (time.x()+dx <= project->nodes()->endTime()) { + t1 = project->nodes()->sourceTime(time.x()); + t2 = project->nodes()->sourceTime(time.x()+dx); + } else { + t1 = project->nodes()->sourceTime(time.x()-dx); + t2 = project->nodes()->sourceTime(time.x()); + } + + const qreal dy = t2-t1; + + qreal percent = 0; + if (dy != 0) { + percent = dy/dx; + } + + return QString("%1 %").arg(percent, 0, 'f');//, 1); + + +} diff -Nru slowmovideo-2.6.20120712/slowmoUI/canvasTools.h slowmovideo-0.3/slowmoUI/canvasTools.h --- slowmovideo-2.6.20120712/slowmoUI/canvasTools.h 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/slowmoUI/canvasTools.h 2012-10-21 09:25:38.000000000 +0000 @@ -15,11 +15,14 @@ class Canvas; class Node_sV; +class Project_sV; class CanvasTools { public: /// Assembles the output time label at cursor position, taking into account fps and axis resolution. static QString outputTimeLabel(Canvas *canvas, Node_sV &time); + /// Calculates the replay speed at mouse position in percent + static QString outputSpeedLabel(Node_sV &time, Project_sV *project); }; #endif // CANVASTOOLS_H diff -Nru slowmovideo-2.6.20120712/slowmoUI/dialogues/aboutDialog.ui slowmovideo-0.3/slowmoUI/dialogues/aboutDialog.ui --- slowmovideo-2.6.20120712/slowmoUI/dialogues/aboutDialog.ui 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/slowmoUI/dialogues/aboutDialog.ui 2012-10-21 09:25:38.000000000 +0000 @@ -6,8 +6,8 @@ 0 0 - 647 - 310 + 903 + 354 @@ -43,9 +43,16 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Bitstream Vera Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">slowmoVideo</span> is developed by Simon A. Eugster (aka. Granjow, co-author of Kdenlive) and licensed under GPLv3.</p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">slowmoVideo</span> allows to change the speed of a video clip based upon a curve. If the speed becomes higher than 1×, an exposure (shutter) effect simulates motion blur. For lower speed, frames are interpolated with optical flow.</p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Thanks for contributing:</p> +<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Mirko Götze <span style=" font-style:italic;">&lt;mail@mgo80.de&gt;</span> for converting <span style=" font-weight:600;">Cg to GLSL</span> (Removing the nVidia dependency)</li> +<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Morten Sylvest Olsen <span style=" font-style:italic;">&lt;mso@kapowsoftware.com&gt;</span> for the <span style=" font-weight:600;">V3D speedup</span> and removing the unnecessary window</li> +<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Elias Vanderstuyft for displaying the <span style=" font-weight:600;">shutter function</span> on the canvas</li> +<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Christian Frisson <span style=" font-style:italic;">&lt;christian.frisson@umons.ac.be&gt;</span> for<span style=" font-weight:600;"> OpenCV on MXE</span> (allowed me to compile slowmoVideo for Windows)</li> +<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Per <span style=" font-style:italic;">&lt;per@stuffmatic.com&gt;</span> for the<span style=" font-weight:600;"> OpenCV</span> code (slowmoVideo can run on CPU only with it)</li></ul> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Visit <a href="http://slowmoVideo.granjow.net"><span style=" text-decoration: underline; color:#0057ae;">slowmoVideo.granjow.net</span></a> for more information.</p></body></html> @@ -123,7 +130,7 @@ - (c) 2011 Simon A. Eugster + (c) 2012 Simon A. Eugster Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter diff -Nru slowmovideo-2.6.20120712/slowmoUI/dialogues/preferencesDialog.cpp slowmovideo-0.3/slowmoUI/dialogues/preferencesDialog.cpp --- slowmovideo-2.6.20120712/slowmoUI/dialogues/preferencesDialog.cpp 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/slowmoUI/dialogues/preferencesDialog.cpp 2012-10-21 09:25:38.000000000 +0000 @@ -3,6 +3,8 @@ #include "project/flowSourceV3D_sV.h" #include "lib/defs_sV.hpp" +#include "lib/avconvInfo_sV.h" +#include "../../project/videoFrameSource_sV.h" #include #include @@ -63,6 +65,13 @@ } m_settings.setValue("preferences/flowMethod", method); + // ffmpeg location + if (AvconvInfo::testAvconvExecutable(ui->ffmpeg->text())) { + m_settings.setValue("binaries/ffmpeg", ui->ffmpeg->text()); + } else { + qDebug() << "Not a valid ffmpeg/avconv executable: " << ui->ffmpeg->text(); + } + // Store the values right now m_settings.sync(); diff -Nru slowmovideo-2.6.20120712/slowmoUI/dialogues/renderingDialog.cpp slowmovideo-0.3/slowmoUI/dialogues/renderingDialog.cpp --- slowmovideo-2.6.20120712/slowmoUI/dialogues/renderingDialog.cpp 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/slowmoUI/dialogues/renderingDialog.cpp 2012-10-21 09:25:38.000000000 +0000 @@ -294,6 +294,8 @@ m_project->preferences()->renderFrameSize() = size; m_project->preferences()->renderFPS() = fps; m_project->preferences()->renderTarget() = ui->radioImages->isChecked() ? "images" : "video"; + + accept(); } bool RenderingDialog::slotValidate() diff -Nru slowmovideo-2.6.20120712/slowmoUI/dialogues/renderingDialog.ui slowmovideo-0.3/slowmoUI/dialogues/renderingDialog.ui --- slowmovideo-2.6.20120712/slowmoUI/dialogues/renderingDialog.ui 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/slowmoUI/dialogues/renderingDialog.ui 2012-10-21 09:25:38.000000000 +0000 @@ -7,7 +7,7 @@ 0 0 718 - 796 + 495 @@ -15,144 +15,6 @@ - - - - - Full Project - - - true - - - - - - - Tag section - - - - - - - Custom section - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 13 - 20 - - - - - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - 16 - - - - - - - to - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - 16 - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 30 - 20 - - - - - - - - - - - true - - - - - - Qt::Vertical @@ -169,539 +31,761 @@ - - - - - Frames per second: - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - - 100 - 0 - - - - true - - - 1 - + + + 3 + + + + a + + + a + + + Rendering settings + + - - 23.976 - + + + + + Full Project + + + true + + + + + + + Tag section + + + + + + + Custom section + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 13 + 20 + + + + + + + + + + + + 0 + 0 + + + + + 100 + 0 + + + + 16 + + + + + + + to + + + + + + + + 0 + 0 + + + + + 100 + 0 + + + + 16 + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - 24 - + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 30 + 20 + + + + + + + + + + + true + + + + - - 25 - + + + + + Frames per second: + + + + + + + + 0 + 0 + + + + + 100 + 0 + + + + + 100 + 0 + + + + true + + + 1 + + + + 23.976 + + + + + 24 + + + + + 25 + + + + + 29.976 + + + + + 30 + + + + + 50 + + + + + 60 + + + + + 72 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - 29.976 - + + + + + Size: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 10 + 20 + + + + + + + + Interpolation: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - 30 - + + + 8 + + + + + For two frames A and B, the two-way interpolations calculate both the flows A→B and B→A, which leads to smoother transitions between them. Forward interpolations only calculate A→B; Twice as fast, but usually less smooth. + + + true + + + + - - 50 - + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Optical Flow + + - - 60 - + + + Optical flow + + + + + + + + buildFlow lambda + + + + + + + + + + 5.000000000000000 + + + 50.000000000000000 + + + 1.000000000000000 + + + 20.000000000000000 + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + + + + + + 0 + 0 + + + + Use a higher value for high-quality footage and larger images. + + + true + + + + + + + + + 8 + + + + + The lambda is only used with the GPU based Optical Flow algorithm. There is no general rule which value is best, so it is usually a good idea to render a short part with a low (5) and a high (50) lambda to see the differences, and then try to find the best value between. + + + true + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + Motion Blur + + - - 72 - + + + Motion blur + + + + + + Motion blur will only be applied for segments on which it is enabled. + + + true + + + + + + + Stacking blur (Uses more disk space, but is faster for repeated rendering.) + + + + + + + + + Maximum samples + + + + + + + 1 + + + 64 + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + + + + + Samples for slow motion + + + + + + + 1 + + + 16 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Convolution blur (Smoother than stacking, usually the better choice.) + + + + + + + Nearest (no blurring) + + + + + - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Size: - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 10 - 20 - - - - - - - - Interpolation: - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - - - - Optical flow - - - - - - - - buildFlow lambda - - - - - - - - - - 5.000000000000000 - - - 50.000000000000000 - - - 1.000000000000000 - - - 20.000000000000000 - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 10 - 20 - - - - - - - - - 0 - 0 - - - - Use a higher value for high-quality footage and larger images. - - - true - - - - - - - - - - - - Motion blur - - - - - - Motion blur will only be applied for segments on which it is enabled. - - - true - - - - - - - Stacking blur - - - - - - - Uses more disk space, but is faster for repeated rendering. - - - - - - - - - Maximum samples - - - - - - - 1 - - - 64 - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 10 - 20 - - - - - - - - Samples for slow motion - - - - - - - 1 - - - 16 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Convolution blur - - - - - - - Smoother than stacking, usually the better choice. - - - - - - - Nearest (no blurring) - - - - - - - - - - - - Target: - - - - - - - true - - - Video - - - - - - - Images - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Images - - - - - - The %1 in the filename pattern is mandatory and will be replaced by the frame number. - - - - - - - - - Output directory - - - - - - - - - - Browse - - - - - - - Filename pattern - - - - - - - - - - rendered-%1.jpg - - - - - - - - - - - - - 0 - 0 - - - - Video - - - - - - Videos will be encoded with ffmpeg. If additional arguments are left empty, defaults will be used. The video format is determined by ffmpeg according to the file suffix. - - - true - - - - - - - - - Output file - - - - - - - - - - Browse - - - - - - - Optional arguments - - - - - - - - vcodec - - - - - - - - - - - - - - + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + Output + + + + + + + + Target: + + + + + + + true + + + Video + + + + + + + Images + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Images + + + + + + The %1 in the filename pattern is mandatory and will be replaced by the frame number. + + + + + + + + + Output directory + + + + + + + + + + Browse + + + + + + + Filename pattern + + + + + + + + + + rendered-%1.jpg + + + + + + + + + + + + + 0 + 0 + + + + Video + + + + + + Videos will be encoded with ffmpeg. If additional arguments are left empty, defaults will be used. The video format is determined by ffmpeg according to the file suffix. + + + true + + + + + + + + + Output file + + + + + + + + + + Browse + + + + + + + Optional arguments + + + + + + + + vcodec + + + + + + + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + - - - Qt::Vertical - - - - 20 - 40 - - - - - @@ -718,22 +802,25 @@ + + Will *not* save the project! + - Save settings + &Save settings - Abort + &Abort - Ok + &Ok diff -Nru slowmovideo-2.6.20120712/slowmoUI/mainwindow.cpp slowmovideo-0.3/slowmoUI/mainwindow.cpp --- slowmovideo-2.6.20120712/slowmoUI/mainwindow.cpp 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/slowmoUI/mainwindow.cpp 2012-10-21 09:25:38.000000000 +0000 @@ -170,6 +170,7 @@ updateWindowTitle(); setWindowIcon(QIcon(":icons/slowmoIcon.png")); + m_wCanvas->showHelp(true); if (!projectPath.isEmpty()) { @@ -289,6 +290,8 @@ project->preferences()->viewport_secRes() = QPointF(400, 400)/project->frameSource()->framesCount()*project->frameSource()->fps()->fps(); loadProject(project); + m_wCanvas->showHelp(true); + } catch (FrameSourceError &err) { QMessageBox(QMessageBox::Warning, "Frame source error", err.message()).exec(); @@ -394,7 +397,9 @@ } void MainWindow::displayHelp(QPainter &davinci) const { - QString helpText = m_cs.shortcutList(); + QString helpText = m_cs.shortcutList() + + "\nNavigation: [Shift] Scroll" + + "\nMove nodes: [Ctrl] Drag"; QRect content; const QPoint topLeft(10, 10); diff -Nru slowmovideo-2.6.20120712/test/CMakeLists.txt slowmovideo-0.3/test/CMakeLists.txt --- slowmovideo-2.6.20120712/test/CMakeLists.txt 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/test/CMakeLists.txt 2012-10-21 09:25:38.000000000 +0000 @@ -6,12 +6,16 @@ ) add_executable(Test ${SRCS}) -target_link_libraries(Test sVproj ${QT_LIBRARIES}) +target_link_libraries(Test sVproj ${EXTERNAL_LIBS}) add_executable(encodeTest encodeTest.c) -target_link_libraries(encodeTest sVencode ${FFMPEG_LIBRARIES}) +target_link_libraries(encodeTest sVencode ${EXTERNAL_LIBS}) add_executable(encodeFramesTest ffmpegTestEncodeFrames.cpp) -target_link_libraries(encodeFramesTest sVencode ${FFMPEG_LIBRARIES} ${QT_LIBRARIES}) +message(STATUS "Additional libraries: ${ADDITIONAL_LIBS}") +target_link_libraries(encodeFramesTest sVencode ${EXTERNAL_LIBS}) + +add_executable(AvconvInfo testAvconvInfo.cpp) +target_link_libraries(AvconvInfo sVinfo ${EXTERNAL_LIBS}) install(TARGETS Test DESTINATION bin) diff -Nru slowmovideo-2.6.20120712/test/Makefile slowmovideo-0.3/test/Makefile --- slowmovideo-2.6.20120712/test/Makefile 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/test/Makefile 2012-10-21 09:25:38.000000000 +0000 @@ -1,7 +1,290 @@ -.PHONY : ffmpegTest -ffmpegTest : - gcc -g -Wall -std=c99 -o ffmpegTest ffmpegTest.c -D__STDC_CONSTANT_MACROS -lavcodec -lavformat - -.PHONY : encode -encode : - gcc -g -Wall -std=c99 -o ffmpegEncodeTest ffmpegTestEncode.c -D__STDC_CONSTANT_MACROS -lavcodec -lavformat \ No newline at end of file +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.8 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/mso/src/slowmoVideo/slowmoVideo + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/mso/src/slowmoVideo/slowmoVideo + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." + /usr/bin/cmake -i . +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: install/local +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: install/strip +.PHONY : install/strip/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# The main all target +all: cmake_check_build_system + cd /home/mso/src/slowmoVideo/slowmoVideo && $(CMAKE_COMMAND) -E cmake_progress_start /home/mso/src/slowmoVideo/slowmoVideo/CMakeFiles /home/mso/src/slowmoVideo/slowmoVideo/test/CMakeFiles/progress.marks + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f CMakeFiles/Makefile2 test/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/mso/src/slowmoVideo/slowmoVideo/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f CMakeFiles/Makefile2 test/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f CMakeFiles/Makefile2 test/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f CMakeFiles/Makefile2 test/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +test/CMakeFiles/Test.dir/rule: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f CMakeFiles/Makefile2 test/CMakeFiles/Test.dir/rule +.PHONY : test/CMakeFiles/Test.dir/rule + +# Convenience name for target. +Test: test/CMakeFiles/Test.dir/rule +.PHONY : Test + +# fast build rule for target. +Test/fast: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f test/CMakeFiles/Test.dir/build.make test/CMakeFiles/Test.dir/build +.PHONY : Test/fast + +# Convenience name for target. +test/CMakeFiles/encodeFramesTest.dir/rule: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f CMakeFiles/Makefile2 test/CMakeFiles/encodeFramesTest.dir/rule +.PHONY : test/CMakeFiles/encodeFramesTest.dir/rule + +# Convenience name for target. +encodeFramesTest: test/CMakeFiles/encodeFramesTest.dir/rule +.PHONY : encodeFramesTest + +# fast build rule for target. +encodeFramesTest/fast: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f test/CMakeFiles/encodeFramesTest.dir/build.make test/CMakeFiles/encodeFramesTest.dir/build +.PHONY : encodeFramesTest/fast + +# Convenience name for target. +test/CMakeFiles/encodeTest.dir/rule: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f CMakeFiles/Makefile2 test/CMakeFiles/encodeTest.dir/rule +.PHONY : test/CMakeFiles/encodeTest.dir/rule + +# Convenience name for target. +encodeTest: test/CMakeFiles/encodeTest.dir/rule +.PHONY : encodeTest + +# fast build rule for target. +encodeTest/fast: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f test/CMakeFiles/encodeTest.dir/build.make test/CMakeFiles/encodeTest.dir/build +.PHONY : encodeTest/fast + +encodeTest.o: encodeTest.c.o +.PHONY : encodeTest.o + +# target to build an object file +encodeTest.c.o: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f test/CMakeFiles/encodeTest.dir/build.make test/CMakeFiles/encodeTest.dir/encodeTest.c.o +.PHONY : encodeTest.c.o + +encodeTest.i: encodeTest.c.i +.PHONY : encodeTest.i + +# target to preprocess a source file +encodeTest.c.i: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f test/CMakeFiles/encodeTest.dir/build.make test/CMakeFiles/encodeTest.dir/encodeTest.c.i +.PHONY : encodeTest.c.i + +encodeTest.s: encodeTest.c.s +.PHONY : encodeTest.s + +# target to generate assembly for a file +encodeTest.c.s: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f test/CMakeFiles/encodeTest.dir/build.make test/CMakeFiles/encodeTest.dir/encodeTest.c.s +.PHONY : encodeTest.c.s + +ffmpegTestEncodeFrames.o: ffmpegTestEncodeFrames.cpp.o +.PHONY : ffmpegTestEncodeFrames.o + +# target to build an object file +ffmpegTestEncodeFrames.cpp.o: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f test/CMakeFiles/encodeFramesTest.dir/build.make test/CMakeFiles/encodeFramesTest.dir/ffmpegTestEncodeFrames.cpp.o +.PHONY : ffmpegTestEncodeFrames.cpp.o + +ffmpegTestEncodeFrames.i: ffmpegTestEncodeFrames.cpp.i +.PHONY : ffmpegTestEncodeFrames.i + +# target to preprocess a source file +ffmpegTestEncodeFrames.cpp.i: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f test/CMakeFiles/encodeFramesTest.dir/build.make test/CMakeFiles/encodeFramesTest.dir/ffmpegTestEncodeFrames.cpp.i +.PHONY : ffmpegTestEncodeFrames.cpp.i + +ffmpegTestEncodeFrames.s: ffmpegTestEncodeFrames.cpp.s +.PHONY : ffmpegTestEncodeFrames.s + +# target to generate assembly for a file +ffmpegTestEncodeFrames.cpp.s: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f test/CMakeFiles/encodeFramesTest.dir/build.make test/CMakeFiles/encodeFramesTest.dir/ffmpegTestEncodeFrames.cpp.s +.PHONY : ffmpegTestEncodeFrames.cpp.s + +test.o: test.cpp.o +.PHONY : test.o + +# target to build an object file +test.cpp.o: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f test/CMakeFiles/Test.dir/build.make test/CMakeFiles/Test.dir/test.cpp.o +.PHONY : test.cpp.o + +test.i: test.cpp.i +.PHONY : test.i + +# target to preprocess a source file +test.cpp.i: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f test/CMakeFiles/Test.dir/build.make test/CMakeFiles/Test.dir/test.cpp.i +.PHONY : test.cpp.i + +test.s: test.cpp.s +.PHONY : test.s + +# target to generate assembly for a file +test.cpp.s: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(MAKE) -f test/CMakeFiles/Test.dir/build.make test/CMakeFiles/Test.dir/test.cpp.s +.PHONY : test.cpp.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... Test" + @echo "... edit_cache" + @echo "... encodeFramesTest" + @echo "... encodeTest" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... encodeTest.o" + @echo "... encodeTest.i" + @echo "... encodeTest.s" + @echo "... ffmpegTestEncodeFrames.o" + @echo "... ffmpegTestEncodeFrames.i" + @echo "... ffmpegTestEncodeFrames.s" + @echo "... test.o" + @echo "... test.i" + @echo "... test.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/mso/src/slowmoVideo/slowmoVideo && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff -Nru slowmovideo-2.6.20120712/test/testAvconvInfo.cpp slowmovideo-0.3/test/testAvconvInfo.cpp --- slowmovideo-2.6.20120712/test/testAvconvInfo.cpp 1970-01-01 00:00:00.000000000 +0000 +++ slowmovideo-0.3/test/testAvconvInfo.cpp 2012-10-21 09:25:38.000000000 +0000 @@ -0,0 +1,7 @@ +#include "../lib/avconvInfo_sV.h" + +int main() +{ + AvconvInfo info; + info.locate(); +} diff -Nru slowmovideo-2.6.20120712/unittests/CMakeLists.txt slowmovideo-0.3/unittests/CMakeLists.txt --- slowmovideo-2.6.20120712/unittests/CMakeLists.txt 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/unittests/CMakeLists.txt 2012-10-21 09:25:38.000000000 +0000 @@ -26,4 +26,4 @@ qt4_wrap_cpp(MOC_OUT ${SRCS_MOC}) add_executable(UnitTests ${SRCS} ${MOC_OUT}) -target_link_libraries(UnitTests sVproj ${QT_LIBRARIES}) +target_link_libraries(UnitTests sVproj ${EXTERNAL_LIBS}) diff -Nru slowmovideo-2.6.20120712/visualizeFlow/CMakeLists.txt slowmovideo-0.3/visualizeFlow/CMakeLists.txt --- slowmovideo-2.6.20120712/visualizeFlow/CMakeLists.txt 2012-07-12 10:07:28.000000000 +0000 +++ slowmovideo-0.3/visualizeFlow/CMakeLists.txt 2012-10-21 09:25:38.000000000 +0000 @@ -6,6 +6,6 @@ ) add_executable(visualizeFlow ${SRCS}) -target_link_libraries(visualizeFlow sVvis ${QT_LIBRARIES}) +target_link_libraries(visualizeFlow sVvis ${EXTERNAL_LIBS}) install(TARGETS visualizeFlow DESTINATION bin)