Clean up more space/tab mismatches in AudioCommon, Common, and VideoCommon.
Not planning to touch Core since it's the most actively changed part of the project.
This commit is contained in:
parent
0e3d8e2e9f
commit
edd9d0e0ef
|
@ -135,7 +135,7 @@ float* design_fir(unsigned int *n, float* fc, float opt)
|
|||
unsigned int i; // Loop index
|
||||
|
||||
float k1 = 2 * float(M_PI); // 2*pi*fc1
|
||||
float k2 = 0.5f * (float)(1 - o);// Constant used if the filter has even length
|
||||
float k2 = 0.5f * (float)(1 - o); // Constant used if the filter has even length
|
||||
float g = 0.0f; // Gain
|
||||
float t1; // Temporary variables
|
||||
float fc1; // Cutoff frequencies
|
||||
|
@ -248,11 +248,11 @@ void matrix_decode(const float *in, const int k, const int il,
|
|||
const int kr = (k + olddelay) % _dlbuflen;
|
||||
float l_gain = (_l_fwr + _r_fwr) / (1 + _l_fwr + _l_fwr);
|
||||
float r_gain = (_l_fwr + _r_fwr) / (1 + _r_fwr + _r_fwr);
|
||||
/* The 2nd axis has strong gain fluctuations, and therefore require
|
||||
limits. The factor corresponds to the 1 / amplification of (Lt
|
||||
- Rt) when (Lt, Rt) is strongly correlated. (e.g. during
|
||||
dialogues). It should be bigger than -12 dB to prevent
|
||||
distortion. */
|
||||
// The 2nd axis has strong gain fluctuations, and therefore require
|
||||
// limits. The factor corresponds to the 1 / amplification of (Lt
|
||||
// - Rt) when (Lt, Rt) is strongly correlated. (e.g. during
|
||||
// dialogues). It should be bigger than -12 dB to prevent
|
||||
// distortion.
|
||||
float lmr_lim_fwr = _lmr_fwr > M9_03DB * _lpr_fwr ? _lmr_fwr : M9_03DB * _lpr_fwr;
|
||||
float lpr_gain = (_lpr_fwr + lmr_lim_fwr) / (1 + _lpr_fwr + _lpr_fwr);
|
||||
float lmr_gain = (_lpr_fwr + lmr_lim_fwr) / (1 + lmr_lim_fwr + lmr_lim_fwr);
|
||||
|
@ -275,9 +275,9 @@ void matrix_decode(const float *in, const int k, const int il,
|
|||
if (decode_rear)
|
||||
{
|
||||
_lr[kr] = _rr[kr] = (l_agc - r_agc) * (float)M_SQRT1_2;
|
||||
/* Stereo rear channel is steered with the same AGC steering as
|
||||
the decoding matrix. Note this requires a fast updating AGC
|
||||
at the order of 20 ms (which is the case here). */
|
||||
// Stereo rear channel is steered with the same AGC steering as
|
||||
// the decoding matrix. Note this requires a fast updating AGC
|
||||
// at the order of 20 ms (which is the case here).
|
||||
_lr[kr] *= (_l_fwr + _l_fwr) / (1 + _l_fwr + _r_fwr);
|
||||
_rr[kr] *= (_r_fwr + _r_fwr) / (1 + _l_fwr + _r_fwr);
|
||||
}
|
||||
|
@ -298,16 +298,16 @@ void matrix_decode(const float *in, const int k, const int il,
|
|||
_rf[k] = (lpr_agc - lmr_agc) * (float)M_SQRT1_2;
|
||||
|
||||
/*** CENTER FRONT CANCELLATION ***/
|
||||
/* A heuristic approach exploits that Lt + Rt gain contains the
|
||||
information about Lt, Rt correlation. This effectively reshapes
|
||||
the front and rear "cones" to concentrate Lt + Rt to C and
|
||||
introduce Lt - Rt in L, R. */
|
||||
// A heuristic approach exploits that Lt + Rt gain contains the
|
||||
// information about Lt, Rt correlation. This effectively reshapes
|
||||
// the front and rear "cones" to concentrate Lt + Rt to C and
|
||||
// introduce Lt - Rt in L, R.
|
||||
/* 0.67677 is the empirical lower bound for lpr_gain. */
|
||||
c_gain = 8 * (*_adapt_lpr_gain - 0.67677f);
|
||||
c_gain = c_gain > 0 ? c_gain : 0;
|
||||
/* c_gain should not be too high, not even reaching full
|
||||
cancellation (~ 0.50 - 0.55 at current AGC implementation), or
|
||||
the center will sound too narrow. */
|
||||
// c_gain should not be too high, not even reaching full
|
||||
// cancellation (~ 0.50 - 0.55 at current AGC implementation), or
|
||||
// the center will sound too narrow. */
|
||||
c_gain = MATCOMPGAIN / (1 + c_gain * c_gain);
|
||||
c_agc_cfk = c_gain * _cf[k];
|
||||
_lf[k] -= c_agc_cfk;
|
||||
|
@ -317,7 +317,7 @@ void matrix_decode(const float *in, const int k, const int il,
|
|||
|
||||
void dpl2decode(float *samples, int numsamples, float *out)
|
||||
{
|
||||
static const unsigned int FWRDURATION = 240; /* FWR average duration (samples) */
|
||||
static const unsigned int FWRDURATION = 240; // FWR average duration (samples)
|
||||
static const int cfg_delay = 0;
|
||||
static const unsigned int fmt_freq = 48000;
|
||||
static const unsigned int fmt_nchannels = 2; // input channels
|
||||
|
|
|
@ -99,7 +99,6 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples)
|
|||
if ((m_indexR2 & INDEX_MASK) == (m_indexW & INDEX_MASK)) //..if it exists
|
||||
m_indexR2 = m_indexR;
|
||||
|
||||
|
||||
s16 l1 = Common::swap16(m_buffer[m_indexR & INDEX_MASK]); //current
|
||||
s16 l2 = Common::swap16(m_buffer[m_indexR2 & INDEX_MASK]); //next
|
||||
int sampleL = ((l1 << 16) + (l2 - l1) * (u16)frac) >> 16;
|
||||
|
@ -116,8 +115,6 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
numLeft = 0;
|
||||
}
|
||||
|
|
|
@ -295,7 +295,6 @@ void OpenALStream::SoundLoop()
|
|||
{
|
||||
ERROR_LOG(AUDIO, "Error occurred while buffering float32 data: %08x", err);
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
if (!float32_capable)
|
||||
|
@ -308,7 +307,6 @@ void OpenALStream::SoundLoop()
|
|||
stereo[i * 2 + 1] = (short)((float)sampleBuffer[i * 2 + 1] * (1 << 16));
|
||||
}
|
||||
alBufferData(uiBufferTemp[iBuffersFilled], AL_FORMAT_STEREO16, stereo, nSamples * 2 * 2, ulFrequency);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,11 +38,12 @@ namespace FPURoundMode
|
|||
|
||||
void SetSIMDMode(u32 mode);
|
||||
|
||||
/*
|
||||
There are two different flavors of float to int conversion:
|
||||
_mm_cvtps_epi32() and _mm_cvttps_epi32(). The first rounds
|
||||
according to the MXCSR rounding bits. The second one always
|
||||
uses round towards zero.
|
||||
/*
|
||||
* There are two different flavors of float to int conversion:
|
||||
* _mm_cvtps_epi32() and _mm_cvttps_epi32().
|
||||
*
|
||||
* The first rounds according to the MXCSR rounding bits.
|
||||
* The second one always uses round towards zero.
|
||||
*/
|
||||
void SaveSIMDState();
|
||||
void LoadSIMDState();
|
||||
|
|
|
@ -262,11 +262,13 @@ u64 GetCRC32(const u8 *src, int len, u32 samples)
|
|||
}
|
||||
|
||||
|
||||
/* NOTE: This hash function is used for custom texture loading/dumping, so
|
||||
it should not be changed, which would require all custom textures to be
|
||||
recalculated for their new hash values. If the hashing function is
|
||||
changed, make sure this one is still used when the legacy parameter is
|
||||
true. */
|
||||
/*
|
||||
* NOTE: This hash function is used for custom texture loading/dumping, so
|
||||
* it should not be changed, which would require all custom textures to be
|
||||
* recalculated for their new hash values. If the hashing function is
|
||||
* changed, make sure this one is still used when the legacy parameter is
|
||||
* true.
|
||||
*/
|
||||
u64 GetHashHiresTexture(const u8 *src, int len, u32 samples)
|
||||
{
|
||||
const u64 m = 0xc6a4a7935bd1e995;
|
||||
|
@ -453,9 +455,11 @@ u64 GetMurmurHash3(const u8* src, int len, u32 samples)
|
|||
return *((u64 *)&out);
|
||||
}
|
||||
|
||||
/* FIXME: The old 32-bit version of this hash made different hashes than the
|
||||
64-bit version. Until someone can make a new version of the 32-bit one that
|
||||
makes identical hashes, this is just a c/p of the 64-bit one. */
|
||||
/*
|
||||
* FIXME: The old 32-bit version of this hash made different hashes than the
|
||||
* 64-bit version. Until someone can make a new version of the 32-bit one that
|
||||
* makes identical hashes, this is just a c/p of the 64-bit one.
|
||||
*/
|
||||
u64 GetHashHiresTexture(const u8 *src, int len, u32 samples)
|
||||
{
|
||||
const u64 m = 0xc6a4a7935bd1e995ULL;
|
||||
|
|
|
@ -155,9 +155,7 @@ void FreeAlignedMemory(void* ptr)
|
|||
if (ptr)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
||||
_aligned_free(ptr);
|
||||
|
||||
#else
|
||||
free(ptr);
|
||||
#endif
|
||||
|
|
|
@ -107,7 +107,6 @@ bool DefaultMsgHandler(const char* caption, const char* text, bool yes_no, int S
|
|||
if (Style == WARNING) STYLE = MB_ICONWARNING;
|
||||
|
||||
return IDYES == MessageBox(0, UTF8ToTStr(text).c_str(), UTF8ToTStr(caption).c_str(), STYLE | (yes_no ? MB_YESNO : MB_OK));
|
||||
|
||||
#else
|
||||
printf("%s\n", text);
|
||||
return true;
|
||||
|
|
|
@ -356,8 +356,8 @@ struct TevStageCombiner
|
|||
// GXSetTevIndirect(tevstage+1, indstage, 0, 3, realmat+4, 6, 6, 1, 0, 0)
|
||||
// GXSetTevIndirect(tevstage+2, indstage, 0, 0, 0, 0, 0, 1, 0, 0)
|
||||
|
||||
union TevStageIndirect
|
||||
{
|
||||
union TevStageIndirect
|
||||
{
|
||||
// if mid, sw, tw, and addprev are 0, then no indirect stage is used, mask = 0x17fe00
|
||||
struct
|
||||
{
|
||||
|
@ -380,10 +380,10 @@ union TevStageIndirect
|
|||
};
|
||||
|
||||
bool IsActive() { return (hex&0x17fe00)!=0; }
|
||||
};
|
||||
};
|
||||
|
||||
union TwoTevStageOrders
|
||||
{
|
||||
union TwoTevStageOrders
|
||||
{
|
||||
struct
|
||||
{
|
||||
u32 texmap0 : 3; // indirect tex stage texmap
|
||||
|
@ -406,7 +406,7 @@ union TwoTevStageOrders
|
|||
int getTexCoord(int i){return i?texcoord1:texcoord0;}
|
||||
int getEnable(int i){return i?enable1:enable0;}
|
||||
int getColorChan(int i){return i?colorchan1:colorchan0;}
|
||||
};
|
||||
};
|
||||
|
||||
union TEXSCALE
|
||||
{
|
||||
|
|
|
@ -462,7 +462,6 @@ void STACKALIGN GatherPipeBursted()
|
|||
ProcessFifoAllDistance();
|
||||
waitingForPEInterruptDisable = false;
|
||||
}
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -695,10 +695,8 @@ PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int heigh
|
|||
for (int y = 0; y < height; y += 4)
|
||||
for (int x = 0, yStep = (y / 4) * Wsteps8; x < width; x += 8, yStep++)
|
||||
for (int iy = 0, xStep = 4 * yStep; iy < 4; iy++, xStep++)
|
||||
{
|
||||
((u64*)(dst + (y + iy) * width + x))[0] = ((u64*)(src + 8 * xStep))[0];
|
||||
}
|
||||
}
|
||||
return PC_TEX_FMT_I8;
|
||||
case GX_TF_C8:
|
||||
if (tlutfmt == 2)
|
||||
|
@ -739,7 +737,6 @@ PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int heigh
|
|||
for(int j = 0; j < 4; j++)
|
||||
*ptr++ = Common::swap16(*s++);
|
||||
}
|
||||
|
||||
}
|
||||
return PC_TEX_FMT_IA8;
|
||||
case GX_TF_C14X2:
|
||||
|
@ -782,10 +779,9 @@ PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int heigh
|
|||
}
|
||||
return PC_TEX_FMT_BGRA32;
|
||||
case GX_TF_RGBA8: // speed critical
|
||||
{
|
||||
|
||||
{
|
||||
for (int y = 0; y < height; y += 4)
|
||||
{
|
||||
for (int x = 0, yStep = (y / 4) * Wsteps4; x < width; x += 4, yStep++)
|
||||
{
|
||||
const u8* src2 = src + 64 * yStep;
|
||||
|
@ -873,7 +869,6 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
|
|||
for (int x = 0, yStep = (y / 8) * Wsteps8; x < width; x += 8,yStep++)
|
||||
for (int iy = 0, xStep = 8 * yStep; iy < 8; iy++,xStep++)
|
||||
decodebytesC4IA8_To_RGBA(dst + (y + iy) * width + x, src + 4 * xStep, tlutaddr);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -936,7 +931,6 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
|
|||
for (int x = 0, yStep = (y / 4) * Wsteps8; x < width; x += 8, yStep++)
|
||||
for (int iy = 0, xStep = 4 * yStep; iy < 4; iy++, xStep++)
|
||||
decodebytesC8IA8_To_RGBA(dst + (y + iy) * width + x, src + 8 * xStep, tlutaddr);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -54,7 +54,6 @@ public:
|
|||
static void SetColorMatrix(const float* pmatrix);
|
||||
static void InvalidateXFRange(int start, int end);
|
||||
static void SetMaterialColorChanged(int index);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -103,7 +103,6 @@ void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType)
|
|||
WRITE(p, "Texture2D Tex0 : register(t0);\n");
|
||||
}
|
||||
|
||||
|
||||
if (ApiType == API_OPENGL)
|
||||
{
|
||||
WRITE(p, " out float4 ocol0;\n");
|
||||
|
|
|
@ -202,7 +202,6 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE ApiType)
|
|||
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
|
||||
WRITE(p, "};\n");
|
||||
|
||||
|
||||
p = GenerateVSOutputStruct(p, components, ApiType);
|
||||
|
||||
if(ApiType == API_OPENGL)
|
||||
|
@ -335,8 +334,6 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE ApiType)
|
|||
if (!(components & VB_HAS_NRM0))
|
||||
WRITE(p, "float3 _norm0 = float3(0.0f, 0.0f, 0.0f);\n");
|
||||
|
||||
|
||||
|
||||
WRITE(p, "o.pos = float4(dot(" I_PROJECTION"[0], pos), dot(" I_PROJECTION"[1], pos), dot(" I_PROJECTION"[2], pos), dot(" I_PROJECTION"[3], pos));\n");
|
||||
|
||||
WRITE(p, "float4 mat, lacc;\n"
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
static void Dirty();
|
||||
static void Shutdown();
|
||||
static void DoState(PointerWrap &p);
|
||||
;
|
||||
|
||||
// constant management
|
||||
static void SetConstants();
|
||||
|
||||
|
|
|
@ -539,7 +539,6 @@ void CompileAndRunDisplayList(u32 address, u32 size, CachedDisplayList *dl)
|
|||
if (cmd_byte & 0x80)
|
||||
{
|
||||
// load vertices (use computed vertex size from FifoCommandRunnable above)
|
||||
|
||||
u16 numVertices = DataReadU16();
|
||||
if(numVertices > 0)
|
||||
{
|
||||
|
@ -577,7 +576,6 @@ void CompileAndRunDisplayList(u32 address, u32 size, CachedDisplayList *dl)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -764,10 +762,9 @@ bool HandleDisplayList(u32 address, u32 size)
|
|||
vdl.VATUsed = dlvatused;
|
||||
vdl.count = 1;
|
||||
DLCache::dl_map[dl_id] = vdl;
|
||||
|
||||
}
|
||||
return true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void IncrementCheckContextId()
|
||||
|
|
Loading…
Reference in New Issue