⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 global.h

📁 adi bf533视频编码程序
💻 H
字号:
#ifndef _GLOBAL_H_
#define _GLOBAL_H_

#include "ippdefs.h"
#include "def_gary.h"

    double mPSNR_Y,mPSNR_U,mPSNR_V;
    int     mSourceFormat;          // 4:2:0, 4:2:2, 4:4:4, ...
    int     mSourceWidth;           // width
    int     mSourceHeight;          // height
    int     mExpandSize;
    int     mNumMacroBlockPerRow;
    int     mNumMacroBlockPerCol;
	
    int     mStepLuma;
    int     mStepChroma;
	
    int     mLumaPlaneSize;
    int     mChromaPlaneSize;
    int     mPlanes;

    int    VideoEncoder_mIsInit;
    int     mExpandSizeA;
    int     VideoEncoder_mError;
//    Ipp8u     *mBackPtrY, *mBackPtrU, *mBackPtrV;
//    int        mNumOfFrames;
	unsigned int        VideoEncoderMPEG4_mFrameCount;
//	int     mQuantIVOP, mQuantPVOP, mQuantBVOP, mQuantSVOP;
	int     mQuantIVOP, mQuantPVOP;			//----no bvop, no svop;
//    int     mIVOPdist, mPVOPdist, mBVOPdist;
    int     mIVOPdist, mPVOPdist;			//----no bvop;
    
    int     mPVOPsearchHor, mPVOPsearchVer;
//    int     mBVOPsearchHorForw, mBVOPsearchVerForw;		----no bvop
//    int     mBVOPsearchHorBack, mBVOPsearchVerBack;		----no bvop
    int     mPVOPfcodeForw;
//    int     mBVOPfcodeForw;		----no bvop
//    int     mBVOPfcodeBack;		----no bvop
    Ipp16s  mDefDC;
//    int     mMEaccuracy;					----no use;
//    int     mMEalgorithm;					----no use;
//    Ipp32s  *mMEfastSAD;					//----since no fastSAD, commented;
//    int     mMEfastSADsize;				//----since no fastSAD, commented;

//    int     mMEthrSAD16x16				----no use;
//    int	    mMEthrSAD8x8				----no use;
//    int		mMEthr4MV;					----no 4mv;
    int 	mMEthrIntra;

        
//    int     mME4mv;		__070613_2__no_4mv
    int     mCalcPSNR;
    int     mVOPtime;
//    int     mIndxBVOP, mTRB, mTRD;    --070613_2--no bvop;

	int bypass_dist;											//skip n frames per encoded frame, to control rate;
//    int lines_per_frame;			//PPI configuration;    
//	int dma_src_x_mod;
//	int dma_src_y_mod;
//	int height_div;
	int cur_dma_buf_i;
	int next_dma_buf_i;
	int cur_enc_buf_i;
//	int y0_config;
//	int y1_config;
//	int dma_dst_step;
	int MBDMA_YS0_x_mod;
	int MBDMA_YS0_y_mod;
	int MBDMA_YS0_y_mod_prepro;
	int MBDMA_UVS0_y_mod;
	int prepro_back_offset;
	int MB_byte_step;
	int MB_row_step;
	
//use default quant table, so these customed tables is no use;
//segment("L1_data_b")Ipp16s intra_quant_mat[64],nonintra_quant_mat[64];
//segment("L1_data_b")Ipp8u intra_quant_inv_mat[64],nonintra_quant_inv_mat[64];

//changed by gary.
/* To run program from flash, we can't define array before sdram being initiated. */
//segment("sdram_bank2")Ipp8u mBuffer[0x20000];//4	--128KB
//segment("sdram_bank2")Ipp8u tx_buffer[0x200000];//4 	--2MB
//segment("sdram_mem")	Ipp8u mBuf656[4][(1440+16)*(288+4)];
//segment("sdram_bank1")	Ipp8u mPrefeY[2][752*320], mPrefeU[2][376*160], mPrefeV[2][376*160];
Ipp8u * const mBuffer	= 	(Ipp8u *)0x0900000;
Ipp8u * const tx_buffer	= 	(Ipp8u *)0x0920000;
Ipp8u * const mBuf656	=	(Ipp8u *)0x0000004;
Ipp8u * const mPrefeY	=	(Ipp8u *)0x0800000;
Ipp8u * const mPrefeU	=	(Ipp8u *)0x0875800;
Ipp8u * const mPrefeV	=	(Ipp8u *)0x0892E00;


//segment("sdram_mem")Ipp32s fastSAD[1000];				//----since no fastSAD, commented;

