vmbaddi.c
来自「这是韩国EQUATOR公司提供的DEMO程序」· C语言 代码 · 共 91 行
C
91 行
/**
*** 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 + =
减小字号Ctrl + -
显示快捷键?