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

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

?? vlc.c

?? 此code含H.264解碼需要的 lib和 src
?? C
?? 第 1 頁 / 共 3 頁
字號:

/*!
 ************************************************************************
 * \file vlc.c
 *
 * \brief
 *    VLC support functions
 *
 * \author
 *    Main contributors (see contributors.h for copyright, address and affiliation details)
 *    - Inge Lille-Lang鴜               <inge.lille-langoy@telenor.com>
 *    - Detlev Marpe                    <marpe@hhi.de>
 *    - Gabi Blaettermann
 ************************************************************************
 */
//#include "contributors.h"

#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <assert.h>

#include "global.h"
#include "vlc.h"
#include "elements.h"


// A little trick to avoid those horrible #if TRACE all over the source code
#if TRACE
#define SYMTRACESTRING(s) strncpy(symbol.tracestring,s,TRACESTRING_SIZE)
#else
#define SYMTRACESTRING(s) // do nothing
#endif

extern void tracebits(const char *trace_str,  int len,  int info,int value1);


int UsedBits;      // for internal statistics, is adjusted by se_v, ue_v, u_1

// Note that all NA values are filled with 0

//! for the linfo_levrun_inter routine
const byte NTAB1[4][8][2] =
{
  {{1,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}},
  {{1,1},{1,2},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}},
  {{2,0},{1,3},{1,4},{1,5},{0,0},{0,0},{0,0},{0,0}},
  {{3,0},{2,1},{2,2},{1,6},{1,7},{1,8},{1,9},{4,0}},
};
const byte LEVRUN1[16]=
{
  4,2,2,1,1,1,1,1,1,1,0,0,0,0,0,0,
};


const byte NTAB2[4][8][2] =
{
  {{1,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}},
  {{1,1},{2,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}},
  {{1,2},{3,0},{4,0},{5,0},{0,0},{0,0},{0,0},{0,0}},
  {{1,3},{1,4},{2,1},{3,1},{6,0},{7,0},{8,0},{9,0}},
};

//! for the linfo_levrun__c2x2 routine
const byte LEVRUN3[4] =
{
  2,1,0,0
};
const byte NTAB3[2][2][2] =
{
  {{1,0},{0,0}},
  {{2,0},{1,1}},
};

/*!
 *************************************************************************************
 * \brief
 *    ue_v, reads an ue(v) syntax element, the length in bits is stored in
 *    the global UsedBits variable
 *
 * \param tracestring
 *    the string for the trace file
 *
 * \param bitstream
 *    the stream to be read from
 *
 * \return
 *    the value of the coded syntax element
 *
 *************************************************************************************
 */
int ue_v (char *tracestring, Bitstream *bitstream)
{
  SyntaxElement symbol;

  assert (bitstream->streamBuffer != NULL);
  symbol.type = SE_HEADER;
  symbol.mapping = linfo_ue;   // Mapping rule
  SYMTRACESTRING(tracestring);
  readSyntaxElement_VLC (&symbol, bitstream);
  UsedBits+=symbol.len;
  return symbol.value1;
}


/*!
 *************************************************************************************
 * \brief
 *    ue_v, reads an se(v) syntax element, the length in bits is stored in
 *    the global UsedBits variable
 *
 * \param tracestring
 *    the string for the trace file
 *
 * \param bitstream
 *    the stream to be read from
 *
 * \return
 *    the value of the coded syntax element
 *
 *************************************************************************************
 */
int se_v (char *tracestring, Bitstream *bitstream)
{
  SyntaxElement symbol;

  assert (bitstream->streamBuffer != NULL);
  symbol.type = SE_HEADER;
  symbol.mapping = linfo_se;   // Mapping rule: signed integer
  SYMTRACESTRING(tracestring);
  readSyntaxElement_VLC (&symbol, bitstream);
  UsedBits+=symbol.len;
  return symbol.value1;
}


