vgetsc.c

来自「这是韩国EQUATOR公司提供的DEMO程序」· C语言 代码 · 共 42 行

C
42
字号
/**
*** Copyright (c) 2001 Equator Technologies, Inc.
**/

#include "vdata.h"

static inline int GetStartcode() 
{

    vlx_call(pGbStallHandler, C1_GBSTALL);
    VlxGbAlignI();

    //
    // Flush out junk until we get 16 '0's
    //
    while (symbol != 0x0) {
        VlxGbAdvIB(8); 
        vlx_mnop(4);
    } 

    //
    // Found 16 0s, flush them out
    //
    VlxGbAdvIB(16); 

    // Shift out leading zeros
    //   ~ swap , then shift right by 8, acc = symbol[0:7]
    while ( VlxSwapShiftRight(symbol,8) == 0x0 ) { 
        VlxGbAdvIB(8);
        vlx_mnop(4);
    }

    // Check for symbol[0:7]==0000_0001, else failed
    if ( VlxSwapShiftRight(symbol,8) == 0x1) {
        VlxGbAdvIB(16); // Shift out the startcode
         return 1;       // GOOD startcode
    } else {
        return 0;       // BAD startcode
    } 

} // end GetStartcode()

⌨️ 快捷键说明

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