The line timing extending in timing post-processor is now governed by the "timing processor adjascent bias" option (1.0 [default] = move end, 0.0 = move start, 0.5 = move to halfway point, etc)

Originally committed to SVN as r198.
This commit is contained in:
Rodrigo Braz Monteiro 2006-03-05 02:25:12 +00:00
parent 1ae9db20d9
commit 3a3f3bb463
3 changed files with 11 additions and 3 deletions

View File

@ -1,7 +1,7 @@
Aegisub changelog Aegisub changelog
Please visit http://aegisub.net to download latest version Please visit http://aegisub.net to download latest version
= 1.10 beta - 2006.02.xx =========================== = 1.10 beta - 2006.03.xx ===========================
- Always defaults to Audio Cache=1 (ram) now (Myrsloik) - Always defaults to Audio Cache=1 (ram) now (Myrsloik)
- Automation: Added xor(a,b) boolean logical function to utils.lua (jfs) - Automation: Added xor(a,b) boolean logical function to utils.lua (jfs)
@ -54,6 +54,7 @@ Please visit http://aegisub.net to download latest version
- Attempting to load a file which does not exist no longer unloads previous subtitles. (AMZ) - Attempting to load a file which does not exist no longer unloads previous subtitles. (AMZ)
- Dragging timecode files into the Aegisub window will now work as expected (instead of attempting to load it as subtitles). (AMZ) - Dragging timecode files into the Aegisub window will now work as expected (instead of attempting to load it as subtitles). (AMZ)
- Added option ("keep raw dialogue data", default false) that makes Aegisub use less RAM at a small performance cost when set to false. (AMZ) - Added option ("keep raw dialogue data", default false) that makes Aegisub use less RAM at a small performance cost when set to false. (AMZ)
- The line timing extending in timing post-processor is now governed by the "timing processor adjascent bias" option (1.0 [default] = move end, 0.0 = move start, 0.5 = move to halfway point, etc) (AMZ)
= 1.09 beta - 2006.01.16 =========================== = 1.09 beta - 2006.01.16 ===========================

View File

@ -429,8 +429,13 @@ void DialogTimingProcessor::Process() {
int curStart,prevEnd; int curStart,prevEnd;
long adjsThres = 0; long adjsThres = 0;
int dist; int dist;
// Get threshold
adjascentThres->GetValue().ToLong(&adjsThres); adjascentThres->GetValue().ToLong(&adjsThres);
// Get bias
float bias = Options.AsFloat(_T("Timing processor adjascent bias"));
// For each row // For each row
for (int i=0;i<rows;i++) { for (int i=0;i<rows;i++) {
// Get line and check if it's OK // Get line and check if it's OK
@ -450,9 +455,10 @@ void DialogTimingProcessor::Process() {
prevEnd = prev->End.GetMS(); prevEnd = prev->End.GetMS();
dist = curStart-prevEnd; dist = curStart-prevEnd;
if (dist > 0 && dist < adjsThres) { if (dist > 0 && dist < adjsThres) {
cur->Start.SetMS(curStart-dist/2); int setPos = prevEnd+int(dist*bias);
cur->Start.SetMS(setPos);
cur->UpdateData(); cur->UpdateData();
prev->End.SetMS(curStart-dist/2); prev->End.SetMS(setPos);
prev->UpdateData(); prev->UpdateData();
} }

View File

@ -190,6 +190,7 @@ void OptionsManager::LoadDefaults() {
SetBool(_T("Timing processor Enable lead-out"),true); SetBool(_T("Timing processor Enable lead-out"),true);
SetBool(_T("Timing processor Enable keyframe"),true); SetBool(_T("Timing processor Enable keyframe"),true);
SetBool(_T("Timing processor Enable adjascent"),true); SetBool(_T("Timing processor Enable adjascent"),true);
SetFloat(_T("Timing processor adjascent bias"),1.0);
SetColour(_T("Audio Selection Background Modified"),wxColour(92,0,0)); SetColour(_T("Audio Selection Background Modified"),wxColour(92,0,0));
SetColour(_T("Audio Selection Background"),wxColour(64,64,64)); SetColour(_T("Audio Selection Background"),wxColour(64,64,64));