/*!
 *************************************************************************************
 * \brief
 *    ue_v, reads an u(v) syntax element, the length in bits is stored in
 *    the global UsedBits variable
 *
 * \param LenInBits
 *    length of the syntax element
 *
 * \param tracestring
 *    the string for the trace file
 *
 * \param bitstream
 *    the stream to be read from
 *
 * \return
 *    the value of the coded syntax element
 *
 *************************************************************************************
 */
int u_v (int LenInBits, char*tracestring, Bitstream *bitstream)
{
  SyntaxElement symbol;
  symbol.inf = 0;

  assert (bitstream->streamBuffer != NULL);
  symbol.type = SE_HEADER;
  symbol.mapping = linfo_ue;   // Mapping rule
  symbol.len = LenInBits;
  SYMTRACESTRING(tracestring);
  readSyntaxElement_FLC (&symbol, bitstream);
  UsedBits+=symbol.len;
  return symbol.inf;
}

/*!
 *************************************************************************************
 * \brief
 *    i_v, reads an i(v) syntax element, the length in bits is stored in
 *    the global UsedBits variable
 *
 * \param LenInBits
 *    length of the syntax element
 *
 * \param tracestring
 *    the string for the trace file
 *
 * \param bitstream
 *    the stream to be read from
 *
 * \return
 *    the value of the coded syntax element
 *
 *************************************************************************************
 */
int i_v (int LenInBits, char*tracestring, Bitstream *bitstream)
{
  SyntaxElement symbol;

  symbol.inf = 0;

  assert (bitstream->streamBuffer != NULL);
  symbol.type = SE_HEADER;
  symbol.mapping = linfo_ue;   // Mapping rule
  symbol.len = LenInBits;
  SYMTRACESTRING(tracestring);
  readSyntaxElement_FLC (&symbol, bitstream);
  UsedBits+=symbol.len;

  // can be negative
  symbol.inf = -( symbol.inf & (1 << (LenInBits - 1)) ) | symbol.inf;

  return symbol.inf;
}


/*!
 *************************************************************************************
 * \brief
 *    ue_v, reads an u(1) syntax element, the length in bits is stored in
 *    the global UsedBits variable
 *
 * \param tracestring
 *    the string for the trace file
 *
 * \param bitstream
 *    the stream to be read from
 *
 * \return
 *    the value of the coded syntax element
 *
 *************************************************************************************
 */
Boolean u_1 (char *tracestring, Bitstream *bitstream)
{
  return (Boolean) u_v (1, tracestring, bitstream);
}



/*!
 ************************************************************************
 * \brief
 *    mapping rule for ue(v) syntax elements
 * \par Input:
 *    lenght and info
 * \par Output:
 *    number in the code table
 ************************************************************************
 */
void linfo_ue(int len, int info, int *value1, int *dummy)
{
  assert ((len >> 1) < 32);
  *value1 = (1 << (len >> 1)) + info - 1;
}

/*!
 ************************************************************************
 * \brief
 *    mapping rule for se(v) syntax elements
 * \par Input:
 *    lenght and info
 * \par Output:
 *    signed mvd
 ************************************************************************
 */
void linfo_se(int len,  int info, int *value1, int *dummy)
{
  int n;
  assert ((len >> 1) < 32);
  n = (1 << (len >> 1)) + info - 1;
  *value1 = (n + 1) >> 1;
  if((n & 0x01) == 0)                           // lsb is signed bit
    *value1 = -*value1;
}


/*!
 ************************************************************************
 * \par Input:
 *    length and info
 * \par Output:
 *    cbp (intra)
 ************************************************************************
 */
//void linfo_cbp_intra(int len,int info,int *cbp, int *dummy)
//{
//  extern const byte NCBP[2][48][2];
//  int cbp_idx;
//
//  linfo_ue(len, info, &cbp_idx, dummy);
//  *cbp = NCBP[active_sps->chroma_format_idc ? 1 : 0][cbp_idx][0];
//}

/*!
 ************************************************************************
 * \par Input:
 *    length and info
 * \par Output:
 *    cbp (inter)
 ************************************************************************
 */