//segment("sdram_mem")Ipp8u mPtreY[4][122880], mPtreU[4][30720], mPtreV[4][30720];


//liu
//segment("sdram_mem")Ipp8u mPtreY_0_2[2][122880], mPtreU_0_2[2][30720], mPtreV_0_2[2][30720];
//segment("sdram_bank1")Ipp8u mPtreY_1_3[2][122880], mPtreU_1_3[2][30720], mPtreV_1_3[2][30720];
int YUV656_BUF_WIDTH;
//int YUV656_BUF_HEITH;

Ipp8u *mPrefY[2], *mPrefU[2], *mPrefV[2];
Ipp8u *mPtr656[4];
//Ipp8u  **mPtrY, **mPtrU, **mPtrV;
//Ipp8u  **mPtreY, **mPtreU, **mPtreV;

Ipp8u     *mCurrPtr656;
Ipp8u	  *mCurrPtrY, *mCurrPtrU, *mCurrPtrV;
Ipp8u     *mForwPtrY, *mForwPtrU, *mForwPtrV;

//segment("L1_data_b")	Ipp8u MB_buffer[2][24*18+64+64];
//segment("L1_data_a")	Ipp8u win_buffer[2][48*48+24*24*2];
//segment("MB_refwin0")	Ipp8u MB_refwin_buf0[4016];
//segment("MB_refwin1")	Ipp8u MB_refwin_buf1[4016];
segment("MB_buf0") Ipp8u MB_buf_0[24*18+128];
segment("MB_buf1") Ipp8u MB_buf_1[24*18+128];
Ipp8u *MB_buffer[2];
segment("refwin_buf") Ipp8u refwin_buffer[(REFWIN_NUM+2)*16*48+(REFWIN_NUM+2)*8*24*2];
Ipp8u *refwin_Y;
Ipp8u *refwin_U;
Ipp8u *refwin_V;
int refwin_Y_step;
int refwin_UV_step;

//Ipp8u *win_buffer[2];
//Ipp8u *Current_MB;
//47*4=188B
segment("L1_data_b")	struct  IppMotionVector		_refmv[REFMV_NUM];
struct  IppMotionVector		*refmv;
//91*2=182B
segment("L1_data_b")	short 	_refYDC[REFYDC_NUM];
short *refYDC;
segment("L1_data_b")	short 	_refUDC[REFUVDC_NUM];	//46*2=92B
short *refUDC;
segment("L1_data_b")	short 	_refVDC[REFUVDC_NUM];
short *refVDC;
segment("L1_data_b")	short	refYAC[REFYAC_NUM][8];
segment("L1_data_b")	short	refUAC[REFUVAC_NUM][8];
segment("L1_data_b")	short	refVAC[REFUVAC_NUM][8];


//12B
segment("L1_data_b")    struct ippBitStream                cBS;
//segment("L1_data_b")    struct mp4_VisualObjectSequence    VOS;		//----no vos header
segment("L1_data_b")    struct mp4_VisualObject            VO;//44B
segment("L1_data_b")    struct mp4_VideoObjectLayer        VOL;//460B
//segment("L1_data_b")    struct mp4_GroupOfVideoObjectPlane GOP;
segment("L1_data_b")    struct mp4_VideoObjectPlane        VOP;//236B
//segment("sdram_mem")    struct mp4_MacroBlock             MBinfo[400];
//segment("sdram_mem")    struct mp4_MacroBlock             MBinfo[810];	//for 2cif format;
/*==========to alternate get_CurMB_COPY_asm function===*/
//void (*get_CurMB)(Ipp8u *pCur,Ipp8u *pYc,Ipp8u *pUc,Ipp8u *pVc,int step,int flag_dma);
//void (*get_MB)(Ipp8u *src656, Ipp8u *dstMB);

//void (*get_MB_refwin)(Ipp8u *src656, Ipp8u *win_src, Ipp8u *MB_dst, Ipp8u *win_dst);

void (*restore_MB_get_MB_refwin) (
	Ipp8u *MB_restore, Ipp8u *refvop_Y, Ipp8u *refvop_U, Ipp8u *refvop_V, 
	Ipp8u *src656, Ipp8u *MB_dst, 
	Ipp8u *win_Y_src, Ipp8u *win_U_src, Ipp8u *win_V_src,
	Ipp8u *win_Y_dst, Ipp8u *win_U_dst, Ipp8u *win_V_dst,
	int flag
	);


void (*MB_preprocess)(Ipp8u *MB, int width);

#endif

⌨️ 快捷键说明

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