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

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

?? header.c

?? 網絡MPEG4IP流媒體開發源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/************************************************************************* COPYRIGHT AND WARRANTY INFORMATION** Copyright 2001, International Telecommunications Union, Geneva** DISCLAIMER OF WARRANTY** These software programs are available to the user without any* license fee or royalty on an "as is" basis. The ITU disclaims* any and all warranties, whether express, implied, or* statutory, including any implied warranties of merchantability* or of fitness for a particular purpose.  In no event shall the* contributor or the ITU be liable for any incidental, punitive, or* consequential damages of any kind whatsoever arising from the* use of these programs.** This disclaimer of warranty extends to the user of these programs* and user's customers, employees, agents, transferees, successors,* and assigns.** The ITU does not represent or warrant that the programs furnished* hereunder are free of infringement of any third-party patents.* Commercial implementations of ITU-T Recommendations, including* shareware, may be subject to royalty fees to patent holders.* Information regarding the ITU-T patent policy is available from* the ITU Web site at http://www.itu.int.** THIS IS NOT A GRANT OF PATENT RIGHTS - SEE THE ITU-T PATENT POLICY.*************************************************************************//*! ************************************************************************************* * \file header.c * * \brief *    H.26L Slice, Picture, and Sequence headers * * \author *    Main contributors (see contributors.h for copyright, address and affiliation details) *      - Stephan Wenger                  <stewe@cs.tu-berlin.de> ************************************************************************************* */#include <math.h>#include <assert.h>#include <string.h>#include <stdlib.h>#include "elements.h"#include "header.h"#include "rtp.h"// A little trick to avoid those horrible #if TRACE all over the source code#if TRACE#define SYMTRACESTRING(s) strncpy(sym.tracestring,s,TRACESTRING_SIZE)#else#define SYMTRACESTRING(s) // to nothing#endif// Local Functionsstatic int PutSliceStartCode(Bitstream *s);static int PutPictureStartCode (Bitstream *s);static int PutStartCode (int Type, Bitstream *s, char *ts);// End local Functionsint PictureHeader(){// StW: PictureTypeSymbol is the Symbol used to encode the picture type.// This is one of the dirtiest hacks if have seen so far from people who// usually know what they are doing :-)// img->type has one of three possible values (I, P, B), the picture type as coded// distiguishes further by indicating whether one or more reference frames are// used for P and B frames (hence 5 values).  See decoder/defines.h// The mapping is performed in image.c select_picture_type()  int dP_nr = assignSE2partition[input->partition_mode][SE_HEADER];  Bitstream *currStream = ((img->currentSlice)->partArr[dP_nr]).bitstream;  DataPartition *partition = &((img->currentSlice)->partArr[dP_nr]);  SyntaxElement sym;  int len = 0;  sym.type = SE_HEADER;       // This will be true for all symbols generated here  sym.mapping = n_linfo2;       // Mapping rule: Simple code number to len/info  // Ok.  We are sure we want to code a Picture Header.  So, first: Put PSC  len+=PutPictureStartCode (currStream);  // Now, take care of te UVLC coded data structure described in VCEG-M79  sym.value1 = 0;               // TRType = 0  SYMTRACESTRING("PH TemporalReferenceType");  len += writeSyntaxElement_UVLC (&sym, partition);  sym.value1 = img->tr%256;         // TR, variable length  SYMTRACESTRING("PH TemporalReference");  len += writeSyntaxElement_UVLC (&sym, partition);  // Size information.  If the picture is Intra, then transmit the size in MBs,  // For all other picture type just indicate that it didn't change.  // Note: this is currently the prudent way to do things, because we do not  // have anything similar to Annex P of H.263.  However, we should anticipate  // taht one day we may want to have an Annex P type functionality.  Hence, it is  // unwise to assume that P pictures will never have a size indiciation.  So the  // one bit for an "unchanged" inidication is well spent.  if (img->type == INTRA_IMG)  {    // Double check that width and height are divisible by 16    assert (img->width  % 16 == 0);    assert (img->height % 16 == 0);    sym.value1 = 1;             // SizeType = Width/Height in MBs    SYMTRACESTRING("PH FullSizeInformation");    len += writeSyntaxElement_UVLC (&sym, partition);    sym.value1 = img->width / 16;    SYMTRACESTRING("PH FullSize-X");    len += writeSyntaxElement_UVLC (&sym, partition);    sym.value1 = img->height / 16;    SYMTRACESTRING("PH FullSize-Y");    len += writeSyntaxElement_UVLC (&sym, partition);  } else  {    // Not an intra frame -> write "unchanged"    sym.value1 = 0;             // SizeType = Unchanged    SYMTRACESTRING("PHSizeUnchanged");    len += writeSyntaxElement_UVLC (&sym, partition);  }  select_picture_type (&sym);  SYMTRACESTRING("Hacked Picture Type Symbol");  len+= writeSyntaxElement_UVLC (&sym, partition);  // Finally, write Reference Picture ID   // WYK: Oct. 16, 2001. Now I use this for the reference frame ID (non-B frame ID).   // If current frame is a B-frame, it will not change; otherwise it is increased by 1 based  // on refPicID of the previous frame. Thus, the decoder can know how many  non-B   // frames are lost, and then can adjust the reference frame buffers correctly.  if (1)  {    sym.value1 = img->refPicID%16;         // refPicID, variable length    SYMTRACESTRING("PHRefPicID");    len += writeSyntaxElement_UVLC (&sym, partition);  }  return len;}int SliceHeader(int UseStartCode){  int dP_nr = assignSE2partition[input->partition_mode][SE_HEADER];  Bitstream *currStream = ((img->currentSlice)->partArr[dP_nr]).bitstream;  DataPartition *partition = &((img->currentSlice)->partArr[dP_nr]);  SyntaxElement sym;  int len = 0;  int Quant = img->qp;          // Hack.  This should be a parameter as soon as Gisle is done  int MBPosition = img->current_mb_nr;  // Hack.  This should be a paremeter as well.  sym.type = SE_HEADER;       // This will be true for all symbols generated here  sym.mapping = n_linfo2;       // Mapping rule: Simple code number to len/info  // Note 1.  Current implementation: Slice start code is similar to pictrure start code  // (info is 1 for slice and 0 for picture start code).  Slice Start code is not  // present except when generating an UVLC file.  Start codes are typical NAL  // functionality, and hence NALs will take care the issue in the future.  // Note 2:  Traditionally, the QP is a bit mask.  However, at numerically large QPs  // we usually have high compression and don't want to waste bits, whereas  // at low QPs this is not as much an issue.  Hence, the QUANT parameter  // is coded as a UVLC calculated as 31 - QUANT.  That is, the UVLC representation  // of 31-QUANT is coded, instead of QUANT.  // Note 3:  In addition to the fields in VCEG-M79 there is one additional header field  // with the MV resolution.  Currently defined values:  // 0 == 1/4th pel resolution (old default)  // 1 == 1/8th pel resolution  // ... could be enhanced straightforward, it may make sense to define  // 2 == 1/2 pel resolution  // 3 == full pel resolution  if (UseStartCode)  {    // Input mode 0, File Format, and not Picture Start (first slice in picture)    // This is the only case where a slice start code makes sense    //    // Putting a Slice Start Code is the same like the picture start code.  It's    // n ot as straightforward as one thinks,  See remarks above.    len += PutSliceStartCode(currStream);  };  // Now we have coded the Pciture header when appropriate, and the slice header when  // appropriate.  Follow with the content of the slice header: GOB address of the slice  // start and (initial) QP.  For the QP see remarks above.  For the GOB address, use  // straigtforward procedure.  Note that this allows slices to start at MB addresses  // up to 2^15 MBs due ot start code emulation problems.  This should be enough for  // most practical applications,. but probably not for cinema.  Has to be discussed.  // For the MPEG tests this is irrelevant, because there the rule will be one silce--  // one picture.  // Put MB-Adresse  assert (MBPosition < (1<<15));  SYMTRACESTRING("SH FirstMBInSlice");  sym.value1 = MBPosition;  len += writeSyntaxElement_UVLC (&sym, partition);  // Put Quant.  It's a bit irrationale that we still put the same quant here, but it's  // a good provision for the future.  In real-world applications slices typically  // start with Intra information, and Intra MBs will likely use a different quant  // than Inter  SYMTRACESTRING("SH SliceQuant");  sym.value1 = 31 - Quant;  len += writeSyntaxElement_UVLC (&sym, partition);  if (img->types==SP_IMG)  {    SYMTRACESTRING("SH SP SliceQuant");    sym.value1 = 31 - img->qpsp;    len += writeSyntaxElement_UVLC (&sym, partition);  }  // Put the Motion Vector resolution as per reflector consensus  SYMTRACESTRING("SH MVResolution");  sym.value1 = input->mv_res;  len += writeSyntaxElement_UVLC (&sym, partition);  return len;}int SequenceHeader (FILE *outf){  int LenInBytes = 0;  int HeaderInfo;         // Binary coded Headerinfo to be written in file  int ProfileLevelVersionHash;  // Handle the RTP case  if (input->of_mode == PAR_OF_RTP)  {    if ((LenInBytes = RTPSequenceHeader (outf)) < 0)    {      snprintf (errortext, ET_SIZE, "SequenceHeaqder(): Problems writing the RTP Parameter Packet");      error (errortext, 600);      return -1;    }    else      return LenInBytes*8;  }  // Non RTP-type file formats follow  switch (input->SequenceHeaderType)  {  case 0:    // No SequenceHeader, do nothing

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99精品久久久久婷婷| 色88888久久久久久影院按摩 | 日本欧美久久久久免费播放网| 石原莉奈一区二区三区在线观看| 国产不卡一区视频| 国产精品久久久久一区二区三区共| 日韩福利电影在线观看| 日韩美女一区二区三区四区| 麻豆91免费观看| 久久九九久精品国产免费直播| 日韩中文欧美在线| 欧美电影精品一区二区| 天天综合网 天天综合色| 99久久国产免费看| 亚洲国产精品一区二区www在线 | 精品嫩草影院久久| 亚洲国产精品久久不卡毛片 | 国产一区二区三区日韩| 欧美一区二区三区在线观看| 国产精品原创巨作av| 亚洲国产岛国毛片在线| 91老师片黄在线观看| 亚洲妇熟xx妇色黄| 91国偷自产一区二区三区观看| 国产精品久久久久四虎| 欧美视频在线一区二区三区| 激情综合亚洲精品| 亚洲三级在线免费观看| 欧美一卡二卡在线| 成人av资源站| 麻豆国产一区二区| 亚洲免费av网站| 精品国产第一区二区三区观看体验| 免费在线一区观看| 椎名由奈av一区二区三区| 欧美一区二区三级| 91亚洲精华国产精华精华液| 亚洲日本中文字幕区| 日韩视频123| 色欧美88888久久久久久影院| 最新不卡av在线| 91麻豆蜜桃一区二区三区| 国产精品午夜在线观看| 日韩欧美一二三四区| 91麻豆.com| 国产精品88888| 日本网站在线观看一区二区三区| 欧美电视剧免费观看| 欧美中文字幕久久| a美女胸又www黄视频久久| 久久精品二区亚洲w码| 午夜精品在线看| 亚洲日本一区二区三区| 国产欧美一区二区三区鸳鸯浴 | 亚洲高清中文字幕| 国产精品久久久久久妇女6080 | 亚洲美女偷拍久久| 久久精品在这里| 日韩视频一区在线观看| 欧美日韩国产美| 国产在线看一区| 日本不卡一区二区三区高清视频| 精品粉嫩aⅴ一区二区三区四区| 国产99久久久精品| 亚洲黄色在线视频| 欧美一个色资源| 91精品国产一区二区三区蜜臀 | 亚洲欧洲日韩综合一区二区| 久久综合久色欧美综合狠狠| 日韩精品中文字幕在线不卡尤物| 波多野结衣在线一区| 粉嫩av一区二区三区| 一区二区欧美国产| 久久综合九色欧美综合狠狠| 精品三级在线看| 精品va天堂亚洲国产| 日韩欧美中文字幕公布| 欧美不卡在线视频| 欧美大片日本大片免费观看| 欧美大片在线观看一区| 精品国产乱码久久| 欧美系列一区二区| 欧美美女bb生活片| 大美女一区二区三区| 丁香网亚洲国际| 日本精品一区二区三区高清 | 欧美一区二区三区婷婷月色| 欧美精品一级二级三级| 日韩色视频在线观看| 精品国一区二区三区| 国产免费成人在线视频| 欧美日韩一区精品| 成人av电影在线观看| 91麻豆精东视频| 欧美日韩免费观看一区二区三区| 成人综合日日夜夜| 91精品1区2区| 日韩一区二区电影| 国产日产精品1区| 亚洲男人电影天堂| 日本亚洲最大的色成网站www| 亚洲精品国产无天堂网2021| 久久久综合视频| 7777女厕盗摄久久久| 久久久久久夜精品精品免费| 综合久久一区二区三区| 石原莉奈在线亚洲二区| 国产成人av电影免费在线观看| 美女国产一区二区| 成人午夜电影久久影院| 国产精品一区免费视频| 日本高清不卡视频| 精品欧美乱码久久久久久 | 91美女精品福利| 制服丝袜亚洲色图| 欧美性猛片xxxx免费看久爱| 精品国产三级电影在线观看| 精品欧美乱码久久久久久1区2区| 日韩一区二区精品| 日韩一区在线播放| 国产精品免费久久久久| 五月天精品一区二区三区| 成人小视频在线观看| 4438x亚洲最大成人网| 国产精品乱码一区二区三区软件 | 日韩午夜精品视频| 国产精品色眯眯| 亚洲成人av在线电影| 天使萌一区二区三区免费观看| 丝瓜av网站精品一区二区| 成人丝袜18视频在线观看| 成人爽a毛片一区二区免费| 3d动漫精品啪啪一区二区竹菊| 日韩你懂的电影在线观看| 亚洲另类在线一区| 国产乱国产乱300精品| 欧美二区三区91| 一区二区三区久久| 日韩vs国产vs欧美| 欧美综合一区二区| 日韩一区二区三区高清免费看看| 精品黑人一区二区三区久久| www.色精品| 久久久久久97三级| 免费高清成人在线| 欧美日韩免费观看一区二区三区 | www精品美女久久久tv| 亚洲国产精品久久人人爱蜜臀| 青青草国产成人99久久| 在线免费观看视频一区| 亚洲免费视频成人| aaa国产一区| xnxx国产精品| 国内外成人在线| 精品噜噜噜噜久久久久久久久试看| 欧美高清在线视频| 国产精品亚洲一区二区三区在线 | 精品国产欧美一区二区| 日韩av电影免费观看高清完整版在线观看| 麻豆成人久久精品二区三区小说| 成人午夜视频在线观看| 欧美高清视频www夜色资源网| 9191精品国产综合久久久久久| 精品国产乱码久久久久久蜜臀| 亚洲手机成人高清视频| 99久久久无码国产精品| 中文字幕在线不卡国产视频| 成人av在线看| 中文字幕亚洲综合久久菠萝蜜| 午夜av一区二区| 欧美三级一区二区| 日韩精品一区第一页| 91精品啪在线观看国产60岁| 蜜桃av一区二区| 精品三级在线观看| 国产九色精品成人porny| 国产偷国产偷亚洲高清人白洁| 亚洲成在线观看| 91麻豆精品国产综合久久久久久| 国产精品毛片无遮挡高清| 日本aⅴ亚洲精品中文乱码| 日韩一级黄色大片| 国产电影一区在线| 国产精品久久久久一区二区三区 | 国产乱子伦视频一区二区三区| 欧美伊人久久久久久久久影院 | 久久综合色8888| 亚洲成人一区二区在线观看| 成人性色生活片| 有码一区二区三区| 波多野结衣中文字幕一区| 久久综合九色综合97_久久久| 日韩成人一区二区| 国产亚洲精品免费| av中文字幕不卡| 国产精品毛片久久久久久| 欧洲色大大久久| 久久99国产乱子伦精品免费| 国产精品乱人伦中文| 欧美精选一区二区|