vlumchr.c
来自「这是韩国EQUATOR公司提供的DEMO程序」· C语言 代码 · 共 89 行
C
89 行
/**
*** Copyright (c) 2001-2002 Equator Technologies, Inc.
**/
//---------------------------------------------
//---------------------------------------------
//
// vlxmain()
//
//---------------------------------------------
//---------------------------------------------
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;
short* pTmp;
//vlx_breakpoint();
//---------------------------------------------
// 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() ) {
_Error(1);
}
//
// Process the VLCs
//
for ( i = 0 ; i < 3 ; i++ ) {
lumchr_data.data[i] = VlxMpeg2GetDCcoef(_GK2_HWACC_HWCHR);
}
//
// Signal the core that the vlx processing is complete
//
*pSema = 0;
while(1);
} // 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 + -
显示快捷键?