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

📄 sh_capability.h

📁 SAMSUNG 5009的源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/** 
 @file 		SH_capability.h
 @brief     To set options for low and high level API.

 @author	Taejin Kwon eric.kwon@samsung.com
 @version	0.1
 @date		2005/10/25

 - _SH_SET_~ : Set macro option
 - _SH_SUPPORT_~ : Module support selection
 - _SH_DEF_~ : ID or value definition

 <b>revision history : </b>
 - 2005/10/24 First creation
 - 2005/11/05 Option modification TJ
 */
#ifndef _SH_capability_H_
#define _SH_capability_H_

#ifdef	__cplusplus
extern	"C" {
#endif



/**
 \def _SH_SET_PRINT_ERROR
 To selectable debugging information print out.

 - _SH_SET_PRINT_ERROR : Error log
 - _SH_SET_PRINT_NORM_INFO : Normal operation log
 - _SH_SET_PRINT_DBG_INFO : Debugging information log

 */
#define _SH_SET_PRINT_ERROR							1
#define _SH_SET_PRINT_NORM_INFO						0
#define _SH_SET_PRINT_DBG_INFO						0

#define _SH_SET_PRINT_PTS_DEBUG						0

/****************** VIDEO RELATED *********************************************/
/**
 \def _SH_SUPPORT_CLOSED_CAPTION
 Closed caption support

 BUT this module is needed everytime. To debug closed caption's side effect,
 you cand disable this option. In application side, there is no selectable
 option for closed caption module on/off.
 */
#define _SH_SUPPORT_CLOSED_CAPTION					1	


/** 
 \def _SH_SUPPORT_VIDEO_MODE_CHANGE
 Video mode changable in SETUP and HOT key.

 - _SH_SUB_VIDEO_MODE_AUTO
 - _SH_SUB_VIDEO_MODE_PAL60
 - _SH_SUB_VIDEO_MODE_VGA : Enable/disable VGA output
 - _SH_SUB_VIDEO_MODE_RGB : Enable/disable RGB SCART output

 This option remains for code resizing. When this option is 
 disabled, application cannot change video mode in SETUP menu.
 \remark In order to enable VGA, first check GPIO 3.0 3.1(S5L5001)
 */
#define _SH_SUPPORT_VIDEO_MODE_CHANGE				1
#if _SH_SUPPORT_VIDEO_MODE_CHANGE
#define _SH_SUB_VIDEO_MODE_AUTO						1
#define _SH_SUB_VIDEO_MODE_PAL60						1
#define _SH_SUB_VIDEO_MODE_VGA						_COP_VIDEO_SUB_VGA
#define _SH_SUB_VIDEO_MODE_RGB						_COP_VIDEO_SUB_RGB
#else
#define _SH_SUB_VIDEO_MODE_AUTO						0 /* DON'T CHANGE */
#define _SH_SUB_VIDEO_MODE_PAL60						0 /* DON'T CHANGE */
#define _SH_SUB_VIDEO_MODE_VGA						0 /* DON'T CHANGE */
#define _SH_SUB_VIDEO_MODE_RGB						0 /* DON'T CHANGE */
#endif

/**
 \def _SH_DEF_PAL_ID_TYPE
 To select PAL ouput type.

 - _SH_DEF_PAL_ID_REAL_PAL : Real PAL only
 - _SH_DEF_PAL_ID_PAL60_ALSO :  PAL60 if possible

 \remark Do not change PAL_ID.
 */
#define _SH_DEF_PAL_ID_REAL_PAL						0x0
#define _SH_DEF_PAL_ID_PAL60_ALSO					0x1
#define _SH_DEF_PAL_ID_TYPE							_SH_DEF_PAL_ID_REAL_PAL

/**
 \def _SH_SUPPORT_COMPONENT_REAL_PAL
 To select Component PAL output type
 
 - 1 : component output to be "real" PAL only,
 - 0 : component output to be same as "PAL60" when PAL60 is possible,

 \remark   This macro is valid only when _SH_SUB_VIDEO_MODE_PAL60 is 1
    		or _SH_DEF_PAL_ID_TYPE is _SH_DEF_PAL_ID_PAL60_ALSO. 
*/
#define _SH_SUPPORT_COMPONENT_REAL_PAL				0


/**
 \def _SH_SUPPORT_PAL_60 
 Set automatically according to the above settings.

 This options depends on following options
 - _SH_SUB_VIDEO_MODE_PAL60
 - _SH_DEF_PAL_ID_TYPE 

 \remark Don't change this. supportable after REVISED S5H5002 2004.2.25 
 */
#if _SH_SUB_VIDEO_MODE_PAL60 || (_SH_DEF_PAL_ID_TYPE==_SH_DEF_PAL_ID_PAL60_ALSO)
#define _SH_SUPPORT_PAL_60								1
#else
#define _SH_SUPPORT_PAL_60								0
#endif


/* 
	\def _SH_AUTO_TV_MODE_ONCE_FOR_DISC
	
	Decide the TV mode only once for one disc.

	When the current TV output mode is autio,
	
	If _USE_AUTO_TV_MODE_ONCE_FOR_DISC is defined,
	the TV mode is decided only once when playing the first video stream 
	in the disc and it is not changed even though the stream is changed.

	If _USE_AUTO_TV_MODE_ONCE_FOR_DISC is NOT defined,
	every time the video stream is changed, the TV output mode is changed.

	 \remark Disabled by default. 

*/
#define _SH_AUTO_TV_MODE_ONCE_FOR_DISC			1


/*
	Enabled for 5005 EVT1
*/
#if _USE_5005 || _USE_5015
#define _USE_5005_EVT1					1
#else
#define _USE_5005_EVT1					0
#endif


/* This define should be set 1 for 5005, because 5005 cannot support
	both CVBS and Component progressive at the same time.
	In 5015, this should be 0 */
#if _USE_5005 
#define _USE_REAL_INTERLACE					1	
#else
#define _USE_REAL_INTERLACE					0
#endif

/* 
	If Enabled, execute Vsync routine using Timer routine
	in order to execute after VP starts reading.
	(20050905,ishan) 
*/	
#if _USE_5005 || _USE_5015
#if _API_CAP_GLB_B2R_FRAME_MODE
#define _USE_VSYNC_TIMER						1
#else
#define _USE_VSYNC_TIMER						0
#endif
#else
#define _USE_VSYNC_TIMER						0
#endif


#if (_USE_5005 || _USE_5015) && _API_CAP_GLB_B2R_FRAME_MODE
/* B2R works abnormally when zooming SVCD in 5005, B2R mode.
	Enable S/W work-around (20051109,ishan) */
#define _USE_FIX_SVCD_ZOOM_BUG				1
#else
#define _USE_FIX_SVCD_ZOOM_BUG				0
#endif

/* 
	Fix the B2R rewind point bug in M2VD  (20060107,ishan)

	When the B pic start code is located at the VBV_AREA_START + x (x=0,1,2) 
	in B2R mode, rVBV_RD_PTR is set wrong value out of VBV AREA range.
	
*/	

#if _API_CAP_GLB_B2R_FRAME_MODE && ( _USE_5008 || _USE_5005 || _USE_5015 )
#define _USE_FIX_B2R_REW_POINT_BUG			1
#else
#define _USE_FIX_B2R_REW_POINT_BUG			0
#endif

/******************************************************************************
 * Video manager, Display manager related define 
 *****************************************************************************/

/* 
	1 for adjust  AV_SYNC value dynamically at runtime depending on A/V bufferring level 
*/
#if _API_CAP_GLB_BAT_MODE
#define _USE_DYNAMIC_AV_SYNC					0
#else
#define _USE_DYNAMIC_AV_SYNC					1
#endif

#define _USE_AV_SYNC							1

#define _USE_NEW_FIELD_HANDLE					1

/* Change the previous vcd trick play option to _USE_NEW_VIDEO_TRICK_OLD
	and modify and add the code with _USE_NEW_VIDEO_TRICK option.
	(20051022,ishan) */
#define _USE_NEW_VIDEO_TRICK_OLD				0	// zb 050718
#define _USE_NEW_VIDEO_TRICK					1

/* [Sunto 051102]
"High-Definition" DivX video support, up to 960*576 resolution.
     MPVD max supports 960 line resolution, vertical resolution depends on memory.
     VP max supports 720*576 resolution.
Involved parameters:
     MPVD - max hor size check
     VP - src_width, src_h_offset (inside src_h_positon)
*/
#if	_USE_5010||_USE_5009	// zb 060410
#define	_SUPPORT_HD_DIVX_VIDEO				(!_COP_5009_SIMPLE_SOL)	// Sunto 051102
#else
#define	_SUPPORT_HD_DIVX_VIDEO				0	// Sunto 051102
#endif

/* 
	_USE_VIDEO_RECOMP
		: Use the video recompression when the decoded video output is PAL

	_USE_QUICK_HANDLE_CMD_RDY
		: Enable the M2VD cmd_ready ISR to be handled quickly
	
*/
#if (_USE_5005 || _USE_5015) && (_API_CAP_GLB_B2R_FRAME_MODE)
#define _USE_VIDEO_RECOMP						1
#define _USE_QUICK_HANDLE_CMD_RDY			1
#else
#define _USE_VIDEO_RECOMP						0
#define _USE_QUICK_HANDLE_CMD_RDY			0
#endif

/* 
	Fix the M2VD bug in recompresion mode  (20051203,ishan)

	This should be enabled for 5005 EVT0
*/	
#if _USE_5005_EVT1
#define _USE_FIX_RECOMP_BUG					0
#else
#define _USE_FIX_RECOMP_BUG					1
#endif


#if (_USE_5008) || (_USE_5005) || _USE_5015
/* 1 for 5008 EVT2, 0 for otherwise */
#define _USE_5008_EVT2							1
#else
/* 0 for 5001 and 5010 */
#define _USE_5008_EVT2							0
#endif

#if _USE_5008_EVT2

#if (_USE_5005 || _USE_5015) && !(_API_CAP_GLB_B2R_FRAME_MODE)
/* 5005, 3 frame mode -> Turn VD-VP handshake on (20051021,ishan) */
#define _USE_VD_VP_HANDSHAKE					1
#else
#define _USE_VD_VP_HANDSHAKE					0
#endif

/* Use M2VD rewind interrupt */
#define _USE_M2VD_REWIND_INT					1

/* Field selective motion compensation for  zoom-out performance 
	To enable this, _USE_M2VD_REWIND_INT should be enabled */
#define _USE_FSMC								1
/* 
	Zoom change routine in B2R mode 

    Only one of the followings should be "1", and others should be "0" 

 */
#define _USE_B2R_ZOOM_CHANGE					0
#define _USE_B2R_ZOOM_CHANGE_REWIND			1	/* should be 0 if _USE_M2VD_REWIND_INT is 0 */
#else
/* For 5008 EVT0/1, the following values are fixed  */
#define _USE_VD_VP_HANDSHAKE					0
#define _USE_M2VD_REWIND_INT					0
#define _USE_FSMC								0

#define _USE_B2R_ZOOM_CHANGE					1
#define _USE_B2R_ZOOM_CHANGE_REWIND			0	/* should be 0 if _USE_M2VD_REWIND_INT is 0 */
#endif

/* 
    Fix the 5008 M2VD HW bug that when the decoding error happens at the last MB,
    the rewind does not happen and cmd_rdy interrupt occurs.
    (DVD "Friends", TT=1, CH=3, the beginning part.)

    In this case, rewind should be done by S/W (20050825,ishan)
*/
#if _USE_5005_EVT1
#define _USE_HANDLE_B2R_LAST_MB_ERROR           0
#else
#define _USE_HANDLE_B2R_LAST_MB_ERROR           1
#endif


//////////////////////////////////////////////////////////////////////////////////
//		check the validify of capabilities for M2VD 
//////////////////////////////////////////////////////////////////////////////////

/* Check if only one is set 1 */
#if (_USE_B2R_ZOOM_CHANGE) && (_USE_B2R_ZOOM_CHANGE_REWIND)
#undef _USE_B2R_ZOOM_CHANGE
#undef _USE_B2R_ZOOM_CHANGE_REWIND
/* If both are set to 1, make the first macro 1 forcedly */
#define _USE_B2R_ZOOM_CHANGE					1
#define _USE_B2R_ZOOM_CHANGE_REWIND			0
#endif

/* Check if _USE_B2R_ZOOM_CHANGE_REWIND is set properly */
#if !(_USE_M2VD_REWIND_INT) && (_USE_B2R_ZOOM_CHANGE_REWIND)
#undef _USE_B2R_ZOOM_CHANGE_REWIND
/* Make _USE_B2R_ZOOM_CHANGE_REWIND "0"  forcedly if _USE_M2VD_REWIND_INT is 0 */
#define _USE_B2R_ZOOM_CHANGE_REWIND			0	/* Disable */
#endif

/* Check if _USE_FSMC is set properly */
#if !(_USE_M2VD_REWIND_INT) && (_USE_FSMC)
#undef _USE_FSMC
/* Make _USE_FSMC "0"  forcedly if _USE_M2VD_REWIND_INT is 0 */
#define _USE_FSMC								0	/* Disable */
#endif

/* 
	For DVD FF2x using IPs
	If set TRUE, the DVD navigator doesn't need to call Stop()
	when changing from normal,SF,Step to FF2x or vice versa.
	(20050828,ishan)
*/
#define _USE_SMOOTH_DVD_FF2X_CHANGE			1


/*
	Use BAT for vbv buffer
*/
#if _API_CAP_GLB_BAT_MODE
#define _SH_SUPPORT_BAT_VIDEO					1
#else
#define _SH_SUPPORT_BAT_VIDEO					0
#endif

////////////// MACROs for CAPABILITY //////////////////////////////////////////
/******************************************************************************
 *
 * 				Front End Related Macros

⌨️ 快捷键说明

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