From 99ff41f27c77f6d3145e60686ca02572684df80e Mon Sep 17 00:00:00 2001 From: Fredrik Mellbin Date: Wed, 25 May 2022 11:29:04 +0200 Subject: [PATCH] Fix decomb 5.24 decimate metrics collection and previous commit typos --- yatta/compiled/changes.txt | 1 + yatta/ymc7/FunctionHooking.pas | 1 + yatta/ymc7/YMCInternalPlugins.pas | 6 +----- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/yatta/compiled/changes.txt b/yatta/compiled/changes.txt index 6650974..2549c42 100644 --- a/yatta/compiled/changes.txt +++ b/yatta/compiled/changes.txt @@ -1,6 +1,7 @@ 8-134 The plugin types in filterlist.txt are now Normal, Stdcall and Import Now built for 64 bit +Now uses minhook for OutputDebugString() hooking in ymc Fixed compatibility with modern Avisynth versions, recent Avisynth+ now required Migrated to Delphi 10.4 diff --git a/yatta/ymc7/FunctionHooking.pas b/yatta/ymc7/FunctionHooking.pas index 7471e22..78a7191 100644 --- a/yatta/ymc7/FunctionHooking.pas +++ b/yatta/ymc7/FunctionHooking.pas @@ -55,6 +55,7 @@ procedure HookDbgOut(AOutput: TStrings); MH_EnableHook(Target); MH_CreateHookApiEx('kernel32', 'OutputDebugStringW', @MyOutputDebugStringW, @g_origOutputDebugStringW, Target); MH_EnableHook(Target); + Output := AOutput; end; end. diff --git a/yatta/ymc7/YMCInternalPlugins.pas b/yatta/ymc7/YMCInternalPlugins.pas index f8c953a..8ea183e 100644 --- a/yatta/ymc7/YMCInternalPlugins.pas +++ b/yatta/ymc7/YMCInternalPlugins.pas @@ -626,11 +626,7 @@ procedure TDecimate.ProcessLog(Log: TStrings; Outfile: TStrings; var Header: TYM if (FN > -1) and (StrToIntDef(GetToken(Line, 2), -1) = -1) then begin - DMetrics[fn + 0] := Round(100 * StrToFloat(GetToken(Line, 2))); - DMetrics[fn + 1] := Round(100 * StrToFloat(GetToken(Line, 3))); - DMetrics[fn + 2] := Round(100 * StrToFloat(GetToken(Line, 4))); - DMetrics[fn + 3] := Round(100 * StrToFloat(GetToken(Line, 5))); - DMetrics[fn + 4] := Round(100 * StrToFloat(GetToken(Line, 6))); + DMetrics[fn] := Round(100 * StrToFloat(GetToken(Line, 2))); end; end; end;