summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Yves Avenard <jyavenard@mythtv.org>2010-11-30 01:11:21 (GMT)
committer Jean-Yves Avenard <jyavenard@mythtv.org>2010-11-30 01:11:21 (GMT)
commitc0fc09267318eb8400e7d809c6ab698c5c325507 (patch)
tree54626b7424375243159b031e6cf0e521afbd7d87
parentf31f224ec02a0c955e342436feac63a90e90b698 (diff)
revert [27370]. Myth downmixer is now used at all time if machines has SSE2 support. This change will be removed once ffmpeg properly implements dialnorm
git-svn-id: http://svn.mythtv.org/svn/trunk@27375 7dbf422c-18fa-0310-86e9-fd20926502f2
-rw-r--r--mythtv/libs/libmyth/audiooutpututil.cpp13
-rw-r--r--mythtv/libs/libmyth/audiooutpututil.h1
-rw-r--r--mythtv/libs/libmythtv/avformatdecoder.cpp7
-rw-r--r--mythtv/programs/mythfrontend/globalsettings.cpp14
-rw-r--r--mythtv/programs/mythfrontend/globalsettings.h1
5 files changed, 18 insertions, 18 deletions
diff --git a/mythtv/libs/libmyth/audiooutpututil.cpp b/mythtv/libs/libmyth/audiooutpututil.cpp
index 891bf9a..d9af347 100644
--- a/mythtv/libs/libmyth/audiooutpututil.cpp
+++ b/mythtv/libs/libmyth/audiooutpututil.cpp
@@ -451,6 +451,19 @@ static int fromFloatFLT(float *out, float *in, int len)
}
/**
+ * Returns true if platform has an FPU.
+ * for the time being, this test is limited to testing if SSE2 is supported
+ */
+bool AudioOutputUtil::has_hardware_fpu()
+{
+#if ARCH_X86
+ return sse_check();
+#else
+ return false;
+#endif
+}
+
+/**
* Convert integer samples to floats
*
* Consumes 'bytes' bytes from in and returns the numer of bytes written to out
diff --git a/mythtv/libs/libmyth/audiooutpututil.h b/mythtv/libs/libmyth/audiooutpututil.h
index 19dda9f..2649e9b 100644
--- a/mythtv/libs/libmyth/audiooutpututil.h
+++ b/mythtv/libs/libmyth/audiooutpututil.h
@@ -8,6 +8,7 @@ using namespace std;
class AudioOutputUtil
{
public:
+ static bool has_hardware_fpu();
static int toFloat(AudioFormat format, void *out, void *in, int bytes);
static int fromFloat(AudioFormat format, void *out, void *in, int bytes);
static void MonoToStereo(void *dst, void *src, int samples);
diff --git a/mythtv/libs/libmythtv/avformatdecoder.cpp b/mythtv/libs/libmythtv/avformatdecoder.cpp
index ecf9480..280d314 100644
--- a/mythtv/libs/libmythtv/avformatdecoder.cpp
+++ b/mythtv/libs/libmythtv/avformatdecoder.cpp
@@ -15,6 +15,7 @@ using namespace std;
#include "avformatdecoder.h"
#include "privatedecoder.h"
#include "audiooutput.h"
+#include "audiooutpututil.h"
#include "RingBuffer.h"
#include "mythplayer.h"
#include "remoteencoder.h"
@@ -4501,10 +4502,10 @@ void AvFormatDecoder::SetDisablePassThrough(bool disable)
inline bool AvFormatDecoder::DecoderWillDownmix(const AVCodecContext *ctx)
{
- if (gCoreContext->GetNumSetting("AdvancedAudioSettings", false) &&
- gCoreContext->GetNumSetting("AudioDownmixOverride", false))
+ // Until ffmpeg properly implements dialnorm
+ // use Myth internal downmixer if machines has FPU/SSE
+ if (AudioOutputUtil::has_hardware_fpu())
return false;
-
switch (ctx->codec_id)
{
case CODEC_ID_AC3:
diff --git a/mythtv/programs/mythfrontend/globalsettings.cpp b/mythtv/programs/mythfrontend/globalsettings.cpp
index 2ac3cc9..af6b5b2 100644
--- a/mythtv/programs/mythfrontend/globalsettings.cpp
+++ b/mythtv/programs/mythfrontend/globalsettings.cpp
@@ -195,7 +195,6 @@ AudioConfigSettings::AudioConfigSettings() :
ConfigurationGroup *settings5 =
new HorizontalConfigurationGroup(false, false);
settings5->addChild(Audio48kOverride());
- settings5->addChild(DownmixOverride());
m_triggerMPCM = new TransCheckBoxSetting();
m_MPCM = MPCM();
@@ -476,19 +475,6 @@ HostCheckBox *AudioConfigSettings::Audio48kOverride()
return gc;
}
-HostCheckBox *AudioConfigSettings::DownmixOverride()
-{
- HostCheckBox *gc = new HostCheckBox("AudioDownmixOverride");
- gc->setLabel(QObject::tr("Always use internal downmixer"));
- gc->setValue(false);
- gc->setHelpText(QObject::tr("If uncheck, for AC3 and DTS audio content; "
- "use ffmpeg's internal downmixer when required."
- " If checked, Myth's own downmixer will be used"
- " for all content. While not as fast, it "
- "doesn't suffer from low volume issues."));
- return gc;
-}
-
HostCheckBox *AudioConfigSettings::PassThroughOverride()
{
HostCheckBox *gc = new HostCheckBox("PassThruDeviceOverride");
diff --git a/mythtv/programs/mythfrontend/globalsettings.h b/mythtv/programs/mythfrontend/globalsettings.h
index d4e7c9e..7c9b4d5 100644
--- a/mythtv/programs/mythfrontend/globalsettings.h
+++ b/mythtv/programs/mythfrontend/globalsettings.h
@@ -43,7 +43,6 @@ class AudioConfigSettings : public VerticalConfigurationGroup
HostCheckBox *SRCQualityOverride();
HostComboBox *SRCQuality();
HostCheckBox *Audio48kOverride();
- HostCheckBox *DownmixOverride();
HostCheckBox *PassThroughOverride();
HostComboBox *PassThroughOutputDevice();