Your question is H.264/H.265 Encoder Architecture. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
Walk us through the architecture of an H.264 or H.265 video encoder, and explain how spatial and temporal compression differ and how they impact latency.