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

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

?? vlc.c

?? 一個簡單的視頻會議VC++MFC工程文件
?? C
?? 第 1 頁 / 共 3 頁
字號:

/*!
 ***************************************************************************
 * \file vlc.c
 *
 * \brief
 *    (CA)VLC coding functions
 *
 * \author
 *    Main contributors (see contributors.h for copyright, address and affiliation details)
 *    - Inge Lille-Langoy               <inge.lille-langoy@telenor.com>
 *    - Detlev Marpe                    <marpe@hhi.de>
 *    - Stephan Wenger                  <stewe@cs.tu-berlin.de>
 ***************************************************************************
 */

#include "contributors.h"

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

#include "global.h"

#include "vlc.h"

#if TRACE
#define SYMTRACESTRING(s) strncpy(sym.tracestring,s,TRACESTRING_SIZE)
#else
#define SYMTRACESTRING(s) // do nothing
#endif


/*! 
 *************************************************************************************
 * \brief
 *    ue_v, writes an ue(v) syntax element, returns the length in bits
 *
 * \param tracestring
 *    the string for the trace file
 * \param value
 *    the value to be coded
 *  \param part
 *    the Data Partition the value should be coded into
 *
 * \return
 *    Number of bits used by the coded syntax element
 *
 * \ note
 *    This function writes always the bit buffer for the progressive scan flag, and
 *    should not be used (or should be modified appropriately) for the interlace crap
 *    When used in the context of the Parameter Sets, this is obviously not a
 *    problem.
 *
 *************************************************************************************
 */
int ue_v (char *tracestring, int value, DataPartition *part)
{
  SyntaxElement symbol, *sym=&symbol;
  sym->type = SE_HEADER;
  sym->mapping = ue_linfo;               // Mapping rule: unsigned integer
  sym->value1 = value;
  sym->value2 = 0;
#if TRACE
  strncpy(sym->tracestring,tracestring,TRACESTRING_SIZE);
#endif
  assert (part->bitstream->streamBuffer != NULL);
  return writeSyntaxElement_UVLC (sym, part);
}


/*! 
 *************************************************************************************
 * \brief
 *    se_v, writes an se(v) syntax element, returns the length in bits
 *
 * \param tracestring
 *    the string for the trace file
 * \param value
 *    the value to be coded
 *  \param part
 *    the Data Partition the value should be coded into
 *
 * \return
 *    Number of bits used by the coded syntax element
 *
 * \ note
 *    This function writes always the bit buffer for the progressive scan flag, and
 *    should not be used (or should be modified appropriately) for the interlace crap
 *    When used in the context of the Parameter Sets, this is obviously not a
 *    problem.
 *
 *************************************************************************************
 */
int se_v (char *tracestring, int value, DataPartition *part)
{
  SyntaxElement symbol, *sym=&symbol;
  sym->type = SE_HEADER;
  sym->mapping = se_linfo;               // Mapping rule: signed integer
  sym->value1 = value;
  sym->value2 = 0;
#if TRACE
  strncpy(sym->tracestring,tracestring,TRACESTRING_SIZE);
#endif
  assert (part->bitstream->streamBuffer != NULL);
  return writeSyntaxElement_UVLC (sym, part);
}


/*! 
 *************************************************************************************
 * \brief
 *    u_1, writes a flag (u(1) syntax element, returns the length in bits, 
 *    always 1
 *
 * \param tracestring
 *    the string for the trace file
 * \param value
 *    the value to be coded
 *  \param part
 *    the Data Partition the value should be coded into
 *
 * \return
 *    Number of bits used by the coded syntax element (always 1)
 *
 * \ note
 *    This function writes always the bit buffer for the progressive scan flag, and
 *    should not be used (or should be modified appropriately) for the interlace crap
 *    When used in the context of the Parameter Sets, this is obviously not a
 *    problem.
 *
 *************************************************************************************
 */
int u_1 (char *tracestring, int value, DataPartition *part)
{
  SyntaxElement symbol, *sym=&symbol;

  sym->bitpattern = value;
  sym->len = 1;
  sym->type = SE_HEADER;
  sym->value1 = value;
  sym->value2 = 0;
#if TRACE
  strncpy(sym->tracestring,tracestring,TRACESTRING_SIZE);
#endif
  assert (part->bitstream->streamBuffer != NULL);
  return writeSyntaxElement_fixed(sym, part);
}


