资源简介
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; //!< the bit stream file
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_st
文件 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个文件信息
相关资源
- 瑞利信道的仿真,包括信号的调制,
- 八三编码器设计 VHDL代码 简单,包附
- 在高斯白噪声信道下的QPSK编码误码率
- JM阅读笔记(学习H264)
- 信息论与编码(仇佩亮编著 高等教育
- UNICODE GBK双向码表二进制文件
- LPC线性预测分析及编码
- 常用编码(UnicodeUTF-8GBK)转换工具
- L-Z编码L-Z解码
- h264 ip核,经过asic验证
- 1553曼彻斯特编码程序
- 全自动多功能编码转换工具(URLASCI
- H.264编码器流程图
- 建立文件数据索引的c 代码
- 易语言QQTEA算法源码
- XSS Encode
- 基于三菱PLC-松下A6伺服485通讯-读编码
- LabVIEW 数据采集 模拟量+编码器(Daq
- UTF8编码表汉字对照
- H.264视频编码基本知识
- 6通道增量式编码器在智控型纺织机的
- FFMEPG实现h264解码
- H264标准的详细图解
- 矿井巷道时频编码协作MC-CDMA信道估计
- 易语言查询话费欠费信息源码
- RTMP_H265推流直播技术研讨
- 易语言图像编码、解码器源码易语言
- 哈夫曼树编码和译码实验报告+运行视
- Huffman Compress 霍夫曼编码 压缩 解压缩
- vs2010 ffmpeg实时解码h264码流
评论
共有 条评论