亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? vld_demo.c

?? 圖象采集處理系統,基于dsp平臺,可以直接運行的工程文件和原理圖
?? C
字號:
/* ======================================================================== */
/*  TEXAS INSTRUMENTS, INC.                                                 */
/*                                                                          */
/*  NAME                                                                    */
/*      vld_demo    -- Demo for MPEG-2 VLD routines                         */
/*                                                                          */
/*  USAGE                                                                   */
/*      This code contains an example which explains how to call the        */
/*      MPEG-2 VLD intra and inter routines.                                */
/*                                                                          */
/* ------------------------------------------------------------------------ */
/*            Copyright (c) 2002 Texas Instruments, Incorporated.           */
/*                           All Rights Reserved.                           */
/* ======================================================================== */

#include <stdio.h>
#include <stdlib.h>

#define SHL(x,y) ( (x) << (y) )
#define SHR(x,y) ( (x) >> (y) )

/* ------------------------------------------------------------------------ */
/*  IMGLIB Prototypes                                                       */
/* ------------------------------------------------------------------------ */
#include "IMG_mpeg2_vld_intra.h" 
#include "IMG_mpeg2_vld_inter.h" 

#include "global.h"                     /* MPEG-2 bitstream context         */

/* ------------------------------------------------------------------------ */
/*  Generates random MPEG-2 MB bitstream                                    */
/* ------------------------------------------------------------------------ */
int vlc_gen(IMG_mpeg2_vld *mpeg2_vld_cont, int *mb_type, short *output_gen);