/*! 
 *************************************************************************************
 * \brief
 *    u_v, writes a n bit fixed length syntax element, returns the length in bits, 
 *
 * \param n
 *    length in bits
 * \param tracestring
 *    the string for the trace file
 * \param value
 *    the value to be coded
 *  \param part
 *    the Data Partition the value should be coded into
 *
 * \return
 *    Number of bits used by the coded syntax element 
 *
 * \ note
 *    This function writes always the bit buffer for the progressive scan flag, and
 *    should not be used (or should be modified appropriately) for the interlace crap
 *    When used in the context of the Parameter Sets, this is obviously not a
 *    problem.
 *
 *************************************************************************************
 */

int u_v (int n, char *tracestring, int value, DataPartition *part)
{
  SyntaxElement symbol, *sym=&symbol;

  sym->bitpattern = value;
  sym->len = n;
  sym->type = SE_HEADER;
  sym->value1 = value;
  sym->value2 = 0;
#if TRACE
  strncpy(sym->tracestring,tracestring,TRACESTRING_SIZE);
#endif
  assert (part->bitstream->streamBuffer != NULL);
  return writeSyntaxElement_fixed(sym, part);
}


/*!
 ************************************************************************
 * \brief
 *    mapping for ue(v) syntax elements
 * \param ue
 *    value to be mapped
 * \param dummy
 *    dummy parameter
 * \param info
 *    returns mapped value
 * \param len
 *    returns mapped value length
 ************************************************************************
 */
void ue_linfo(int ue, int dummy, int *len,int *info)
{
  int i,nn;

  nn=(ue+1)/2;

  for (i=0; i < 16 && nn != 0; i++)
  {
    nn /= 2;
  }
  *len= 2*i + 1;
  *info=ue+1-(int)pow(2,i);
}


/*!
 ************************************************************************
 * \brief
 *    mapping for se(v) syntax elements
 * \param se
 *    value to be mapped
 * \param dummy
 *    dummy parameter
 * \param len
 *    returns mapped value length
 * \param info
 *    returns mapped value
 ************************************************************************
 */
void se_linfo(int se, int dummy, int *len,int *info)
{

  int i,n,sign,nn;

  sign=0;

  if (se <= 0)
  {
    sign=1;
  }
  n=abs(se) << 1;

  /*
  n+1 is the number in the code table.  Based on this we find length and info
  */

  nn=n/2;
  for (i=0; i < 16 && nn != 0; i++)
  {
    nn /= 2;
  }
  *len=i*2 + 1;
  *info=n - (int)pow(2,i) + sign;
}


/*!
 ************************************************************************
 * \par Input:
 *    Number in the code table
 * \par Output:
 *    length and info
 ************************************************************************
 */
void cbp_linfo_intra(int cbp, int dummy, int *len,int *info)
{
  extern const unsigned char NCBP[2][48][2];
  ue_linfo(NCBP[img->yuv_format?1:0][cbp][0], dummy, len, info);
}


/*!
 ************************************************************************
 * \par Input:
 *    Number in the code table
 * \par Output:
 *    length and info
 ************************************************************************
 */
void cbp_linfo_inter(int cbp, int dummy, int *len,int *info)
{
  extern const unsigned char NCBP[2][48][2];
  ue_linfo(NCBP[img->yuv_format?1:0][cbp][1], dummy, len, info);
}


/*!
 ************************************************************************
 * \brief
 *    2x2 transform of chroma DC
 * \par Input:
 *    level and run for coefficients
 * \par Output:
 *    length and info
 * \note
 *    see ITU document for bit assignment
 ************************************************************************
 */
void levrun_linfo_c2x2(int level,int run,int *len,int *info)
{
  const int NTAB[2][2]=
  {
    {1,5},
    {3,0}
  };
  const int LEVRUN[4]=
  {
    2,1,0,0
  };

  int levabs,i,n,sign,nn;

  if (level == 0) //  check if the coefficient sign EOB (level=0)
  {
    *len=1;
    return;
  }
  sign=0;
  if (level <= 0)
  {
    sign=1;
  }
  levabs=abs(level);
  if (levabs <= LEVRUN[run])
  {
    n=NTAB[levabs-1][run]+1;
  }
  else
  {
    n=(levabs-LEVRUN[run])*8 + run*2;
  }

  nn=n/2;

  for (i=0; i < 16 && nn != 0; i++)
  {
    nn /= 2;
  }
  *len= 2*i + 1;
  *info=n-(int)pow(2,i)+sign;
}


