m16ncmv.h

来自「代码有点长,需细心阅读,仅供影音视听类产品的开发人员参考」· C头文件 代码 · 共 248 行

H
248
字号
/***************************************Not Verified*************************************/


/*****************************************/
#if   CONFIG==CONFIG_COMBO_SVCD
    #define SDRAM_BASE_CACHED   0x88000000
    #define SDRAM_BASE_UNCACHED 0xa8000000
#else
    #define SDRAM_BASE_CACHED   0x40000000
    #define SDRAM_BASE_UNCACHED 0xa0000000
#endif

#ifdef  TESTCHIP
    #define SDRAM_BASE      SDRAM_BASE_UNCACHED
#else
    #define SDRAM_BASE      SDRAM_BASE_CACHED
#endif



/*****************************************/
#ifdef SUPPORT_STORE_PSD_TBL        
    #define VCD_CACHE_START    (640)///////////////////////
#endif

#define VCD_CACHE_START    (2033)
#define CDROM_CACHE_START  (2012)
#define SECT_INFO           (2037)
#define SECT_ENTRIES        (2039)
#define DISC_INFO_Y         (2041)
#define PIC_INFO_Y          (2041)
#define PIC_INFO_X          (512)
#define DMARAM_BUF_Y        (2042)
#define QUANT_BUF_Y         (2043)
    
#ifdef SUPPORT_STORE_PSD_TBL        
        #define PSD_TBL_ADR         (VCD_CACHE_START+9) //////////////////////////      
#endif /*SUPPORT_STORE_PSD_TBL */           
    
#define DMARAM_BUF_XS       256
    
/*
**  CACHE LINE
*/
/******************************************************/
#define MP3SECT_CACHE_LINES 9
#define SECT_CACHE_LINES    1
/******************************************************/

/******************************************************/

/*
**  BUFFER LINE WIDTH
*/
/*************************************************************/
#define VBV_W       1024                /* VIDEO buf width  */
#define ABV_W       1024                /* AUDIO buf width  */
#define SBV_W       1024                /* SUP buf width    */
#define OBV_W       1024                /* OSD buf width    */
#define CBV_W       1024                /* DISC input buf width */

#define MP3_ABV_W 1024
/*************************************************************/
/*
** anchors
*/
/***********************************************/
#define MEM_EVBYA       (regs0->evbya)
#define MEM_EABYA       (regs0->eabya)
#define MEM_SUPYA       (regs0->supya)
#define MEM_CDYA        (regs0->cdya)
#define MEM_OSDYA       (regs0->osdya)
#define MEM_AUDYA       (regs0->audya)
#define MEM_IOPYA       (regs0->iopya)
#define MEM_REF0_LUMA   (regs0->ref0_luma)
/***********************************************/

/*
**  COMBO VCD FRAME BUFFER COMPRESS
*/
/*********************************/
#define     RF_VC_I_811     (1<<8)
#define     RF_VC_P_811     (1<<7)
#define     RF_VC_B_811     (1<<6)
#define     RF_VC_I_411     (0<<8)
#define     RF_VC_P_411     (0<<7)
#define     RF_VC_B_411     (0<<6)
#define     RF_VC_I_888     (0<<4)
#define     RF_VC_I_766     (1<<4)
#define     RF_VC_I_666     (2<<4)
#define     RF_VC_I_8655    (3<<4)
#define     RF_VC_P_888     (0<<2)
#define     RF_VC_P_766     (1<<2)
#define     RF_VC_P_666     (2<<2)
#define     RF_VC_P_8655    (3<<2)
#define     RF_VC_B_888     (0<<0)
#define     RF_VC_B_766     (1<<0)
#define     RF_VC_B_666     (2<<0)
#define     RF_VC_B_8655    (3<<0)

#define     MEM_411888      0x00
#define     MEM_411766      0x01
#define     MEM_411666      (0x02|1<<9)
#define     MEM_4118655     0x03
#define     MEM_811888      RF_VC_B_811
#define     MEM_811766      0x41
#define     MEM_811666      0x42
#define     MEM_8118655     0x43
/**************************************/

/*
**  VCD/SVCD FRAME BUFFER CONFIG
*/
/********************************************************************/
#define VIDEO_COMPRESS          0
            /***********NO NO NO CD_MOVE Play SVCD in SDRAM************/

#define MEM_REF0_LUMA_DEF       0
#define MEM_REF0_CHROMA_DEF     576
#define MEM_REF1_LUMA_DEF       576+288
#define MEM_REF1_CHROMA_DEF     576+288+576


#define MEM_BIDIR_LUMA_DEF      0
#define MEM_BIDIR_CHROMA_DEF    576+576


#define MEM_EVBYA_DEF           1728    //extend video buffer to show hires
#define MEM_EABYA_DEF           1900
#define MEM_SUPYA_DEF           1910
#define MEM_AUDMOVE_EABYA_DEF   1664    //only needed in AUDMOVE
#define MEM_CDMOVE_CDYA_DEF     640
#define MEM_CDYA_DEF            1956
#define MEM_OSDYA_DEF           1986
#define MEM_AUDYA_DEF           2003
#define MEM_IOPYA_DEF           (2035)  //jhuang modify 2002/10/19 2032
        /*********************************************************/
        /***********NO NO NO CD_MOVE Play VCD in SDRAM************/
