Flake/FLACCL cmd line tools were forcing user to specify compression level,

because default comprssion level was not set properly in settings constructor.
This commit is contained in:
Grigory Chudov
2013-06-02 18:22:07 -04:00
parent 5f8a7d9652
commit fc74fc5ad5
4 changed files with 15 additions and 8 deletions

View File

@@ -788,12 +788,12 @@ void clQuantizeLPC(
atomic_or(shared.maxcoef + i, coef ^ (coef >> 31));
barrier(CLK_LOCAL_MEM_FENCE);
int cbits = min(51 - 2 * clz(shared.task.blocksize), shared.task.abits);
int cbits = min(51 - 2 * clz(shared.task.blocksize), shared.task.abits) - minprecision + (i - ((i >> precisions) << precisions));
#if BITS_PER_SAMPLE <= 16
// Limit cbits so that 32-bit arithmetics will be enough when calculating residual
cbits = min(cbits, clz(order) + 1 - shared.task.obits);
#endif
cbits = clamp(cbits - minprecision + (i - ((i >> precisions) << precisions)), 3, 15);
cbits = clamp(cbits, 3, 15);
// Calculate shift based on precision and number of leading zeroes in coeffs.
// We know that if shifted by 15, coefs require

View File

@@ -24,10 +24,17 @@ namespace CUETools.Codecs
// Iterate through each property and call ResetValue()
foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(this))
property.ResetValue(this);
this.m_supported_modes = supported_modes;
this.m_default_mode = default_mode;
//GetSupportedModes(out m_default_mode);
this.EncoderMode = m_default_mode;
if (default_mode == "")
{
GetSupportedModes(out default_mode);
this.EncoderMode = default_mode;
}
else
{
this.m_supported_modes = supported_modes;
this.m_default_mode = default_mode;
this.EncoderMode = m_default_mode;
}
}
protected string m_supported_modes;

View File

@@ -36,7 +36,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\bin\win32\Debug\</OutputPath>
<OutputPath>..\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@@ -200,7 +200,7 @@ namespace CUETools.FLACCL.cmd
}
if (!quiet)
{
Console.WriteLine("{0}, Copyright (C) 2010 Grigory Chudov.", FLACCLWriter.Vendor);
Console.WriteLine("{0}, Copyright (C) 2010-2013 Grigory Chudov.", FLACCLWriter.Vendor);
Console.WriteLine("This is free software under the GNU GPLv3+ license; There is NO WARRANTY, to");
Console.WriteLine("the extent permitted by law. <http://www.gnu.org/licenses/> for details.");
}