Skip to content
  • Henrik Gramner's avatar
    cli: Prefetch yuv/y4m input frames on Windows 8 and newer · aae177c5
    Henrik Gramner authored and Anton Mitrofanov's avatar Anton Mitrofanov committed
    Use PrefetchVirtualMemory() (if available) on memory-mapped input frames.
    
    Significantly improves performance when the source file is not already
    present in the OS page cache by asking the OS to bring in those pages from
    disk using large, concurrent I/O requests.
    
    Most beneficial on fast encoding settings. Up to 40% faster overall with
    --preset ultrafast, and up to 20% faster overall with --preset veryfast.
    
    This API was introduced in Windows 8, so call it conditionally. On older
    Windows systems the previous behavior remains unchanged.
    aae177c5