#ifndef __PID_FILTER_MAP_H__
#define __PID_FILTER_MAP_H__

#include "hx_types.h"

#define PAT_PID		0x0000
#define CAT_PID		0x0001
#define NIT_PID		0x0010
#define SDT_PID		0x0011
#define BAT_PID		0x0011

#define EIT_PID		0x0012

#define TDT_PID		0x0014

#define MGT_PID		0x1FFB
#define VCT_PID		0x1FFB
#define RRT_PID		0x1FFB
#define STT_PID		0x1FFB

#define CAS_BAT_PID  0x0024

enum SECTION_TYPE {
	SECTION_PSI = 0,
	SECTION_PRI,
	SECTION_PES,
	SECTION_DSMCC,
	SECTION_ECM_CIPHER_0,
	SECTION_ECM_CIPHER_1,
	SECTION_ECM_CIPHER_2,
	SECTION_ECM_CIPHER_3,
	SECTION_ECM_CIPHER_4,
	SECTION_ECM_CIPHER_5,
	SECTION_EMM_0,
	SECTION_EMM_1,
	SECTION_EMM_2,
	TELETEXT,
	SUBTITLE,
	SECTION_TS,
	SECTION_AUDIO_DATA,
	SECTION_EMU,
	SECTION_PSI_PMT_SCAN
};

HX_UINT8 pat_table_ids[] = { 0x00 };
HX_UINT8 cat_table_ids[] = { 0x01 };
HX_UINT8 pmt_table_ids[] = { 0x02 };
HX_UINT8 nit_table_ids[] = { 0x40 };
HX_UINT8 onit_table_ids[] = { 0x40,0x41 };
HX_UINT8 sdt_table_ids[] = { 0x42};
HX_UINT8 osdt_table_ids[] = { 0x42,0x46 };
HX_UINT8 bat_table_ids[] = { 0x4A };
HX_UINT8 tdt_table_ids[] = { 0x70 };
HX_UINT8 tot_table_ids[] = { 0x73 };

HX_UINT8 ecm_table_ids[] = { 0x80, 0x81 };

HX_UINT8 atsc_eit_table_ids[] = { 0xCB };

#if 0
HX_UINT8 dvb_eit_table_ids[] = {
	0x4e, 0x4f,
	0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
	0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
	0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
	0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f
};
#else
HX_UINT8 dvb_eit_table_ids[] = {
	0x4e, 0x4f, 
	0x50, 0x51, 	// general table_id
	0x58, 0x59, 		//detail table_id
	0x60, 0x61, 	// general table_id
	0x68, 0x69 		//detail table_id
};
#endif

//2k90304 son1127
HX_UINT8 dvb_eit_pf_table_ids[] = { 0x4e, 0x4f, };
HX_UINT8 dvb_eit_actual_schedule_table_ids[] = {
	0x50, 0x51, 
	0x58, 0x59, 	
};
HX_UINT8 dvb_eit_other_schedule_table_ids[] = {
	0x60, 0x61, 
	0x68, 0x69 	
};
HX_UINT8 dvb_eit_schedule_table_ids[] = {
	0x50, 0x51, 	// general table_id
	0x58, 0x59, 		//detail table_id
	0x60, 0x61, 	// general table_id
	0x68, 0x69 		//detail table_id
};

HX_UINT8 dvb_eit_4day_schedule_table_ids[] = {
	0x50,  
	0x58,  
	0x60,  	
	0x68,  	
};

HX_UINT8 dvb_eit_8day_schedule_table_ids[] = {
	0x51,  
	0x59,  
	0x61,  	
	0x69,  	
};
HX_UINT8 dvb_eit_full_table_ids[] = {
	0x4e, 0x4f,
	0x50, 0x51, 	// general table_id
#if 0
	0x50, 0x51,  0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 
	0x58, 0x59,  0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 
	0x60, 0x61,  0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 
	0x68, 0x69,  0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 
#else
	0x58, 0x59, 		//detail table_id
	0x60, 0x61, 	// general table_id
	0x68, 0x69 		//detail table_id
#endif
};

HX_UINT8 stt_table_ids[] = { 0xCD };
HX_UINT8 ett_table_ids[] = { 0xCC };

