Skip to content

Commit

Permalink
Remove vestiges of FFTW support
Browse files Browse the repository at this point in the history
FFTW was replaced with FFmpeg's FFTs in February 2022, see
aee8a0d
  • Loading branch information
ulmus-scott authored and linuxdude42 committed Jul 24, 2024
1 parent 3b9b5e9 commit 19259b0
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 130 deletions.
1 change: 0 additions & 1 deletion README.CMake.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
that they don't have to be compiled as part of building MythTV.
These are:

- mingw64-fftw
- mingw64-flac
- mingw64-fontconfig
- mingw64-freetype
Expand Down
2 changes: 0 additions & 2 deletions cmake/BuildExternalLibraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ include(externallibs/FindOrBuildFlac)
include(externallibs/FindOrBuildXml2)
include(externallibs/FindOrBuildSamplerate)
include(externallibs/FindOrBuildSoundTouch)
include(externallibs/FindOrBuildFFTW)
include(externallibs/FindOrBuildFontconfig)
include(externallibs/FindOrBuildFribidi)
include(externallibs/FindOrBuildICU)
Expand Down Expand Up @@ -95,7 +94,6 @@ find_or_build_flac()
find_or_build_libxml2()
find_or_build_samplerate()
find_or_build_soundtouch()
find_or_build_fftw()
find_or_build_fontconfig()
find_or_build_fribidi()
find_or_build_icu()
Expand Down
104 changes: 0 additions & 104 deletions cmake/externallibs/FindOrBuildFFTW.cmake

This file was deleted.

12 changes: 6 additions & 6 deletions mythtv/libs/libmythtv/visualisations/videovisualspectrum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
#include "videovisualspectrum.h"

// FFmpeg
static constexpr int FFTW_N { 512 };
static constexpr int k_FFT_sample_length { 512 };

// Std
#include <algorithm>

VideoVisualSpectrum::VideoVisualSpectrum(AudioPlayer* Audio, MythRender* Render)
: VideoVisual(Audio, Render)
{
m_dftL = static_cast<FFTComplex*>(av_malloc(sizeof(FFTComplex) * FFTW_N));
m_dftR = static_cast<FFTComplex*>(av_malloc(sizeof(FFTComplex) * FFTW_N));
m_dftL = static_cast<FFTComplex*>(av_malloc(sizeof(FFTComplex) * k_FFT_sample_length));
m_dftR = static_cast<FFTComplex*>(av_malloc(sizeof(FFTComplex) * k_FFT_sample_length));

m_fftContextForward = av_fft_init(std::log2(FFTW_N), 0);
m_fftContextForward = av_fft_init(std::log2(k_FFT_sample_length), 0);
}

VideoVisualSpectrum::~VideoVisualSpectrum()
Expand Down Expand Up @@ -55,7 +55,7 @@ void VideoVisualSpectrum::Draw(const QRect Area, MythPainter* Painter, QPaintDev
}
}

for (auto k = i; k < FFTW_N; k++)
for (auto k = i; k < k_FFT_sample_length; k++)
{
m_dftL[k] = (FFTComplex){ .re = 0, .im = 0 };
m_dftL[k] = (FFTComplex){ .re = 0, .im = 0 };
Expand Down Expand Up @@ -162,7 +162,7 @@ bool VideoVisualSpectrum::InitialisePriv()
for (int i = 0, x = m_area.left(); i < m_rects.size(); i++, x+= m_barWidth)
m_rects[i].setRect(x, y, m_barWidth - 1, 1);

m_scaleFactor = (static_cast<double>(m_area.height()) / 2.0) / log(static_cast<double>(FFTW_N));
m_scaleFactor = (static_cast<double>(m_area.height()) / 2.0) / log(static_cast<double>(k_FFT_sample_length));
m_falloff = static_cast<double>(m_area.height()) / 150.0;

LOG(VB_GENERAL, LOG_INFO, DESC + QString("Initialised Spectrum with %1 bars").arg(m_scale.range()));
Expand Down
14 changes: 0 additions & 14 deletions patches/fftw-3.3.10.patch

This file was deleted.

3 changes: 1 addition & 2 deletions platform/win32/msvc/include/mythconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -1563,7 +1563,6 @@
#define CONFIG_LIBCEC 0
#define CONFIG_LIBCRYPTO 0
#define CONFIG_LIBDNS_SD 1
#define CONFIG_LIBFFTW3 1
#define CONFIG_LIBMPEG2EXTERNAL 1
#define CONFIG_LIBXML2 1
#define CONFIG_LIBUDF 0
Expand All @@ -1580,6 +1579,6 @@
#define CONFIG_X11 1
#define CONFIG_XRANDR 0
#define CONFIG_XV 0
#define MYTH_BUILD_CONFIG " debug use_hidesyms using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_php using_dvb using_frontend using_hdhomerun using_ceton using_hdpvr using_ivtv using_joystick_menu using_libdns_sd using_libfftw3 using_libxml2 using_lirc using_mheg using_opengl using_opengl_video using_qtscript using_qtdbus using_sdl using_taglib using_bindings_php using_mythtranscode using_opengl using_ffmpeg_threads using_mheg using_libxml2"
#define MYTH_BUILD_CONFIG " debug use_hidesyms using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_php using_dvb using_frontend using_hdhomerun using_ceton using_hdpvr using_ivtv using_joystick_menu using_libdns_sd using_libxml2 using_lirc using_mheg using_opengl using_opengl_video using_qtscript using_qtdbus using_sdl using_taglib using_bindings_php using_mythtranscode using_opengl using_ffmpeg_threads using_mheg using_libxml2"

#endif /* MYTHTV_CONFIG_H */
1 change: 0 additions & 1 deletion platform/win32/w64-mingw32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ set(FILENAME_BASES

# Libs we didn't have to compile
crypto # openssl
fftw
flac
fontconfig
freetype
Expand Down

0 comments on commit 19259b0

Please sign in to comment.