Skip to content

Commit d79b463

Browse files
committed
Fix copy/paste mistake in GetTilingArgs, add debug log msg
1 parent 390a7de commit d79b463

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ff-utils-winforms/Data/CodecUtils.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,11 @@ public static string GetTilingArgs(Size resolution, string colArg, string rowArg
129129
if (resolution.Width >= 7680) cols = 3;
130130

131131
int rows = 0;
132-
if (resolution.Height >= 1600) cols = 1;
133-
if (resolution.Height >= 3200) cols = 2;
134-
if (resolution.Height >= 6400) cols = 3;
132+
if (resolution.Height >= 1600) rows = 1;
133+
if (resolution.Height >= 3200) rows = 2;
134+
if (resolution.Height >= 6400) rows = 3;
135135

136+
Logger.Log($"GetTilingArgs: Video resolution is {resolution.Width}x{resolution.Height} - Using 2^{cols} columns, 2^{rows} rows (=> {Math.Pow(2, cols)}x{Math.Pow(2, rows)} = {Math.Pow(2, cols) * Math.Pow(2, rows)} Tiles)", true);
136137
return $"{colArg}{cols} {rowArg}{rows}";
137138
}
138139
}

0 commit comments

Comments
 (0)