HX_UINT8 mgt_table_ids[] = { 0xC7,0xC8,0XCA, 0xCD, 0xD3, 0xD4 };

HX_UINT8 vct_table_ids[] = { 0xC8,0xC9 };
HX_UINT8 rrt_table_ids[] = { 0XCA };
HX_UINT8 dcct_table_ids[] = { 0xD3, 0xD4 };

HX_UINT8 upd_table_ids[] = { 0xF0}; 

HX_UINT8 emm_table_ids[] = { 
	0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
	0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f
};

HX_UINT8 dsmcc_table_ids[] = { 0x3B, 0x3C }; //0x3B=DSI DII, DDB

HX_INT32 pat_table_num = sizeof(pat_table_ids)/sizeof(HX_UINT8);
HX_INT32 cat_table_num = sizeof(cat_table_ids)/sizeof(HX_UINT8);
HX_INT32 pmt_table_num = sizeof(pmt_table_ids)/sizeof(HX_UINT8);
HX_INT32 emm_table_num = sizeof(emm_table_ids)/sizeof(HX_UINT8);

HX_INT32 nit_table_num = sizeof(nit_table_ids)/sizeof(HX_UINT8);
HX_INT32 onit_table_num = sizeof(onit_table_ids)/sizeof(HX_UINT8);
HX_INT32 sdt_table_num = sizeof(sdt_table_ids)/sizeof(HX_UINT8);
HX_INT32 osdt_table_num = sizeof(osdt_table_ids)/sizeof(HX_UINT8);
HX_INT32 bat_table_num = sizeof(bat_table_ids)/sizeof(HX_UINT8);
HX_INT32 tdt_table_num = sizeof(tdt_table_ids)/sizeof(HX_UINT8);
HX_INT32 tot_table_num = sizeof(tot_table_ids)/sizeof(HX_UINT8);
HX_INT32 ecm_table_num = sizeof(ecm_table_ids)/sizeof(HX_UINT8);

HX_INT32 mgt_table_num = sizeof(mgt_table_ids)/sizeof(HX_UINT8);
HX_INT32 vct_table_num = sizeof(vct_table_ids)/sizeof(HX_UINT8);
HX_INT32 stt_table_num = sizeof(stt_table_ids)/sizeof(HX_UINT8);
HX_INT32 rrt_table_num = sizeof(rrt_table_ids)/sizeof(HX_UINT8);
HX_INT32 dcct_table_num = sizeof(dcct_table_ids)/sizeof(HX_UINT8);

HX_INT32 atsc_eit_table_num = sizeof(atsc_eit_table_ids)/sizeof(HX_UINT8);
HX_INT32 dvb_eit_table_num = sizeof(dvb_eit_table_ids)/sizeof(HX_UINT8);
HX_INT32 dvb_eit_pf_table_num = sizeof(dvb_eit_pf_table_ids)/sizeof(HX_UINT8);//2k90304 son1127
HX_INT32 dvb_eit_actual_schedule_table_num = sizeof(dvb_eit_actual_schedule_table_ids)/sizeof(HX_UINT8);
HX_INT32 dvb_eit_other_schedule_table_num = sizeof(dvb_eit_other_schedule_table_ids)/sizeof(HX_UINT8);
HX_INT32 dvb_eit_schedule_table_num = sizeof(dvb_eit_schedule_table_ids)/sizeof(HX_UINT8);
HX_INT32 dvb_eit_4day_schedule_table_num = sizeof(dvb_eit_4day_schedule_table_ids)/sizeof(HX_UINT8);
HX_INT32 dvb_eit_8day_schedule_table_num = sizeof(dvb_eit_8day_schedule_table_ids)/sizeof(HX_UINT8);

HX_INT32 dvb_eit_full_table_num = sizeof(dvb_eit_full_table_ids)/sizeof(HX_UINT8);//2k90304 son1127

HX_INT32 ett_table_num = sizeof(ett_table_ids)/sizeof(HX_UINT8);

HX_INT32 upd_table_num = sizeof(upd_table_ids)/sizeof(HX_UINT8);

//for ATSC
HX_INT32 dsmcc_table_num = sizeof(dsmcc_table_ids)/sizeof(HX_UINT8);

#endif // __PID_FILTER_H__
