emhwlib_globaltypes.h

来自「SigmDesign SMP8634 media decode chip dev」· C头文件 代码 · 共 1,832 行 · 第 1/4 页

H
1,832
字号
	RMuint32 PictureAddress;};struct EMhwlibSurfaceReader {	RMuint32 SurfaceAddress;	RMuint32 ReaderID;	/* 	   This field is used temporarily to pass the picture address in 	   AcquirePicture and ReleasePicture.	   It is not passed on a cleaner way because it is not needed when	   the multiple display consumers code is enabled, and we choose an	   api that will be clean with that code.	   The field will be removed soon.	*/	RMuint32 emhwlibReserved;};struct EMhwlibPictureInfo {	struct EMhwlibNewPicture Picture;	RMuint32 PictureAddress;};enum EMhwlibScanMode {	EMhwlibScanMode_Source, 	EMhwlibScanMode_Progressive,	EMhwlibScanMode_Interlaced_TopFieldFirst,	EMhwlibScanMode_Interlaced_BotFieldFirst,};	struct EMhwlibDemuxErrorInfo {	RMuint32 EngineError; /* error per engine */	RMuint32 TaskError; /* error per task */	RMuint32 InputDiscontinuityCounter; /* incremented when the demux detects errors in input Continuity counter */	RMuint32 InputSyncLossCounter; /* incremented when the transport filter loose the 0x47 sync */	RMuint32 OutputOverflowCounter; /* incremented in spi, when the demux cannot write data in one output */	RMuint32 PTSOutputOverflowCounter; /* incremented in spi, when the demux cannot write data in PTS output fifo */};enum EMhwlibHeartBeatCountersVersion {	EMhwlibHeartBeatCountersVersion_0 = 0,};struct EMhwlibHeartBeatCounters {	RMuint32 MpegEngine0;  /* incremented by mpeg engine 0 */	RMuint32 MpegEngine1;  /* incremented by mpeg engine 1. Set to 0 if mpeg engine 1 doesn't exit. */	RMuint32 AudioEngine0; /* incremented by audio engine 0 */	RMuint32 AudioEngine1; /* incremented by audio engine 1.  Set to 0 if audio engine 1 doesn't exit.*/	RMuint32 DemuxEngine0; /* incremented by demux engine 0 */	RMuint32 CPU0;         /* incremented by kernel module */	RMuint32 XPU0;         /* incremented by xos */	RMuint32 Host;         /* incremented by kernel module ? */	RMuint32 VsyncOutport; /* incremented when any vsync interrupt updates the hw registers */};	/* The TVStandard property was not generic when it was first created, * so old code might be using the module-specific property id's.  * This is here to keep old code compilable but new code should use * RMGenericPropertyID_TVStandard */ #define RMDispComponentOutPropertyID_TVStandard  RMGenericPropertyID_TVStandard#define RMDispMainAnalogOutPropertyID_TVStandard RMGenericPropertyID_TVStandard#define RMDispDigitalOutPropertyID_TVStandard    RMGenericPropertyID_TVStandard#define RMDispCompositeOutPropertyID_TVStandard  RMGenericPropertyID_TVStandard/* The TVFormat property was not generic when it was first created, * so old code might be using the module-specific property id's.  * This is here to keep old code compilable but new code should use * RMGenericPropertyID_AnalogTVFormat or RMGenericPropertyID_DigitalTVFormat */ #define RMDispComponentOutPropertyID_TVFormat  RMGenericPropertyID_AnalogTVFormat#define RMDispMainAnalogOutPropertyID_TVFormat RMGenericPropertyID_AnalogTVFormat#define RMDispDigitalOutPropertyID_TVFormat    RMGenericPropertyID_DigitalTVFormat#define RMDispCompositeOutPropertyID_TVFormat  RMGenericPropertyID_AnalogTVFormat/* this is for BDRLE decoding. The application can send command through user data fifo to control the  * decoding of graphics object.  Three types of commands are available.  The value of these commands * are currently decided by microcode, so do not change unless advised by microcode  */#define SpuDecoder_BDRLE_GraphicObject_Start 0x00000100#define SpuDecoder_BDRLE_GraphicObject_Chunk 0x00000101#define SpuDecoder_BDRLE_GraphicObject_End   0x00000111#define MAX_RDRLE_COMMANDS  64struct SpuDecoder_BDRLECommandType {	RMuint32 command;	RMuint32 parameter1;	RMuint32 parameter2;};struct SpuDecoder_BDRLECommands{	RMuint32 command_count;  // identify how many valid commands are there in the "commands"	struct SpuDecoder_BDRLECommandType commands[MAX_RDRLE_COMMANDS];};/* defines used for RMVideoDecoderPropertyID_InterlacedProgressiveAlgorithm. Keep them synchronized with SOURCE_TYPE_DERIVATION_.... from ucode/video/decoder/codec.h *///#define SOURCE_TYPE_DERIVATION_USING_DECODER_SPEC                       0#define INTERLACED_PROGRESSIVE_ALGORITHM_USING_DECODER_SPECIFICATION      0//#define SOURCE_TYPE_DERIVATION_USING_MPEG2_PROGRESSIVE_SEQ              1#define INTERLACED_PROGRESSIVE_ALGORITHM_USING_MPEG2_PROGRESSIVE_SEQ      1//#define SOURCE_TYPE_DERIVATION_USING_MPEG2_FRAME_CNT_IN_SEQ             4#define INTERLACED_PROGRESSIVE_ALGORITHM_USING_MPEG2_MENU_PROGRESSIVE     4/* To be added when they will be implemented//#define SOURCE_TYPE_DERIVATION_USING_H264_FRAME_MBS_ONLY_FLAG           2#define INTERLACED_PROGRESSIVE_ALGORITHM_USING_H264_FRAME_MBS_ONLY_FLAG   2//#define SOURCE_TYPE_DERIVATION_USING_H264_POC                           3#define INTERLACED_PROGRESSIVE_ALGORITHM_USING_H264_POC                   3*/struct VoipCodec_Tone {	RMint32 freq1;	RMint32 freq2;	RMint32 time_on;	RMint32 time_off;	RMint32 level;	RMint32 ring;};enum VoipCodec_Buffer_mode {	VOIP_BUFFER_MODE_FULLNESS = 0,	VOIP_BUFFER_MODE_EMPTYNESS = 1};struct VoipCodec_Cid { 	RMint8 month[3];	RMint8 day[3];	RMint8 hour[3];	RMint8 min[3];	RMint32 numlen;	RMint8 number[11];	RMint32 namelen;	RMint8 name[80];};struct VoipChunk {	RMuint32 size;	RMuint8 data[512];};struct EMhwlibTimerAudioClockConfig {	RMuint32 valid;            // TRUE if this structure has been filled	RMuint32 dirty;            // TRUE if this structure has been updated by the emhwlib	RMuint32 afs;              // TRUE: audio uCode is dermining fs from stream, FALSE: preferred fs is set by emhwlib	RMuint32 mclk_factor;      // 128 or 256	RMuint32 cd_freq;          // frequency of the clean divider input clock	RMuint32 dmem_base;        // audio engine DMem Base	RMuint32 outputmode_reg;   // gbus address of outputmode register in audio uCode	RMuint32 freq_offs;        // bit position inside outputmode_reg of 4 bit frequency tag	RMuint32 force_offs;       // bit position inside outputmode_reg of force flag	RMuint32 chctrl;           // value for channel_control register from emhwlib (frac select bit [15] will be set by timer)	RMuint32 cd_reg;           // clean divider register address	RMuint32 fs;               // 4 bit fs value from audio uCode};#define VCXO_CLK_ID_DIGITAL   0#define VCXO_CLK_ID_ANALOG    1#define VCXO_CLK_ID_COMPONENT 2#define VCXO_CLK_ID_AUDIO_0   3#define VCXO_CLK_ID_AUDIO_1   4#define EMHWLIB_DECODE_BW_MPEG2_HD  400*1024#define EMHWLIB_DECODE_BW_MPEG4_HD  400*1024#define EMHWLIB_DECODE_BW_MPEG2_SD   80*1024#define EMHWLIB_DECODE_BW_MPEG4_SD   80*1024#define EMHWLIB_DECODE_BW_DIVX3      80*1024#define EMHWLIB_DECODE_BW_VC1_HD    880*1024#define EMHWLIB_DECODE_BW_WMV_HD    880*1024#define EMHWLIB_DECODE_BW_VC1_LHD   780*1024#define EMHWLIB_DECODE_BW_WMV_LHD   780*1024#define EMHWLIB_DECODE_BW_VC1_SD    150*1024#define EMHWLIB_DECODE_BW_WMV_SD    150*1024#define EMHWLIB_DECODE_BW_H264_HD   880*1024#define EMHWLIB_DECODE_BW_H264_SD   400*1024#define EMHWLIB_DECODE_BW_JPEG             0#if 1/* Demux modules cleanup.   Structures generated in previous emhwlib_propertytypes.h are still used   in current applications. Until we get rid of them we define these types here.*//* added for DCCHD backward compatibility */struct DemuxProgram_TransportParameters_type {	RMuint16 VideoPID;	RMuint16 AudioPID;	RMuint16 PCRPID;};struct DemuxProgram_ProgramParameters_type {	RMuint8 VideoSID;	RMuint8 AudioSID;	RMuint8 AudioSSID;	RMuint8 SubpictureSID;	RMuint8 SubpictureSSID;};struct DemuxProgram_OutputControl_type {	RMbool Video;	RMbool Audio;	RMbool Subpicture;	RMbool VideoPts;	RMbool AudioPts;	RMbool SubpicturePts;	enum DemuxTriggerType Trigger;};enum Demux_Command_type {	Demux_Command_Play,	Demux_Command_Pause,	Demux_Command_Stop,};enum Demux_State_type {	Demux_State_Playing,	Demux_State_Paused,	Demux_State_Stopped,	Demux_State_PlayPending,	Demux_State_PausePending,	Demux_State_StopPending,};struct Demux_InputParameters_type {	enum DemuxSpiType Spi;	enum DemuxSourceType SourceType;};#endif /* end demux modules cleanup */struct EMhwlibMemoryBlockDescriptor{ 	RMuint32 Address; 	RMuint32 Size;};struct EMhwlibMemoryBlockList{	RMuint32 BlockCount;	struct EMhwlibMemoryBlockDescriptor Blocks[64];};typedef RMstatus (*emhwlib_ppf_get_engine_mem_func)(struct EMhwlibMemoryBlockList *requiredmemblocks);typedef RMstatus (*emhwlib_ppf_set_engine_mem_func)(struct EMhwlibMemoryBlockList *allocatedmemblocks);typedef RMstatus (*emhwlib_ppf_get_output_mem_func)(RMuint32 output_slot, struct EMhwlibMemoryBlockList *requiredmemblocks);typedef RMstatus (*emhwlib_ppf_set_output_mem_func)(RMuint32 output_slot, struct EMhwlibMemoryBlockList *allocatedmemblocks);typedef RMstatus (*emhwlib_ppf_get_output_func)(RMuint32 output_slot, RMuint32 *output_surface);typedef RMstatus (*emhwlib_ppf_set_input_func)(RMuint32 input_slot, RMuint32 input_surface);typedef RMstatus (*emhwlib_ppf_set_command_func)(void *command_param, RMuint32 param_size, void *command_result, RMuint32 result_size);/* these are not part of the handler */typedef RMuint32 (*emhwlib_ppf_run_filter_func)(void *pE, RMuint32 ModuleID, RMuint32 mask);typedef RMstatus (*emhwlib_ppf_init_func)(void);typedef RMstatus (*emhwlib_ppf_deinit_func)(void);struct EMhwlibPPFHandle {	emhwlib_ppf_get_engine_mem_func get_engine_mem;	emhwlib_ppf_set_engine_mem_func set_engine_mem;	emhwlib_ppf_get_output_mem_func get_output_mem;	emhwlib_ppf_set_output_mem_func set_output_mem;	emhwlib_ppf_set_input_func set_input;	emhwlib_ppf_get_output_func get_output;	emhwlib_ppf_set_command_func set_command;/* 	emhwlib_ppf_run_filter_func run_filter; *//* 	emhwlib_ppf_init_func init; *//* 	emhwlib_ppf_deinit_func deinit; */};/** Device settings for the I2C bus */struct EMhwlibI2CDeviceParameter {	/** Set to 1 (used for future extensions) */	RMuint32 APIVersion;	/** GPIO of the I2C data line (software I2C only) */	enum GPIOId_type Clock;	/** GPIO of the I2C clock line (software I2C only) */	enum GPIOId_type Data;	/** I2C device address (write uses DevAddr, read uses DevAddr + 1) */	RMuint8 DevAddr;	/** I2C delay, in uSec */	RMuint32 Delay;	/** frequency of the I2C bit transfer, in kHz (e.g. 100 or 400) */	RMuint32 Speed;};#define PID_USED_IN_PID_BANK    1#define PID_USED_AS_HWPCR       2#define PID_USED_AS_PAT         4#define PID_USED_AS_CAT         8#define PID_USED_AS_MGT      0x10struct EMhwlibPidUsage_type {	RMuint32 flags; /* combination of any of PID_USED_IN_PID_BANK, PID_USED_AS_HWPCR,	                   PID_USED_AS_PAT, PID_USED_AS_CAT, PID_USED_AS_MGT.*/	RMuint32 count; /* number of pid entries already set with the same pid value.	                   Count can be greater than 4, maximum size of the array returned. */	RMuint32x4 pid_entries; /* array of maximum 4 pid entries. The valid count	                           of these entries is RMmin(count, 4). */};enum DiscontinuityProcessingMethod_type {	DiscontinuityProcessingMethod_1 = 1, /* As soon as the demux sends a discontinuity interrupt or RMSTCPropertyID_Discontinuity	                                  is called the pcr is set in the master timer.	                                  When video or audio inband comes the current master timer is set in video/audio timers.					  The issue is that video and audio will skip frames in order to resynchronize.					  The result is worse when the video/audio fifo is big. */	DiscontinuityProcessingMethod_2, /* As soon as the demux sends a discontinuity interrupt or RMSTCPropertyID_Discontinuity	                                  is called the pcr value is stored internally but the master timer is not modified.					  When first discontinuity inband interrupt comes from any of the decoders					  the stored pcr is set in the master timer and also in the corresponding decoder's timer.					  The other timer will be set when the inband will come, using the current master timer.					  This method should drastically reduce the number of frames skipped at discontinuity point. */};enum EMhwlibPictureOrientation{	EMhwlibPictureOrientation_HFlip,	EMhwlibPictureOrientation_VFlip,	EMhwlibPictureOrientation_BLDiagonalFlip,	EMhwlibPictureOrientation_TLDiagonalFlip,	EMhwlibPictureOrientation_90,	EMhwlibPictureOrientation_180,	EMhwlibPictureOrientation_270,};enum EMhwlibPictureTransformType{	EMhwlibPictureTransformType_Orientation,};struct EMhwlibBWMonitorSample{	RMuint32 DRAMControllerId;	RMuint32 TotalTransfers;	RMuint32 SelectedTransfers;	RMuint32 Interval;	RMuint32 SampleRef;};#define BWM_VOID                     0xff#define BWM_ALL_BUSES_W              0x1e#define BWM_ALL_BUSES_R              0x9e              #define BWM_MBUS_HOST0_R             0x80#define BWM_MBUS_HOST1_R             0x81#define BWM_MBUS_AUDIO0_R            0x82#define BWM_MBUS_AUDIO1_R            0x83#define BWM_MBUS_TRANSPORT_R         0x84#define BWM_MBUS_VIDEO_MISC0_R       0x85#define BWM_MBUS_VIDEO_MISC1_R       0x86#define BWM_MBUS_VIDEO_DBLK0_R       0x87#define BWM_MBUS_VIDEO_DBLK1_R       0x88#define BWM_MBUS_VIDEO_STORE0_R      0x89#define BWM_MBUS_VIDEO_STORE1_R      0x8a#define BWM_MBUS_ALL_R               0x9d#define BWM_MBUS_HOST0_W             0x00#define BWM_MBUS_HOST1_W             0x01#define BWM_MBUS_AUDIO0_W            0x02#define BWM_MBUS_AUDIO1_W            0x03#define BWM_MBUS_TRANSPORT_W         0x04#define BWM_MBUS_VIDEO_MISC0_W       0x05#define BWM_MBUS_VIDEO_MISC1_W       0x06#define BWM_MBUS_VIDEO_DBLK0_W       0x07#define BWM_MBUS_VIDEO_DBLK1_W       0x08#define BWM_MBUS_VIDEO_STORE0_W      0x09#define BWM_MBUS_VIDEO_STORE1_W      0x0a#define BWM_MBUS_ALL_W               0x1d#define BWM_VBUS_MV_L_R              0xa0     #define BWM_VBUS_MV_C_R              0xa1#define BWM_VBUS_VCR_L_R             0xa2#define BWM_VBUS_VCR_C_R             0xa3#define BWM_VBUS_VP_R                0xa4#define BWM_VBUS_HDSD_R              0xa5#define BWM_VBUS_GFX_L_R             0xa6#define BWM_VBUS_GFX_C_R             0xa7#define BWM_VBUS_OSD_R               0xa8#define BWM_VBUS_SPU_R               0xa9#define BWM_VBUS_GACC_Y_R            0xaa#define BWM_VBUS_GACC_X_R            0xab#define BWM_VBUS_ALL_R               0xbd#define BWM_VBUS_GRAPH_IN_W          0x20#define BWM_VBUS_VIDEO_IN_W          0x21#define BWM_VBUS_GACC_W              0x22#define BWM_VBUS_HDSD_W              0x23#define BWM_VBUS_ALL_W               0x3d#define BWM_GBUS_R                   0xdd#define BWM_GBUS_W                   0x5dstruct EMhwlibChunk256 {	RMuint32 size;	RMuint8 data[256];};enum EMhwlibReadBufferCompletionMode {	EMhwlibReadBufferCompletionMode_Full,        /* complete the buffer when it is full; default behavior */	EMhwlibReadBufferCompletionMode_NoDelay,     /* complete the buffer as soon as the microcode sends data.	                                                This can guarantee one or multiple access units in the data.							 Note. Access unit can be: section, PES, user data, etc. */	EMhwlibReadBufferCompletionMode_MinimumSize, /* complete the buffer when the buffer has more than the threshold value */	EMhwlibReadBufferCompletionMode_ExactSize,   /* complete the buffer when the buffer has exactly the threshold value */};struct EMhwlibReadBufferCompletion {	/** By default the DMA buffers are completed when they are full. */	enum EMhwlibReadBufferCompletionMode mode;	/** Limited to max 1MB=0x100000. Used only when the mode is ..._MinimumSize or ..._ExactSize. */	RMuint32 threshold;};enum EMhwlibRecipherMode {	EMhwlibRecipher_passthrough, /* It reciphers only the encrypted TS packets. */	EMhwlibRecipher_always       /* It reciphers all TS packets - clear or encrypted. */};struct EMhwlibTTXFifoInfo {	RMuint32 base;	RMuint32 size;	RMuint32 readable;	RMuint32 writable;};/*Logic OR-ed flags needed for RMVideoDecoderPropertyID_SequenceEndCodeResetFlags */#define VIDEO_SEQUENCE_END_CODE_RESET_REFERENCES        1 /* It prevents prediction across the boundaries of video sequences */#define VIDEO_SEQUENCE_END_CODE_RESET_DISPLAY_SIZE      2 /* It prevents display size propagation across the boundaries of video sequences */#define VIDEO_SEQUENCE_END_CODE_RESET_COLOR_DESCRIPTION 4 /* It prevents color description propagation across the boundaries of video sequences */enum EMhwlibInbandPanScanMode {	EMhwlibInbandPanScan_DefaultPicture = 0, /* the window coordinates are ignored */	EMhwlibInbandPanScan_AbsoluteWindow,     /* the window coordinates are in 1/16 pixel accuracy. For an image width of 720 pixels the coordinate should be 720*16. */	EMhwlibInbandPanScan_RelativeWindow,     /* the window coordinates are relative to the decoded picture, on a scale of 4096. 100% = 4096. */	EMhwlibInbandPanScan_LetterBox_Center,   /* the window coordinates are ignored */	EMhwlibInbandPanScan_LetterBox_Top,      /* the window coordinates are ignored */};struct EMhwlibInbandPanScan {	enum EMhwlibInbandPanScanMode mode;	struct EMhwlibWindow window;};#endif // __EMHWLIB_GLOBALTYPES_H__

⌨️ 快捷键说明

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