1. A method, implemented in a processor, of processing video data, the method comprising: a) writing a portion of the video data in raster order by rows into addresses of a memory having a plurality of rows and a plurality of columns; b) reading out video data in the addresses of the memory in macroblock (MB) order by columns; c) writing a portion of the video data in raster order into the addresses of the columns of the memory as the MB data is read out in column order; d) reading out video data in the addresses of the memory in MB order by rows; e) writing a portion of the video data in raster order into the addresses of the rows of the memory as the MB data is read out in row order; and f) generating a compressed video stream based on the video data read out in MB order by columns and rows.