📄 vmbaddi.c
字号:
/**
*** Copyright (c) 2001 Equator Technologies, Inc.
**/
//---------------------------------------------
//
// vlxmain()
//
//---------------------------------------------
//---------------------------------------------
//#define CONFIG_OVERRIDE_DEFAULT_YIELD_HANDLER
//#define CONFIG_NO_YIELD_HANDLER
// Declare standard virtual registers
register void (*pGbStallHandler)() asm ("greg0");
#include <vlxapi/vlxstd.h>
#include <vlxapi/vlx_mpeg_decode.h>
#include "vdata.h"
#include "vdata.c"
#include "vgetsc.c"
void _Error(int flag);
int main()
{
//---------------------------------------------
// Declarations
//---------------------------------------------
volatile int* pSema;
int i;
//---------------------------------------------
// Execution
//---------------------------------------------
//
// Init function pointer to gb stall handler
//
pGbStallHandler = &VlxGbStallHandler;
//
// Init pointers to data structs
//
pSema = &sema.data;
//
// Setup GB configuration
//
VlxGbConfigDS(gb_config.data);
VlxGbSetOptions( _GK2_SETOPT_COUNT_ONES );
//
// Find start code
//
if ( !GetStartcode() ) {
status.start_code_found = 0xe;
_Error(1);
}
status.start_code_found = 0xb;
//
// Process the macroblock_address_increment VLCs
//
for ( i = 0 ; i < 6 ; i++ ) {
mbaddi_data.data[i] = VlxMpeg2GetMbAddrInc();
}
//
// Signal the core that the vlx processing is complete
//
*pSema = 0;
} // end vlxmain()
//----------------------------------------------------
// Function : _Error
// Purpose : Exit loop (if an error is detected)
//----------------------------------------------------
void _Error (int flag)
{
status.exit_code = flag;
while(1);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -