Target: Windows GPU process,
media/gpu/windows/media_foundation_video_encode_accelerator_win.cc:2061-2116.
This page drives a hardware VideoEncoder at an even, non-macroblock-aligned
resolution (1922×1082) using CPU-backed I420 frames. In the GPU process this enters
PopulateInputSampleBuffer(), which:
MFCreateAlignedMemoryBuffer sized to
MFT_INPUT_STREAM_INFO.cbSize (vendor-reported minimum),SetCurrentLength(cbSize) before writing,AllocationSize(NV12, 1922×1082) = 3,119,406 bytes via
ConvertAndScale(),kMediaFoundationD3DVideoProcessing is
FEATURE_DISABLED_BY_DEFAULT), passing the under-written buffer with
current_length = cbSize > bytes_written straight to the vendor
MFT's ProcessInput().
If the MFT reports cbSize > AllocationSize (e.g. 16-row macroblock padding
to 1088 ⇒ ≥ 3,136,704 bytes), the trailing ~17 KB of each frame is uninitialised
GPU-process heap that the encoder may incorporate into the H.264 bitstream's padded /
cropped-out macroblock rows. A fresh buffer is allocated per frame, so iterating samples
many distinct heap regions.