资源简介
x264-snapshot-20091006-2245版本h264编码,针对vs2010的修改。
修改了在vs工程下定义变量的错误,初始化内存的错误问题。
编译通过。
对http://trace.eas.asu.edu/yuv/网站上的176x144(qcif)和352x288(cif)yuv测试正常运行。

代码片段和文件信息
/*****************************************************************************
* matroska.c:
*****************************************************************************
* Copyright (C) 2005 Mike Matsnev
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not write to the Free Software
* Foundation Inc. 51 Franklin Street Fifth Floor Boston MA 02111 USA.
*****************************************************************************/
#include
#include
#include “common/osdep.h“
#include “matroska.h“
#define CLSIZE 1048576
#define CHECK(x)\
do\
{\
if( (x) < 0 ) return -1;\
}\
while( 0 )
struct mk_context
{
struct mk_context *next **prev *parent;
struct mk_writer *owner;
unsigned id;
void *data;
unsigned d_cur d_max;
};
typedef struct mk_context mk_context;
struct mk_writer
{
FILE *fp;
unsigned duration_ptr;
mk_context *root *cluster *frame;
mk_context *freelist;
mk_context *actlist;
int64_t def_duration;
int64_t timescale;
int64_t cluster_tc_scaled;
int64_t frame_tc prev_frame_tc_scaled max_frame_tc;
char wrote_header in_frame keyframe;
};
static mk_context *mk_create_context( mk_writer *w mk_context *parent unsigned id )
{
mk_context *c;
if( w->freelist )
{
c = w->freelist;
w->freelist = w->freelist->next;
}
else
{
c = malloc( sizeof(*c) );
if( !c )
return NULL;
memset( c 0 sizeof(*c) );
}
c->parent = parent;
c->owner = w;
c->id = id;
if( c->owner->actlist )
c->owner->actlist->prev = &c->next;
c->next = c->owner->actlist;
c->prev = &c->owner->actlist;
c->owner->actlist = c;
return c;
}
static int mk_append_context_data( mk_context *c const void *data unsigned size )
{
unsigned ns = c->d_cur + size;
if( ns > c->d_max )
{
void *dp;
unsigned dn = c->d_max ? c->d_max << 1 : 16;
while( ns > dn )
dn <<= 1;
dp = realloc( c->data dn );
if( !dp )
return -1;
c->data = dp;
c->d_max = dn;
}
memcpy( (char*)c->data + c->d_cur data size );
c->d_cur = ns;
return 0;
}
static int mk_write_id( mk_context *c unsigned id )
{
unsigned char c_id[4] = { id >> 24 id >> 16 id >> 8 id };
if( c_id[0] )
return mk_append_context_data( c c_id 4 );
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 256 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\config
文件 58 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\desc
文件 23 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\HEAD
文件 441 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\hooks\applypatch-msg
文件 887 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\hooks\commit-msg
文件 152 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\hooks\post-commit
文件 510 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\hooks\post-receive
文件 207 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\hooks\post-update
文件 387 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\hooks\pre-applypatch
文件 1706 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\hooks\pre-commit
文件 4262 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\hooks\pre-reba
文件 1196 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\hooks\prepare-commit-msg
文件 2910 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\hooks\update
文件 10840 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\index
文件 240 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\info\exclude
文件 182 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\logs\HEAD
文件 182 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\logs\refs\heads\master
文件 182 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\logs\refs\remotes\origin\HEAD
文件 182 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\logs\refs\remotes\origin\master
文件 213824 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\ob
文件 2214951 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\ob
文件 41 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\refs\heads\master
文件 32 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\refs\remotes\origin\HEAD
文件 41 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.git\refs\remotes\origin\master
文件 156 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\.gitignore
文件 2002 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\AUTHORS
文件 3726 2012-12-14 14:38 vs-2010-x264-snapshot-20091005-2245\build\win32\Debug\libx264.Build.CppClean.log
文件 397 2012-12-14 14:38 vs-2010-x264-snapshot-20091005-2245\build\win32\Debug\libx264.log
文件 35651584 2012-12-14 14:38 vs-2010-x264-snapshot-20091005-2245\build\win32\ipch\x264-bbece019\obj\x264_debug\x264-edb24b7a.ipch
文件 31069 2009-10-06 04:45 vs-2010-x264-snapshot-20091005-2245\build\win32\libx264.vcproj
............此处省略189个文件信息
相关资源
- JM阅读笔记(学习H264)
- ado数据库MFC图书管理系统vs2010
- h264 ip核,经过asic验证
-
解决安装vs2012后vs2010 li
nk : fatal er - AnkhSvn-2.6.12735 支持VS2010-VS2015 官方原版
- VS2010、VS2012、VS2013代码自动注释插件
- 插件式GIS应用框架的设计与实现&mda
- x264源码及其配置文件,用于配置树莓
- x264源代码
- 通过x264录制RGB屏幕视频vs2013工程,
- windows 32位64位 x264库,包含libdll和头文
- libx264静态库,windows x86版本
- FFMEPG实现h264解码
- H264标准的详细图解
- G726、G711、G711A转换为AAC
- VS2010 运行时库
- RTMP_H265推流直播技术研讨
- vs2010 ffmpeg实时解码h264码流
- Qt基于FFmpeg播放本地 H.264H264文件
- 从ffmpeg中抽取的h264解码器,可用于
- X264实时编码,FFmpeg实时解码
- ffmpeg解码sdl播放h264
- 个人银行账户管理系统
- CMake-3.9.0
- 使用ffmpeg将多张图片生成H264裸流并获
- ffmpeg h264 转换jpg
- 基于FFMPEG_SDL2_音视频播放_参考音频时
- ffmpeg_windows屏幕录制并编码成H264
- ffmpeg封装H264成MP4、AVI视频格式,及提
- H264实时编码RTSP直播
评论
共有 条评论