1. A method, implemented in a processor, of processing video data, the method comprising: a) writing a portion of the video data in row order 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 column order; c) writing a portion of the video data into the addresses of the columns of the memory as they are read out; d) reading out video data in the addresses of the memory in row order; e) writing a portion of the video data in row order into the addresses of the rows of the memory as they are read out; and f) generating a compressed video stream based on the read out video data.