video_dmem.h 3.01 KB
 #
 # video_dmem.h
 # 
 # This file lays out the overall DMEM usage for the RSP MPEG video decoding
 # task.

#ifdef _LANGUAGE_C
# ifndef eval
#    define eval(s)          (s)
# endif
#endif

#include <rsp.h>
#include <rcp.h>
#include <sptask.h>



/*
 * Memory layout of DMEM:
 *
 *   ----------------------------------------------
 *   | Cosine matrices and constants for IDCT     |
 *   |                             (80 bytes)     |
 *   |                                            |
 *   |--------------------------------------------|
 *   | Q matrices and constants for IQ            |
 *   |                             (272 bytes)    |
 *   |                                            |
 *   |--------------------------------------------|
 *   | Switch table and constants for MC	  |
 *   |				   (32 bytes)     |
 *   |						  |
 *   |--------------------------------------------|
 *   | Constants for Recon                        |
 *   |                             (16 bytes)     |
 *   |                                            |
 *   |--------------------------------------------|
 *   | Macroblock data                            |
 *   |                             (2560 bytes)   |
 *   |                                            |
 *   |--------------------------------------------|
 *   | Temporary workspace                        |
 *   |                             (?  bytes)	  |
 *   |						  |
 *   ----------------------------------------------
 */




	.data	RSP_DMEM_BASE

#define	IDCT_CONST_BASE		RSP_DMEM_BASE  
	
  #################################		
  #	IDCT Constants		  #
  #	(80 bytes)		  #
  #################################
		
#include "idct_dmem.h"
		

#define	IQ_CONST_BASE		eval(IDCT_CONST_BASE+80)
	
  #################################		
  #	IQ Constants and QMAT	  #
  #	(272 bytes)		  #
  #################################

#include "iq_dmem.h"
	

#define MC_CONST_BASE		eval(IQ_CONST_BASE+272)

  #################################
  #	MC Constants		  #
  #     (32 bytes)		  #
  #################################
	
#include "mc_dmem.h"
	
#define REC_CONST_BASE		eval(MC_CONST_BASE+32)

	
  #################################
  #	Recon Constants		  #
  #	(16 bytes)		  #
  #################################

#include "recon_dmem.h"

#define	MB_BASE			eval(REC_CONST_BASE+16)

  #################################
  #	MacroBlock Data		  #
  #	(2560 bytes)		  #
  #################################

	.space		0x0a00  


/* all addresses are offsets to MB_BASE */
	
#define MBH_MBTYPE		0
#define MBH_CBP			2
#define MBH_QUANT		4
#define MBH_MVFX		6
#define MBH_MVFY		8
#define MBH_MVBX		10
#define MBH_MVBY		12
#define MBH_BNUM		14

#define MB_DATA			16
#define MB_DATA_SIZE		6*64*2
#define MB_YREF_SIZE		16*17*2
#define MB_UVREF_SIZE		16*9*2

#define MB_DATA_FREF		eval(MB_DATA+MB_DATA_SIZE)
#define MB_DATA_BREF		eval(MB_DATA_FREF+MB_YREF_SIZE+MB_UVREF_SIZE)


		
#define	TEMP_BASE		eval(MB_BASE+2560)

  #################################
  #	Temp Workspace		  #
  #				  #
  #################################
	
	.space		0x0100