/*!
 ************************************************************************
 * \brief
 *    Single scan coefficients
 * \par Input:
 *    level and run for coefficients
 * \par Output:
 *    length and info
 * \note
 *    see ITU document for bit assignment
 ************************************************************************
 */
void levrun_linfo_inter(int level,int run,int *len,int *info)
{
  const byte LEVRUN[16]=
  {
    4,2,2,1,1,1,1,1,1,1,0,0,0,0,0,0
  };
  const byte NTAB[4][10]=
  {
    { 1, 3, 5, 9,11,13,21,23,25,27},
    { 7,17,19, 0, 0, 0, 0, 0, 0, 0},
    {15, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {29, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  };

  int levabs,i,n,sign,nn;

  if (level == 0)           //  check for EOB
  {
    *len=1;
    return;
  }

  if (level <= 0)
    sign=1;
  else
    sign=0;

  levabs=abs(level);
  if (levabs <= LEVRUN[run])
  {
    n=NTAB[levabs-1][run]+1;
  }
  else
  {
    n=(levabs-LEVRUN[run])*32 + run*2;
  }

  nn=n/2;

  for (i=0; i < 16 && nn != 0; i++)
  {
    nn /= 2;
  }
  *len= 2*i + 1;
  *info=n-(int)pow(2,i)+sign;

}


/*!
 ************************************************************************
 * \brief
 *    Double scan coefficients
 * \par Input:
 *    level and run for coefficients
 * \par Output:
 *    length and info
 * \note
 *    see ITU document for bit assignment

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩电影网1区2区| 成人综合在线视频| 狠狠色丁香婷婷综合| 成人激情午夜影院| 欧美一区二区三区免费视频| 日本一区二区不卡视频| 一区二区三区高清| 国产99一区视频免费| 日韩一级免费一区| 亚洲一区在线观看视频| 国产.欧美.日韩| 日韩精品在线网站| 亚洲资源中文字幕| 91欧美一区二区| 欧美激情综合五月色丁香小说| 日韩影院精彩在线| 在线亚洲一区二区| 亚洲欧洲av一区二区三区久久| 久久99精品一区二区三区 | 91精品国产欧美日韩| 亚洲女厕所小便bbb| 国产电影一区二区三区| 欧美xxxxx牲另类人与| 日韩高清一区二区| 欧美喷水一区二区| 香蕉av福利精品导航| 欧美影院午夜播放| 亚洲欧美偷拍三级| 一本一道综合狠狠老| 国产精品高潮呻吟久久| av一区二区久久| 久久精品亚洲精品国产欧美kt∨ | 国产精品久久三| 国产精品中文字幕日韩精品 | 成人sese在线| 欧美激情中文字幕一区二区| 国产老妇另类xxxxx| 国产三级久久久| 国产在线精品一区二区不卡了| 欧美一区二区三区在线看| 日本中文字幕一区二区视频| 欧美精品在线视频| 麻豆91精品视频| 久久一日本道色综合| 国产一区在线不卡| 欧美激情自拍偷拍| 91免费国产在线| 亚洲午夜精品一区二区三区他趣| 欧美专区日韩专区| 婷婷久久综合九色综合绿巨人| 正在播放一区二区| 精品一区二区三区久久| 国产清纯美女被跳蛋高潮一区二区久久w| 国内成人精品2018免费看| 久久精品视频免费观看| 91在线免费播放| 亚洲一区二区三区中文字幕| 欧美男生操女生| 国产成人综合在线播放| 亚洲品质自拍视频网站| 欧美日韩国产首页在线观看| 美女精品自拍一二三四| 日本一区二区三区国色天香| 91麻豆高清视频| 日本va欧美va瓶| 国产农村妇女毛片精品久久麻豆 | 色中色一区二区| 天天色综合天天| 国产亚洲精品久| 一本久道久久综合中文字幕| 日韩精品色哟哟| 国产亚洲精品bt天堂精选| 成人小视频在线| 亚洲成人自拍网| 精品国产乱子伦一区| 一本大道综合伊人精品热热| 免费成人深夜小野草| 国产欧美综合在线| 欧美精品一二三| 国产福利一区二区三区视频在线 | 理论片日本一区| 成人免费视频在线观看| 日韩一区二区免费视频| 成人性生交大片免费看中文网站| 亚洲一级二级三级| 国产精品毛片a∨一区二区三区| 欧美精品在线一区二区三区| 懂色一区二区三区免费观看| 麻豆久久久久久久| 一区二区成人在线视频| 国产网站一区二区| 91精品国产一区二区三区香蕉 | 国产又粗又猛又爽又黄91精品| 亚洲视频一区二区免费在线观看| 欧美变态tickling挠脚心| 欧美午夜片在线看| 不卡av电影在线播放| 极品少妇xxxx精品少妇偷拍| 一区二区三区四区激情| 欧美韩日一区二区三区四区| 在线播放亚洲一区| 色哟哟国产精品免费观看| 成人在线视频一区| 精品一区二区三区免费毛片爱| 亚洲va欧美va人人爽午夜| 国产精品国产三级国产普通话蜜臀| 精品日韩成人av| 666欧美在线视频| 欧美日本一区二区| 在线观看三级视频欧美| 色综合久久久久久久久| 成人免费视频一区二区| 国产成人综合网| 精品影视av免费| 久久成人18免费观看| 奇米一区二区三区| 蜜臀va亚洲va欧美va天堂| 午夜精品久久久久久久久久久| 一区二区三区四区在线免费观看| 中文一区二区完整视频在线观看| 久久久久久久免费视频了| 欧美成人vr18sexvr| 欧美电影免费提供在线观看| 日韩一区二区三区四区五区六区| 欧美一区二区视频在线观看| 5858s免费视频成人| 精品欧美乱码久久久久久| 色视频成人在线观看免| 99久久综合精品| 色伊人久久综合中文字幕| 欧洲一区在线观看| 69堂成人精品免费视频| 日韩一级大片在线| 久久久无码精品亚洲日韩按摩| 久久精品综合网| 亚洲欧美日韩在线不卡| 亚洲国产cao| 狠狠色狠狠色综合| 波多野结衣中文字幕一区| 97aⅴ精品视频一二三区| 欧美性三三影院| 日韩三级av在线播放| 国产日韩在线不卡| 亚洲精品国产a久久久久久| 午夜视频一区在线观看| 日韩国产欧美在线播放| 国产综合色在线| 91日韩一区二区三区| 欧美精品久久久久久久久老牛影院| 欧美一级专区免费大片| 欧美激情一区在线| 五月开心婷婷久久| 国产二区国产一区在线观看| 欧美亚一区二区| 精品国产123| 亚洲欧美激情视频在线观看一区二区三区 | 亚洲欧洲精品一区二区三区| 亚欧色一区w666天堂| 国产精品一区二区无线| 色综合天天综合色综合av| 91精品国产综合久久小美女| 国产精品欧美一区二区三区| 日韩电影免费在线观看网站| 成人永久aaa| 日韩精品一区二区在线| 亚洲自拍偷拍av| 成人做爰69片免费看网站| 欧美一级夜夜爽| 18欧美乱大交hd1984| 精品一区二区三区视频| 欧美视频精品在线| 国产精品久久久久久久裸模| 日韩中文字幕亚洲一区二区va在线| 国产成人精品亚洲午夜麻豆| 91精品一区二区三区久久久久久| 国产欧美一区二区三区鸳鸯浴| 日韩高清不卡一区二区三区| 91最新地址在线播放| 久久综合色鬼综合色| 亚洲电影在线播放| 91免费国产在线观看| 国产三级精品在线| 国产一区二区三区日韩| 欧美一区二区三区人| 亚洲一区av在线| 91久久一区二区| 国产精品久久久久天堂| 懂色中文一区二区在线播放| 欧美成人精品高清在线播放 | 欧美一区二区三区在线观看| 亚洲女子a中天字幕| 成人精品鲁一区一区二区| ww久久中文字幕| 美女在线一区二区| 555www色欧美视频| 视频在线观看91| 91精品国产免费久久综合| 五月综合激情婷婷六月色窝| 欧美性受极品xxxx喷水| 亚洲第四色夜色|