A memory controller (115) is disclosed that allocates local memory space (15) to a set of macroblocks of a picture being processed. Information associated with a specific macroblock of the set of macroblocks is written to non-local memory (131) when it is no longer needed to complete processing of a current row (1522) of macroblocks. When information associated with the specific macroblock is later needed to process a different row (1521) of macroblocks, the memory controller (115) allocates local memory space to the specific macroblock and stores the previously saved information from non-local memory (131) to the local memory (15).