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

  • 大小: 3.59MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-09-21
  • 語言: 其他
  • 標簽: h264??編碼??

資源簡介

h264編碼解碼源代碼!

資源截圖

代碼片段和文件信息


/*!
?*************************************************************************************
?*?\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);


/*!
?************************************************************************
?*?\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;
????
??if?((Buf?=?(char*)calloc?(nalu->max_size??sizeof(char)))?==?NULL)?no_mem_exit(“GetAnnexbNALU:?Buf“);

??nalu->startcodeprefix_len=3;

??info2?=?0;
??info3?=?0;
??
??if?(3?!=?fread?(Buf?1?3?bits))
??{
????free(Buf);
????return?0;
??}

??info2?=?FindStartCode?(Buf?2);
??if(info2?!=?1)?{
????if(1?!=?fread(Buf+3?1?1?bits))
????{
??????free(Buf);
??????return?0;
????}
????info3?=?FindStartCode?(Buf?3);
??}

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

??if(?info2?==?1)?{
????nalu->startcodeprefix_len?=?3;
????pos?=?3;
??}
??else?if(info3?==1?)?{
????pos?=?4;
????nalu->startcodeprefix_len?=?4;
??}
??else
????printf(?“?Panic:?Error?\n“);

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

??while?(!StartCodeFound)
??{
????if?(feof?(bits))
????{
??????nalu->len?=?(pos-1)-nalu->startcodeprefix_len;
??????memcpy?(nalu->buf?&Buf[nalu->startcodeprefix_len]?nalu->len);?????
??????nalu->forbidden_bit?=?(nalu->buf[0]>>7)?&?1;
??????nalu->nal_reference_idc?=?(nalu->buf[0]>>5)?&?3;
??????nalu->nal_unit_type?=?(nalu->buf[0])?&?0x1f;

//?printf?(“GetAnnexbNALU?eof?case:?pos?%d?nalu->len?%d?nalu->reference_idc?%d?nal_unit_type?%d?\n“?pos?nalu->len?nalu->nal_reference_idc?nalu->nal_unit_type);

#if?TRACE
??fprintf?(p_trace?“\n\nLast?NALU?in?File\n\n“);
??fprintf?(p_trace?“Annex?B?NALU?w/?%s?startcode?len?%d?forbidden_bit?%d?nal_reference_idc?%d?nal_unit_

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????643??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\bin\decoder.cfg

?????文件???????9292??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\bin\encoder.cfg

?????文件?????413740??2014-03-10?14:04??h264編碼解碼源代碼\h264編碼解碼源代碼\bin\ldecod.exe

?????文件?????133339??2014-03-10?14:04??h264編碼解碼源代碼\h264編碼解碼源代碼\bin\ldecod.map

?????文件?????730112??2014-03-10?14:04??h264編碼解碼源代碼\h264編碼解碼源代碼\bin\ldecod.pdb

?????文件?????????16??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\bin\leakybucketrate.cfg

?????文件?????606293??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\bin\lencod.exe

?????文件?????236122??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\bin\lencod.map

?????文件?????984064??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\bin\lencod.pdb

?????文件??????20554??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\CHANGES.TXT

?????文件???????1054??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\Changes_detail.txt

?????文件???????1383??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\copyright.txt

?????文件????????276??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\data.txt

?????文件???????1069??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\disclaimer.txt

?????文件??????54272??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\doc\coding_style.doc

?????文件????????491??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\doc\doxygen.txt

?????文件?????????99??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\doc\foot.html

?????文件???????1410??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\doc\h26l.css

?????文件???????7934??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\doc\ldecod.dox

?????文件???????7933??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\doc\lencod.dox

?????文件???????9292??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\encoder.cfg

?????文件?????114048??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\foreman_part_qcif.yuv

?????文件???????7279??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\ldecod\Debug\annexb.obj

?????文件??????????0??2014-03-10?13:34??h264編碼解碼源代碼\h264編碼解碼源代碼\ldecod\Debug\annexb.sbr

?????文件???????9108??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\ldecod\Debug\biaridecod.obj

?????文件??????????0??2014-03-10?13:34??h264編碼解碼源代碼\h264編碼解碼源代碼\ldecod\Debug\biaridecod.sbr

?????文件??????34175??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\ldecod\Debug\block.obj

?????文件??????????0??2014-03-10?13:34??h264編碼解碼源代碼\h264編碼解碼源代碼\ldecod\Debug\block.sbr

?????文件??????38471??2014-03-10?13:14??h264編碼解碼源代碼\h264編碼解碼源代碼\ldecod\Debug\cabac.obj

?????文件??????????0??2014-03-10?13:34??h264編碼解碼源代碼\h264編碼解碼源代碼\ldecod\Debug\cabac.sbr

............此處省略319個文件信息

評論

共有 條評論