tidying up

This commit is contained in:
chudov
2009-09-09 10:01:42 +00:00
parent 85e3ae42e4
commit a8e23ecccb

View File

@@ -281,8 +281,8 @@ namespace CUETools.Codecs.FlaCuda
public StereoMethod StereoMethod public StereoMethod StereoMethod
{ {
get { return eparams.stereo_method; } get { return eparams.do_midside ? StereoMethod.Search : StereoMethod.Independent; }
set { eparams.stereo_method = value; } set { eparams.do_midside = value != StereoMethod.Independent; }
} }
public int MinPrecisionSearch public int MinPrecisionSearch
@@ -1169,7 +1169,7 @@ namespace CUETools.Codecs.FlaCuda
initialize_autocorTasks(); initialize_autocorTasks();
} }
bool doMidside = channels == 2 && eparams.stereo_method != StereoMethod.Independent; bool doMidside = channels == 2 && eparams.do_midside;
int channelCount = doMidside ? 2 * channels : channels; int channelCount = doMidside ? 2 * channels : channels;
if (doMidside) if (doMidside)
channel_decorrelation(s, s + FlaCudaWriter.MAX_BLOCKSIZE, s + 2 * FlaCudaWriter.MAX_BLOCKSIZE, s + 3 * FlaCudaWriter.MAX_BLOCKSIZE, frame.blocksize); channel_decorrelation(s, s + FlaCudaWriter.MAX_BLOCKSIZE, s + 2 * FlaCudaWriter.MAX_BLOCKSIZE, s + 3 * FlaCudaWriter.MAX_BLOCKSIZE, frame.blocksize);
@@ -1598,7 +1598,7 @@ namespace CUETools.Codecs.FlaCuda
// valid values are 0 to 2 // valid values are 0 to 2
// 0 = independent L+R channels // 0 = independent L+R channels
// 1 = mid-side encoding // 1 = mid-side encoding
public StereoMethod stereo_method; public bool do_midside;
// block size in samples // block size in samples
// set by the user prior to calling flake_encode_init // set by the user prior to calling flake_encode_init
@@ -1671,7 +1671,7 @@ namespace CUETools.Codecs.FlaCuda
// default to level 5 params // default to level 5 params
window_function = WindowFunction.Flattop | WindowFunction.Tukey; window_function = WindowFunction.Flattop | WindowFunction.Tukey;
stereo_method = StereoMethod.Search; do_midside = true;
block_size = 0; block_size = 0;
block_time_ms = 105; block_time_ms = 105;
min_prediction_order = 1; min_prediction_order = 1;
@@ -1689,35 +1689,35 @@ namespace CUETools.Codecs.FlaCuda
switch (lvl) switch (lvl)
{ {
case 0: case 0:
block_time_ms = 53; do_midside = false;
stereo_method = StereoMethod.Independent; window_function = WindowFunction.Bartlett;
max_prediction_order = 7;
max_partition_order = 4; max_partition_order = 4;
break; break;
case 1: case 1:
stereo_method = StereoMethod.Independent; do_midside = false;
window_function = WindowFunction.Bartlett; window_function = WindowFunction.Bartlett;
max_prediction_order = 8; max_prediction_order = 8;
max_partition_order = 4; max_partition_order = 4;
break; break;
case 2: case 2:
stereo_method = StereoMethod.Independent; do_midside = false;
window_function = WindowFunction.Bartlett; window_function = WindowFunction.Bartlett;
max_partition_order = 4; max_partition_order = 4;
break; break;
case 3: case 3:
stereo_method = StereoMethod.Estimate;
window_function = WindowFunction.Bartlett; window_function = WindowFunction.Bartlett;
max_prediction_order = 8; max_prediction_order = 7;
break; break;
case 4: case 4:
stereo_method = StereoMethod.Estimate;
window_function = WindowFunction.Bartlett; window_function = WindowFunction.Bartlett;
max_prediction_order = 8;
break; break;
case 5: case 5:
window_function = WindowFunction.Bartlett; window_function = WindowFunction.Bartlett;
break; break;
case 6: case 6:
stereo_method = StereoMethod.Estimate; max_prediction_order = 10;
break; break;
case 7: case 7:
break; break;