Compositor: parallelize BlitContentRaw row loop (4 threads, BelowNormal intent) to speed scaled blits (Unit 5)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ytLive.Helpers;
|
||||
using ytLive.Models;
|
||||
|
||||
@@ -575,10 +576,11 @@ public sealed class SceneCompositor
|
||||
sxLut[xi] = sxCanvas;
|
||||
}
|
||||
|
||||
for (var y = y0; y <= y1; y++)
|
||||
var parallelOpts = new ParallelOptions { MaxDegreeOfParallelism = 4 };
|
||||
Parallel.For(y0, y1 + 1, parallelOpts, y =>
|
||||
{
|
||||
var py = y - ey;
|
||||
if (py < oy || py > oy + drawnH) continue;
|
||||
if (py < oy || py > oy + drawnH) return;
|
||||
|
||||
// syNorm: normalized [0,1] position within the drawn content (vertically)
|
||||
var syNorm = (py - oy) / drawnH;
|
||||
@@ -656,7 +658,7 @@ public sealed class SceneCompositor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>Two-stage bilinear in 8.8 fixed point; result within ±1 of the
|
||||
|
||||
Reference in New Issue
Block a user