#define MEM_VCD_REF0_LUMA_DEF       0
#define MEM_VCD_REF0_CHROMA_DEF     288
#define MEM_VCD_REF1_LUMA_DEF       288+144
#define MEM_VCD_REF1_CHROMA_DEF     288+144+288
#define MEM_VCD_BIDIR_LUMA_DEF      864
#define MEM_VCD_BIDIR_CHROMA_DEF    864+288
#define MEM_VCD_EVBYA_DEF           1856
#define MEM_VCD_EABYA_DEF           1902
#define MEM_VCD_SUPYA_DEF           1912
#define MEM_CDMOVE_VCD_CDYA_DEF      640    //only needed in CDMOVE
#define MEM_VCD_CDYA_DEF            1946
#define MEM_VCD_OSDYA_DEF           1986
#define MEM_VCD_AUDYA_DEF           2003
#define MEM_VCD_IOPYA_DEF           (2035)  //jhuang modify 2002/10/19 2032//2032
        
/* High resolution */
#define HIRES_VIDEO_COMPRESS    (RF_VC_I_811|RF_VC_P_811|RF_VC_B_811 \
                                |RF_VC_I_666|RF_VC_P_666|RF_VC_B_666)

/*
**  HIRES---HIRES----FRAME BUFFER CONFIG
*/
#define HIRES_FRAMEBUF_START    0
#define HIRES_REF0_LUMA         0
#define HIRES_REF1_LUMA         576
#define HIRES_REF0_CHROMA       576+576
#define HIRES_REF1_CHROMA       576+576+288
#define HIRES_BIDIR_LUMA        0
#define HIRES_BIDIR_CHROMA      576+576
    
#define MP3_REF0_LUMA_DEF       0
#define MP3_REF1_LUMA_DEF       MP3_REF0_LUMA_DEF
#define MP3_REF0_CHROMA_DEF     1152
#define MP3_REF1_CHROMA_DEF     MP3_REF0_CHROMA_DEF
#define MP3_BIDIR_LUMA_DEF      MP3_REF0_LUMA_DEF
#define MP3_BIDIR_CHROMA_DEF    MP3_REF0_CHROMA_DEF

#define MP3_EVBYA_DEF           1440
#define MP3_EABYA_DEF           MP3_EVBYA_DEF
#define MP3_CDYA_DEF            1655
#define MP3_OSDYA_DEF           1855
#define MP3_AUDYA_DEF           1875
#define MP3_DIR_START       1955
#define MP3_FILE_START      1965
#define MP3_IOPYA_DEF           (2035)  //jhuang mark 2002/10/19 2032
                //#define MP3_ECHOYA_DEF          1951

#define AWV_XS      (0)

///////////////////////////////////////////////////////////

/*
** starts
*/
#define VBV_YS      (MEM_EVBYA)
#define ABV_YS      (MEM_EABYA)
#define SBV_YS      (MEM_SUPYA)
#define CBV_YS      (MEM_CDYA)
#define OBV_YS      (MEM_OSDYA)
#define AWV_YS      (MEM_AUDYA)
#define IOP_YS      (MEM_IOPYA)

#define MP3_VBV_YS  (MP3_EVBYA_DEF)
#define MP3_ABV_YS  (MP3_EABYA_DEF)
#define MP3_CBV_YS  (MP3_CDYA_DEF)
#define MP3_OBV_YS  (MP3_OSDYA_DEF)
#define MP3_IOP_YS  (MP3_IOPYA_DEF)

#define VBV_YE      (MEM_EABYA)
#define ABV_YE      (MEM_SUPYA)
#define SBV_YE      (MEM_CDYA)
#define CBV_YE      (MEM_OSDYA)
#define OBV_YE      (MEM_AUDYA)
#define IOP_YE      (SECT_INFO)
    
#define MP3_VBV_YE  (MP3_CDYA_DEF)  //kevinlu fix 2002/8/16 10:33AM
#define MP3_ABV_YE  (MP3_CDYA_DEF)
#define MP3_CBV_YE  (MP3_OSDYA_DEF)
#define MP3_OBV_YE  (MP3_AUDYA_DEF) //(MP3_DIR_START)
#define MP3_IOP_YE  (SECT_INFO)
        
/*
** HEIGHT
*/
#define VBV_H       (VBV_YE - VBV_YS)
#define ABV_H       (ABV_YE - ABV_YS)

#define AUDMOVE_ABV_H           (MEM_EVBYA_DEF - MEM_AUDMOVE_EABYA_DEF)

#define VCD_CDMOVE_CBV_H        640
#define SVCD_CDMOVE_CBV_H       640
    
#define MP3_CDMOVE_CBV_H        (640)

#define CBV_H       (CBV_YE - CBV_YS)
#define OBV_H       (OBV_YE - OBV_YS)
#define SBV_H       (SBV_YE - SBV_YS)
#define IOP_H       (IOP_YE - IOP_YS)
#define MP3_VBV_H   (MP3_VBV_YE - MP3_VBV_YS)
#define MP3_ABV_H   (MP3_ABV_YE - MP3_ABV_YS)

#define MP3_CBV_H   (MP3_CBV_YE - MP3_CBV_YS)

#define MP3_OBV_H   (MP3_OBV_YE - MP3_OBV_YS)
#define MP3_IOP_H   (MP3_IOP_YE - MP3_IOP_YS)                                   

        


    

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?