/* ------------------------------------------------------------------------ */
/*  Main                                                                    */
/* ------------------------------------------------------------------------ */
int main()
{
	MPEG2DEC_INFO Mpeg2v;               /* MPEG-2 bitstream info            */
    unsigned int *bsbuf;                /* memory bitstream buffer          */
    int bits_enc, bits_dec;             /* number of bits encoded, decoded  */
    int dc_dct_pred[3];                 /* intra DC predictors              */
    int i,mb;                           /* counters                         */
    int mb_type;                        /* macroblock type: 0=INTER,1=INTRA */
    short output_gen[NUM_MB*6*64];/* output coefs from VLC random generator */
    short output_vld[6*64];       /* output coefs from VLD routine          */
    int error=0;
    
    /* -------------------------------------------------------------------- */
    /*  variables for bitstream management                                  */
    /* -------------------------------------------------------------------- */
    unsigned int word0, word1, word2;     /* word-aligned bitstream buffers */
    unsigned int top0, top1;              /* bit-aligned bitstream buffers  */
    unsigned int next_wptr, old_next_wptr;/* index, next word in bitstream  */
    unsigned int bptr=0,old_bptr, bptr_cmpl;/* bit position of bitstream    */
    unsigned int s1, s2, s3, s4;          /* temporaray variables           */
    
    /* -------------------------------------------------------------------- */
    /* allocate bitstream buffer for circular addressing of size            */
    /* BSBUF_SIZE, aligned at BSBUF_SIZE (BSBUF_SIZE in 32-bit words)       */
    /* -------------------------------------------------------------------- */
    bsbuf = (unsigned int*) memalign(4*BSBUF_SIZE, 4*BSBUF_SIZE); 

    Mpeg2v.mpeg2_vld_cont.bsbuf = bsbuf;
    Mpeg2v.mpeg2_vld_cont.fault = 0;    

    while(!Mpeg2v.mpeg2_vld_cont.fault)
    {
    /* -------------------------------------------------------------------- */
    /*  Fill bitstream buffer bsbuf with random VLC codes for TWO MPEG-2    */
    /*  4:2:0 macroblocks (the same coding paramters are used for both      */
    /*  MB's. Only the block data of the macroblocks is written. Any other  */
    /*  syntax elements are omitted. The purpose is to demonstrate the      */
    /*  chaining capability of the VLD routine. The routine returns the     */
    /*  current state of the bitstream so that other routines using the     */
    /*  same bitstream management can be called consecutively using the     */
    /*  returned bistream state of a previously called routine as input     */
    /*  and starting parsing the bitstream at the position where the        */
    /*  previous routine stopped.                                           */
    /*  The routine also sets next_wptr, mb_type, intra_vlc_format,         */
    /*  quant_scale, cbp (coded block pattern) and intra_dc_precision in    */
    /*  the Mpeg2v structure to                                             */
    /*  random values. bptr is always 0. scan is set to the inverse zigzag  */
    /*  matrix 0. The expected DCT coefficient blocks are written to        */
    /*  output_gen. The routine returns the number of bits written to the   */
    /*  bitstream buffer. The bitstream buffer is filled starting always at */
    /*  word boundaries (i.e. bptr is assumed to be 0) at index next_wptr.  */
    /* -------------------------------------------------------------------- */

    bits_enc = vlc_gen(&Mpeg2v.mpeg2_vld_cont, &mb_type, output_gen); 
    
   /* --------------------------------------------------------------------- */
   /*  Print out some bitstream information                                 */
   /* --------------------------------------------------------------------- */
    printf("Coding paramters for the %d MB's:\n", NUM_MB);
    if (mb_type==1)
    {
        printf("mb_type=INTRA, "); 
        printf("intra_vlc_format=%1d, ",   Mpeg2v.mpeg2_vld_cont.intravlc);
        printf("intra_dc_precision=%1d, ", Mpeg2v.mpeg2_vld_cont.dc_prec);
    }
    else
    {
        printf("mb_type=INTER, "); 
    }
    printf("cbp=%2Xh, ",               Mpeg2v.mpeg2_vld_cont.cbp);
    printf("quant_scale=%2d\n",        Mpeg2v.mpeg2_vld_cont.quant_scale);
    printf("Bitstream info:\n");
    printf("bits=%4d, ",               bits_enc);
    printf("next_wptr=%d\n",           Mpeg2v.mpeg2_vld_cont.next_wptr);
            
   /* --------------------------------------------------------------------- */
   /*  Setup the bitstream and MB context for the first call of the VLD     */
   /*  routine. Bitstream is assumed to have been stored as 32-bit sized    */
   /*  elements.                                                            */
   /* --------------------------------------------------------------------- */
    next_wptr = Mpeg2v.mpeg2_vld_cont.next_wptr;
    
    bptr_cmpl = 32 - bptr;      

    word0 = bsbuf[next_wptr];            /* read first 32 bits of bitstream */
    next_wptr = (next_wptr + 1) & (BSBUF_SIZE-1);  /* circularly inc. index */

    word1 = bsbuf[next_wptr];           /* read second 32 bits of bitstream */
    next_wptr = (next_wptr + 1) & (BSBUF_SIZE-1);  /* circularly inc. index */

    word2 = bsbuf[next_wptr];            /* read third 32 bits of bitstream */
    next_wptr = (next_wptr + 1) & (BSBUF_SIZE-1);  /* circularly inc. index */

    /* -------------------------------------------------------------------- */
    /*  setup the bit aligned bitstream buffer top0 and top1. In this case  */
    /*  top0 is identical to word0 and top1 identical to word1. However,    */
    /*  if bptr != 0, top0 and top1 are obtained as follows:                */
    /* -------------------------------------------------------------------- */
    s1 = SHL(word0, bptr);
    s2 = SHR(word1, bptr_cmpl);                     /* unsigned right-shift */
    top0 = s1 + s2;                         

    s3 = SHL(word1, bptr);
    s4 = SHR(word2, bptr_cmpl);                     /* unsigned right-shift */
    top1 = s3 + s4;
           
    /* -------------------------------------------------------------------- */
    /*  save next_wptr and bptr to be able to calculate how many bits       */
    /*  were decoded by the VLD routine                                     */
    /* -------------------------------------------------------------------- */
    old_next_wptr = next_wptr;
    old_bptr      = bptr;

    /* -------------------------------------------------------------------- */
    /*  assign the determined bitstream info to the Mpeg2v structure        */
    /* -------------------------------------------------------------------- */
    Mpeg2v.mpeg2_vld_cont.next_wptr = next_wptr;
    Mpeg2v.mpeg2_vld_cont.bptr  = bptr;
    Mpeg2v.mpeg2_vld_cont.word1 = word1;
    Mpeg2v.mpeg2_vld_cont.word2 = word2;		
    Mpeg2v.mpeg2_vld_cont.top0  = top0;			
    Mpeg2v.mpeg2_vld_cont.top1  = top1;		
    Mpeg2v.mpeg2_vld_cont.scan  = izigzag_tbl;

    /* -------------------------------------------------------------------- */
    /*  in this example assume that the initial intra DC predictors are zero*/
    /* -------------------------------------------------------------------- */
    dc_dct_pred[0] = 0;
    dc_dct_pred[1] = 0;
    dc_dct_pred[2] = 0;

      /* ----------------------------------------------------------------- */
      /*  decode MB's                                                      */
      /* ----------------------------------------------------------------- */
      for (mb=0; mb<NUM_MB; mb++)
      {
        /* ---------------------------------------------------------------- */
        /*  clear output buffer and call VLD routine                        */
        /* ---------------------------------------------------------------- */
        for (i=0; i<6*64; i++) 
                output_vld[i] = 0;

        if (mb_type==1) /* INTRA */
            IMG_mpeg2_vld_intra(Warr, output_vld, &Mpeg2v.mpeg2_vld_cont, 
            					dc_dct_pred);
        else            /* INTER */
            IMG_mpeg2_vld_inter(Warr_inter, output_vld, &Mpeg2v.mpeg2_vld_cont);

        /* ---------------------------------------------------------------- */
        /*  Verify output                                                   */
        /* ---------------------------------------------------------------- */
        bits_dec = ((Mpeg2v.mpeg2_vld_cont.next_wptr<<5) + Mpeg2v.mpeg2_vld_cont.bptr) 
            - ((old_next_wptr<<5) + old_bptr);
        if (bits_dec<0) 
            bits_dec += BSBUF_SIZE<<5;
               
        printf("Decoded %4d bits, ", bits_dec);
        printf("Fault flag : %d\n", Mpeg2v.mpeg2_vld_cont.fault);

        for (error=0, i=0; i<6*64; i++)
            if (output_gen[mb*6*64+i] != output_vld[i])
            	error=1;

        if (error)
        {
             printf("Error in macroblock (should:is):\n");
             for (i=0; i<6*64; i++)
             {
               if(i%8==0) printf("\n");
               if(i%64==0) printf("\n");
               printf("%d:%d, ", output_gen[mb*6*64+i], output_vld[i]);
             }
        }
            
        old_next_wptr = Mpeg2v.mpeg2_vld_cont.next_wptr;
        old_bptr      = Mpeg2v.mpeg2_vld_cont.bptr;
        
        if (Mpeg2v.mpeg2_vld_cont.fault)
            mb=NUM_MB;                   /* force for mb loop to terminate */
        
      }   /* for mb */
    }   /* while */ 

    free(bsbuf);
    return 0;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91久久免费观看| 成人av免费在线| 天堂成人免费av电影一区| 综合亚洲深深色噜噜狠狠网站| 国产日本亚洲高清| 国产日产欧美一区| 国产精品沙发午睡系列990531| 国产亚洲va综合人人澡精品| 国产亚洲污的网站| 亚洲丝袜美腿综合| 亚洲国产综合视频在线观看| 亚洲国产乱码最新视频| 日韩精品一区第一页| 免费看日韩精品| 国产精品66部| 91麻豆国产在线观看| 欧美色偷偷大香| 欧美一级淫片007| 精品国产髙清在线看国产毛片| 日韩欧美高清一区| 中文字幕+乱码+中文字幕一区| 国产精品美女视频| 亚洲高清中文字幕| 久久99九九99精品| 国产一区二区影院| 丁香婷婷综合色啪| 91视频一区二区| 欧美亚洲愉拍一区二区| 欧美精品在线一区二区| 欧美成人精品二区三区99精品| 国产欧美在线观看一区| 亚洲综合久久av| 国产在线精品一区二区夜色| 成人av动漫在线| 欧美一区二区观看视频| 国产精品久久午夜| 免费成人在线影院| 91片黄在线观看| 日韩精品专区在线影院观看| 亚洲欧洲日韩一区二区三区| 免费在线观看一区二区三区| www.激情成人| 2024国产精品视频| 亚洲成av人片| av亚洲精华国产精华精华| 欧美精选一区二区| 日韩一区日韩二区| 另类小说视频一区二区| 色哟哟亚洲精品| 久久久久久久久伊人| 性做久久久久久免费观看欧美| 国产91高潮流白浆在线麻豆| 日韩欧美亚洲国产另类| 亚洲综合久久av| hitomi一区二区三区精品| 欧美tickle裸体挠脚心vk| 亚洲主播在线播放| 97成人超碰视| 欧美经典一区二区| 国产一区二区三区精品欧美日韩一区二区三区 | 中文字幕欧美国产| 麻豆专区一区二区三区四区五区| 色婷婷综合视频在线观看| 国产精品美女www爽爽爽| 精品一区二区三区在线视频| 欧美性生交片4| 亚洲色大成网站www久久九九| 国产成人精品免费网站| 欧美精品一区二区三区久久久| 视频一区视频二区在线观看| 久久综合色8888| 亚洲国产精华液网站w| 亚洲综合男人的天堂| 色婷婷综合久久久中文字幕| 国产精品久久久久久久久果冻传媒| 国产资源在线一区| 精品国产一区二区三区不卡| 国产91精品入口| 欧美一区二区三区在线视频| 日韩网站在线看片你懂的| 国产91在线|亚洲| 青青草视频一区| 亚洲精品中文在线影院| 精品国产成人系列| 欧美日韩一级视频| 99国产精品国产精品毛片| 久久国产尿小便嘘嘘| 亚洲精品自拍动漫在线| 久久精品免费在线观看| 日韩一级免费观看| 欧美日韩免费电影| 色综合色狠狠天天综合色| 国产电影一区在线| 日本aⅴ精品一区二区三区| 亚洲精品乱码久久久久| 国产精品私人自拍| 久久亚洲捆绑美女| 日韩一区二区免费视频| 欧美性感一类影片在线播放| 99久久精品免费看| 成人av影院在线| 国产91精品精华液一区二区三区| 久久er99精品| 美女一区二区视频| 免费三级欧美电影| 蜜桃精品视频在线观看| 琪琪一区二区三区| 免费成人在线网站| 奇米影视一区二区三区小说| 亚洲第一在线综合网站| 一区二区三区不卡视频在线观看| 中文字幕在线一区二区三区| 国产精品久久久久三级| 中文字幕精品—区二区四季| 国产精品无码永久免费888| 国产欧美日韩中文久久| 亚洲国产岛国毛片在线| 国产精品另类一区| 国产精品久久午夜夜伦鲁鲁| 亚洲欧洲国产日本综合| 亚洲欧美日韩国产综合在线| 一区二区三区国产精品| 亚洲第一激情av| 日韩av一区二区三区四区| 蜜桃av一区二区三区| 久草精品在线观看| 国产福利一区二区三区视频| 成人性视频网站| 99免费精品在线| 在线亚洲一区二区| 欧美日韩国产天堂| 精品国产在天天线2019| 久久精品亚洲精品国产欧美kt∨| 欧美韩国日本不卡| 中文字幕一区av| 亚洲成人av福利| 久久精品99国产精品日本| 国产精品亚洲第一| 色噜噜狠狠成人中文综合 | 91福利区一区二区三区| 欧美美女一区二区在线观看| 日韩欧美国产成人一区二区| 欧美精彩视频一区二区三区| 亚洲精品精品亚洲| 久久精品国产精品亚洲综合| 国v精品久久久网| 欧美性淫爽ww久久久久无| 欧美白人最猛性xxxxx69交| 国产精品乱子久久久久| 香蕉影视欧美成人| 国产成人av一区二区三区在线| 色婷婷香蕉在线一区二区| 日韩一级片网站| 亚洲欧美一区二区不卡| 日韩福利电影在线观看| 不卡视频一二三| 日韩欧美电影一二三| 亚洲精品视频在线看| 紧缚奴在线一区二区三区| 色成年激情久久综合| 久久久影院官网| 亚洲www啪成人一区二区麻豆| 国产精品18久久久久久久网站| 在线亚洲人成电影网站色www| 精品福利av导航| 午夜精品成人在线视频| 成人精品视频.| 欧美精品一区二区三区在线播放 | 91美女福利视频| 久久久99精品免费观看不卡| 亚洲风情在线资源站| av在线不卡电影| 久久毛片高清国产| 美日韩一区二区| 欧美日韩一区二区三区四区| 亚洲欧洲精品天堂一级 | 久久综合久久综合九色| 午夜久久久久久久久久一区二区| www.欧美亚洲| 久久精品一区二区三区不卡牛牛| 首页国产丝袜综合| 欧美性猛片aaaaaaa做受| 最新高清无码专区| 成人在线一区二区三区| www国产精品av| 精品一区二区三区视频| 91精品国产综合久久精品| 亚洲va在线va天堂| 在线观看亚洲精品| 亚洲自拍偷拍图区| 色婷婷综合在线| 最新中文字幕一区二区三区| 丁香另类激情小说| 久久精品视频在线看| 国内精品伊人久久久久影院对白| 日韩一级欧美一级| 国产一区中文字幕| 2020国产精品| 国产高清不卡二三区| 国产女同互慰高潮91漫画|