[g3dvl] move mapping/unmapping and uploading of blocks out of idct code