91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 581KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-22
  • 語言: 其他
  • 標(biāo)簽:

資源簡介

標(biāo)準(zhǔn)的視頻編解碼器模型,可用于視頻編解碼的學(xué)習(xí)研究。

資源截圖

代碼片段和文件信息


/*!
?*************************************************************************************
?*?\file?annexb.c
?*
?*?\brief
?*????Annex?B?Byte?Stream?format
?*
?*?\author
?*????Main?contributors?(see?contributors.h?for?copyright?address?and?affiliation?details)
?*??????-?Stephan?Wenger??????????????????
?*************************************************************************************
?*/

#include?
#include?

#include?“global.h“
#include?“annexb.h“
#include?“memalloc.h“


FILE?*bits?=?NULL;????????????????//!static?int?FindStartCode?(unsigned?char?*Buf?int?zeros_in_startcode);

int?IsFirstByteStreamNALU=1;
int?LastAccessUnitExists=0;
int?NALUCount=0;


/*!
?************************************************************************
?*?\brief
?*????Returns?the?size?of?the?NALU?(bits?between?start?codes?in?case?of
?*????Annex?B.??nalu->buf?and?nalu->len?are?filled.??Other?field?in
?*????nalu->?remain?uninitialized?(will?be?taken?care?of?by?NALUtoRBSP.
?*
?*?\return
?*?????0?if?there?is?nothing?any?more?to?read?(EOF)
?*????-1?in?case?of?any?error
?*
?*??\note?Side-effect:?Returns?length?of?start-code?in?bytes.?
?*
?*?\note
?*???GetAnnexbNALU?expects?start?codes?at?byte?aligned?positions?in?the?file
?*
?************************************************************************
?*/

int?GetAnnexbNALU?(NALU_t?*nalu)
{
??int?info2?info3?pos?=?0;
??int?StartCodeFound?rewind;
??char?*Buf;
??int?LeadingZero8BitsCount=0?TrailingZero8Bits=0;
????
??if?((Buf?=?(char*)calloc?(nalu->max_size??sizeof(char)))?==?NULL)?no_mem_exit(“GetAnnexbNALU:?Buf“);

??while(!feof(bits)?&&?(Buf[pos++]=fgetc(bits))==0);
??
??if(feof(bits))
??{
????if(pos==0)
????return?0;
????else
????{
??????printf(?“GetAnnexbNALU?can‘t?read?start?code\n“);
??????free(Buf);
??????return?-1;
????}
??}

??if(Buf[pos-1]!=1)
??{
????printf?(“GetAnnexbNALU:?no?Start?Code?at?the?begin?of?the?NALU?return?-1\n“);
????free(Buf);
????return?-1;
??}

??if(pos<3)
??{
????printf?(“GetAnnexbNALU:?no?Start?Code?at?the?begin?of?the?NALU?return?-1\n“);
????free(Buf);
????return?-1;
??}
??else?if(pos==3)
??{
????nalu->startcodeprefix_len?=?3;
????LeadingZero8BitsCount?=?0;
??}
??else
??{
????LeadingZero8BitsCount?=?pos-4;
????nalu->startcodeprefix_len?=?4;
??}

??//the?1st?byte?stream?NAL?unit?can?has?leading_zero_8bits?but?subsequent?ones?are?not
??//allowed?to?contain?it?since?these?zeros(if?any)?are?considered?trailing_zero_8bits
??//of?the?previous?byte?stream?NAL?unit.
??if(!IsFirstByteStreamNALU?&&?LeadingZero8BitsCount>0)
??{
????printf?(“GetAnnexbNALU:?The?leading_zero_8bits?syntax?can?only?be?present?in?the?first?byte?stream?NAL?unit?return?-1\n“);
????free(Buf);
????return?-1;
??}
??IsFirstByteStreamNALU=0;

??StartCodeFound?=?0;
??info2?=?0;
??info3?=?0;

??while?(!StartCodeFound)
??{
????if?(feof?(bits))
????{
??

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2004-09-16?22:41??JM\bin\
?????文件?????????753??2004-09-16?22:38??JM\bin\decoder.cfg
?????文件???????11222??2004-09-02?12:46??JM\bin\encoder_baseline.cfg
?????文件???????11221??2004-09-02?12:46??JM\bin\encoder_extended.cfg
?????文件???????11221??2004-09-16?22:38??JM\bin\encoder_main.cfg
?????文件??????114048??2001-09-03?13:05??JM\bin\foreman_part_qcif.yuv
?????文件??????????16??2001-12-20?10:42??JM\bin\leakybucketrate.cfg
?????文件??????????66??2004-05-25?15:54??JM\bin\sg0conf.cfg
?????文件?????????126??2004-05-25?15:54??JM\bin\sg2conf.cfg
?????文件????????1188??2004-05-25?15:54??JM\bin\sg6conf.cfg
?????文件???????30821??2004-09-16?18:00??JM\CHANGES.TXT
?????文件????????5002??2004-01-14?15:19??JM\Changes_detail.txt
?????文件????????1383??2003-06-11?20:22??JM\copyright.txt
?????文件????????1069??2001-08-29?13:58??JM\disclaimer.txt
?????目錄???????????0??2004-09-16?22:41??JM\doc\
?????文件???????54272??2001-10-03?00:09??JM\doc\coding_style.doc
?????文件?????????491??2002-11-11?14:10??JM\doc\doxygen.txt
?????文件??????????99??2001-10-03?00:09??JM\doc\foot.html
?????文件????????1410??2001-10-03?00:09??JM\doc\h26l.css
?????文件????????8143??2003-08-12?18:03??JM\doc\ldecod.dox
?????文件????????8142??2003-08-12?18:03??JM\doc\lencod.dox
?????目錄???????????0??2004-09-16?22:41??JM\ldecod\
?????目錄???????????0??2004-09-16?22:41??JM\ldecod\inc\
?????文件?????????648??2004-09-16?17:18??JM\ldecod\inc\annexb.h
?????文件????????1299??2003-05-13?12:58??JM\ldecod\inc\biaridecod.h
?????文件?????????677??2003-05-13?12:58??JM\ldecod\inc\block.h
?????文件????????2628??2003-06-10?17:13??JM\ldecod\inc\cabac.h
?????文件?????????598??2003-06-13?18:49??JM\ldecod\inc\context_ini.h
?????文件????????6206??2004-07-06?16:41??JM\ldecod\inc\contributors.h
?????文件???????46271??2003-12-01?12:38??JM\ldecod\inc\ctx_tables.h
?????文件????????4211??2004-09-16?22:38??JM\ldecod\inc\defines.h
............此處省略146個文件信息

評論

共有 條評論