//void linfo_cbp_inter(int len,int info,int *cbp, int *dummy)
//{
//  extern const byte NCBP[2][48][2];
//  int cbp_idx;
//
//  linfo_ue(len, info, &cbp_idx, dummy);
//  *cbp = NCBP[active_sps->chroma_format_idc ? 1 : 0][cbp_idx][1];
//}

/*!
 ************************************************************************
 * \par Input:
 *    length and info
 * \par Output:
 *    level, run
 ************************************************************************
 */
//void linfo_levrun_inter(int len, int info, int *level, int *irun)
//{
//  int l2;
//  int inf;
//  assert (((len>>1)-5)<32);
//  if (len<=9)
//  {
//    l2     = imax(0,(len >> 1)-1);
//    inf    = info >> 1;
//    *level = NTAB1[l2][inf][0];
//    *irun  = NTAB1[l2][inf][1];
//    if ((info & 0x01) == 1)
//      *level = -*level;                   // make sign
//  }
//  else                                  // if len > 9, skip using the array
//  {
//    *irun  = (info & 0x1e) >> 1;
//    *level = LEVRUN1[*irun] + (info >> 5) + ( 1 << ((len >> 1) - 5));
//    if ((info & 0x01) == 1)
//      *level = -*level;
//  }
//  if (len == 1) // EOB
//    *level = 0;
//}


/*!
 ************************************************************************
 * \par Input:
 *    length and info
 * \par Output:
 *    level, run
 ************************************************************************
 */
//void linfo_levrun_c2x2(int len, int info, int *level, int *irun)
//{
//  int l2;
//  int inf;
//
//  if (len<=5)
//  {
//    l2     = imax(0, (len >> 1) - 1);
//    inf    = info >> 1;
//    *level = NTAB3[l2][inf][0];
//    *irun  = NTAB3[l2][inf][1];
//    if ((info & 0x01) == 1)
//      *level = -*level;                 // make sign
//  }
//  else                                  // if len > 5, skip using the array
//  {
//    *irun  = (info & 0x06) >> 1;
//    *level = LEVRUN3[*irun] + (info >> 3) + (1 << ((len >> 1) - 3));
//    if ((info & 0x01) == 1)
//      *level = -*level;
//  }
//  if (len == 1) // EOB
//    *level = 0;
//}

/*!
 ************************************************************************
 * \brief
 *    read next UVLC codeword from UVLC-partition and
 *    map it to the corresponding syntax element
 ************************************************************************
 */
int readSyntaxElement_VLC(SyntaxElement *sym, Bitstream *currStream)
{
  int frame_bitoffset        = currStream->frame_bitoffset;
  int BitstreamLengthInBytes = currStream->bitstream_length;
  byte *buf                  = currStream->streamBuffer;

  sym->len =  GetVLCSymbol (buf, frame_bitoffset, &(sym->inf), BitstreamLengthInBytes);
  if (sym->len == -1)
    return -1;
  currStream->frame_bitoffset += sym->len;
  sym->mapping(sym->len,sym->inf,&(sym->value1),&(sym->value2));

#if TRACE
  tracebits(sym->tracestring, sym->len, sym->inf, sym->value1);
#endif

  return 1;
}


/*!
 ************************************************************************
 * \brief
 *    read next UVLC codeword from UVLC-partition and
 *    map it to the corresponding syntax element
 ************************************************************************
 */
//int readSyntaxElement_UVLC(SyntaxElement *sym, struct img_par *img, struct datapartition *dP)
//{
//  return (readSyntaxElement_VLC(sym, dP->bitstream));
//}

/*!
 ************************************************************************
 * \brief
 *    read next VLC codeword for 4x4 Intra Prediction Mode and
 *    map it to the corresponding Intra Prediction Direction
 ************************************************************************
 */
