perf(video): move tier scaling to ffmpeg
The frame pump now submits crop-sized BGRA frames; FFmpeg scales them to final tier dimensions. Bundled scaler benchmark: 300 608x1080 to 1080x1920 frames in 0.435s (scaler-only). Reference: https://ffmpeg.org/ffmpeg-filters.html#scale-1
This commit is contained in:
@@ -654,19 +654,21 @@ public partial class MainViewModel : ViewModelBase
|
||||
|
||||
// The tier's crop rect over the 1920x1080 master, integer-aligned (the VM's
|
||||
// OutputRect* are doubles — the vertical 607.5 half-pixel crop rounds to 608).
|
||||
// FFmpeg, not the compositor, scales this crop to the tier's final dimensions.
|
||||
// internal = test seam (the zoom layer must NOT change the output crop — the
|
||||
// box is a composited layer, never the crop source).
|
||||
internal CompositorOptions BuildCompositorOptions()
|
||||
{
|
||||
var quality = SelectedQuality;
|
||||
var sourceRectWidth = (int)Math.Round(OutputRectWidth);
|
||||
var sourceRectHeight = (int)Math.Round(OutputRectHeight);
|
||||
return new CompositorOptions
|
||||
{
|
||||
SourceRectX = (int)Math.Round(OutputRectX),
|
||||
SourceRectY = (int)Math.Round(OutputRectY),
|
||||
SourceRectWidth = (int)Math.Round(OutputRectWidth),
|
||||
SourceRectHeight = (int)Math.Round(OutputRectHeight),
|
||||
OutputWidth = quality.Width,
|
||||
OutputHeight = quality.Height,
|
||||
SourceRectWidth = sourceRectWidth,
|
||||
SourceRectHeight = sourceRectHeight,
|
||||
OutputWidth = sourceRectWidth,
|
||||
OutputHeight = sourceRectHeight,
|
||||
};
|
||||
} // The credit's cadence, timing, placement and licence gate all live in
|
||||
// BrandFlashPresenter; MainViewModel only routes it to the frame pump and the
|
||||
|
||||
Reference in New Issue
Block a user