//int readSyntaxElement_Intra4x4PredictionMode(SyntaxElement *sym, struct img_par *img,struct datapartition *dP)
//{
//  Bitstream   *currStream            = dP->bitstream;
//  int         frame_bitoffset        = currStream->frame_bitoffset;
//  int         BitstreamLengthInBytes = currStream->bitstream_length;
//  byte        *buf                   = currStream->streamBuffer;
//
//  sym->len = GetVLCSymbol_IntraMode (buf, frame_bitoffset, &(sym->inf), BitstreamLengthInBytes);
//
//  if (sym->len == -1)
//    return -1;
//
//  currStream->frame_bitoffset += sym->len;
//  sym->value1                  = sym->len == 1 ? -1 : sym->inf;
//
//#if TRACE
//  tracebits2(sym->tracestring, sym->len, sym->value1);
//#endif
//
//  return 1;
//}

//int GetVLCSymbol_IntraMode (byte buffer[],int totbitoffset,int *info, int bytecount)
//{
//
//  register int inf;
//  long byteoffset = (totbitoffset >> 3);        // byte from start of buffer
//  int bitoffset   = (7 - (totbitoffset & 0x07)); // bit from start of byte
//  byte *cur_byte  = &(buffer[byteoffset]);
//  int ctr_bit     = (*cur_byte & (0x01 << bitoffset));      // control bit for current bit posision
//  int bitcounter  = 1;
//  int len         = 0;
//
//  //First bit
//  if (ctr_bit)
//  {
//    *info = 0;
//    return bitcounter;
//  }
//  else
//    len = 3;
//
//  if (byteoffset + ((len + 7) >> 3) > bytecount)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本道免费精品一区二区三区| 日本精品一区二区三区高清| 亚洲成人1区2区| 亚洲bt欧美bt精品777| 亚洲国产精品久久一线不卡| 日韩精品五月天| 激情成人综合网| yourporn久久国产精品| 日本伦理一区二区| 日韩一级免费观看| 中文字幕欧美三区| 亚洲一区二区在线免费看| 无码av中文一区二区三区桃花岛| 久久国产日韩欧美精品| 成人高清伦理免费影院在线观看| 欧洲生活片亚洲生活在线观看| 8x8x8国产精品| 中文字幕免费一区| 亚洲一区二区视频在线观看| 久久成人综合网| 一本色道久久加勒比精品| 欧美成人三级在线| 亚洲蜜臀av乱码久久精品| 久久99精品国产麻豆婷婷洗澡| 成人夜色视频网站在线观看| 欧美日韩在线播放三区| 91.麻豆视频| 亚洲欧美福利一区二区| 韩国女主播一区| 欧美日韩一本到| 中文字幕中文字幕在线一区| 男人的j进女人的j一区| 成人av资源下载| 精品国产一区二区亚洲人成毛片 | 亚洲日本丝袜连裤袜办公室| 国产二区国产一区在线观看| 欧美三级在线看| 国产精品国产三级国产aⅴ入口 | 99国产精品久久久久| 日韩欧美123| 日本欧美久久久久免费播放网| 日本道在线观看一区二区| 亚洲美女少妇撒尿| 日本韩国欧美三级| 亚洲成人激情社区| 在线不卡中文字幕| 日韩av二区在线播放| 欧美一区二区精品在线| 麻豆精品一区二区三区| 久久综合色播五月| 国产v日产∨综合v精品视频| 国产精品家庭影院| 在线免费不卡电影| 午夜精品久久久久| 日韩精品一区二区三区视频| 久久99精品久久久久久国产越南| 国产色婷婷亚洲99精品小说| 成人美女在线观看| 亚洲一区二区三区四区在线观看| 欧美婷婷六月丁香综合色| 午夜欧美视频在线观看| 精品国产乱码久久| 99精品视频在线免费观看| 亚洲一区二区视频在线| 欧美电影免费观看高清完整版在线观看| 黄色资源网久久资源365| 国产精品色眯眯| 欧美日韩国产综合视频在线观看| 日韩av一区二区三区| 国产视频亚洲色图| 在线看日本不卡| 麻豆视频观看网址久久| 国产精品久久久久久久第一福利 | 高清在线观看日韩| 一区二区三区精品在线| 日韩欧美一级二级| 99riav久久精品riav| 日韩电影在线看| 国产精品久久夜| 91精品欧美福利在线观看| 成人午夜私人影院| 日韩精品一二三区| 亚洲天堂2014| 精品噜噜噜噜久久久久久久久试看| av在线这里只有精品| 蜜臀av一区二区| 一区二区三区影院| 国产日韩欧美麻豆| 777亚洲妇女| 色先锋aa成人| 国产精品夜夜爽| 日韩激情视频在线观看| 亚洲日本成人在线观看| 久久先锋影音av| 在线电影欧美成精品| 色综合久久综合| 国产激情一区二区三区| 日韩av网站在线观看| 亚洲永久免费av| 中文字幕日本不卡| 国产日韩欧美一区二区三区乱码| 日韩天堂在线观看| 欧美精品在线观看播放| 色欧美乱欧美15图片| av一二三不卡影片| 国产精品123| 韩国午夜理伦三级不卡影院| 免费欧美在线视频| 午夜精品福利久久久| 亚洲小说欧美激情另类| 亚洲日本在线观看| 亚洲欧美偷拍另类a∨色屁股| 精品成人一区二区| ww亚洲ww在线观看国产| 日韩欧美在线观看一区二区三区| 欧美在线视频你懂得| 色香色香欲天天天影视综合网| 成人午夜视频免费看| 国产a精品视频| 国产精品综合网| 国产成人精品免费一区二区| 国产一区二区伦理| 国产精品一区二区三区乱码| 极品少妇一区二区三区精品视频 | 欧美日韩成人综合| 在线精品国精品国产尤物884a| 日本黄色一区二区| 欧美主播一区二区三区美女| 91久久久免费一区二区| 欧美午夜不卡在线观看免费| 欧美午夜寂寞影院| 日韩欧美一二三| 久久综合久久鬼色中文字| 国产午夜精品久久久久久免费视| 久久久99免费| 亚洲日本一区二区三区| 亚洲成人一区在线| 毛片不卡一区二区| 国产盗摄视频一区二区三区| 在线视频欧美精品| 8v天堂国产在线一区二区| 日韩午夜小视频| 国产欧美日韩中文久久| √…a在线天堂一区| 亚洲激情图片一区| 蜜臀精品一区二区三区在线观看 | 国产午夜精品理论片a级大结局| 亚洲国产精品av| 亚洲一区二区三区激情| 视频在线观看一区二区三区| 蜜桃视频一区二区| 国产99久久久久| 色美美综合视频| 日韩免费高清视频| 中文字幕一区不卡| 亚洲成人免费影院| 国产福利一区二区三区视频在线 | 国产精品美女视频| 亚洲丰满少妇videoshd| 久久精品国产澳门| 成人av综合在线| 欧美高清视频在线高清观看mv色露露十八 | 亚洲自拍偷拍欧美| 看片的网站亚洲| 91香蕉视频污在线| 日韩小视频在线观看专区| 国产精品福利在线播放| 裸体在线国模精品偷拍| 色狠狠色噜噜噜综合网| 欧美不卡一区二区三区| 一区二区三区在线视频播放| 国产精品一区二区久久不卡 | 国产69精品久久久久毛片| 欧美日韩精品一二三区| 国产精品蜜臀在线观看| 奇米一区二区三区| 色婷婷av一区二区三区软件 | 国产亚洲女人久久久久毛片| 亚洲1区2区3区4区| 99视频热这里只有精品免费| 久久久精品国产免大香伊 | 精品一区二区免费在线观看| 在线观看三级视频欧美| 国产日韩精品视频一区| 日韩av不卡在线观看| 日本高清不卡视频| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 国产电影精品久久禁18| 日韩一区二区免费在线观看| 亚洲国产日韩一级| 99久久伊人久久99| 国产欧美一区二区在线观看| 另类人妖一区二区av| 欧美日韩免费在线视频| 一区二区三区在线观看国产| 成人午夜av影视| 国产午夜亚洲精品羞羞网站| 美女网站一区二区| 日韩精品在线看片z| 日韩高清在线一区|