2009年9月2日

ffmpeg的mpeg2编码I帧代码解读

摘要: 首先说一下编码的函数层次:MPV_encode_picture—encode_thread———encode_mb_hq————encode_mb(编码一个宏块)——————encode_mb_internal(编码I帧宏块,在这个... 阅读全文

posted @ 2009-09-02 18:11 vincenzo.lai 阅读(2309) 评论(1) 推荐(0)

gcc的一些option

摘要: -c: compileor assemble the source files, but do not link. The linking stage simply is not done. The ultimate output is in the form of an object file for each source file. By default, the object file n... 阅读全文

posted @ 2009-09-02 14:39 vincenzo.lai 阅读(1172) 评论(0) 推荐(0)

2009年8月31日

gcc编译将编译信息输出到文件的方法

摘要: make >[file name] 2>&1 阅读全文

posted @ 2009-08-31 17:33 vincenzo.lai 阅读(1171) 评论(0) 推荐(1)

2009年8月28日

Eclipse开发c++(二)

摘要: 这里对(一)中的一些东西做补充的说明1. MinGW自带一个make程序,但是ms大家对这个make的评价很差,于是eclipse推荐不要用这个make,而改用MSYS提供的make程序。2. 在(一)中,并没有提到安装MSYS,也没有安装make,但是为什么可以make,运行程序呢?是因为新版的C++ Eclipse 的CDT自带了一个make,可以make程序。3. CDT是一个强大的环境,可... 阅读全文

posted @ 2009-08-28 23:06 vincenzo.lai 阅读(1899) 评论(0) 推荐(0)

2009年8月27日

Eclipse开发c++(一)

摘要: 本文主要说明,如何用Eclipse进行c++开发。准备工作:1. 下载安装jre。eclipse运行需要java支持,到http://www.java.com/zh_CN/download/manual.jsp#win上面去下载windows下的jre环境安装文件,建议下载脱机版的,因为这样,你可以到处copy安装。下载完之后,安装。2. 下载安装eclipse,到http://www.eclip... 阅读全文

posted @ 2009-08-27 23:23 vincenzo.lai 阅读(7287) 评论(0) 推荐(1)

2009年8月25日

C的struct内存对齐的问题(二)

摘要: #include <stdio.h>#include <iostream.h>int main(void){ typedef struct{ unsigned short a:8; unsigned short b:9; unsigned short c:10; }T_struct1; typedef struct{ unsigned short a:2; unsign... 阅读全文

posted @ 2009-08-25 10:53 vincenzo.lai 阅读(381) 评论(0) 推荐(0)

C的struct内存对齐的问题

摘要: 采用VC6的的编译器对于struct:struct ST_DAT1 { char cDatA; int nDatC; char cDatB; } stDblChr;struct ST_DAT2 { char cDatA; char cDatB; int nDatC; } stDblChr;很显然,编译器在编译的时候,要做内存对齐的调整。由于两个struct中最长的变量都是int,占... 阅读全文

posted @ 2009-08-25 10:44 vincenzo.lai 阅读(1331) 评论(0) 推荐(0)

C在return之后执行函数

摘要: 通过atexit调用函数,可以再main函数return之后再执行刚刚被调用的函数。msdn解释是:The atexit function is passed the address of a function (func) to be called when the program terminates normally. Successive calls to atexit create a ... 阅读全文

posted @ 2009-08-25 10:09 vincenzo.lai 阅读(942) 评论(0) 推荐(0)

2009年7月2日

matlab设置随机数种子方法

摘要: ctime = datestr(now, 30);tseed = str2num(ctime((en - 5) : end)) ;rand('seed', tseed) datestr是为了获取系统时间。两个参数,now表示是现在的时间,30表示获取系统时间的格式。这个具体不同格式的含义可以参见matlab的help。由于获得ctime是字符串格式,因此需要用str2num转换成数字,由于ctim... 阅读全文

posted @ 2009-07-02 10:20 vincenzo.lai 阅读(22340) 评论(0) 推荐(0)

2009年6月20日

用putty登陆远程服务器

摘要: putty支持SSH和telnet登陆。双击putty.exe, 在Session-Host Name(or IP Address)中填入需要登陆的服务器的名字或者地址。由于是通过SSH登陆,因此端口号设置为22。点击open就可以登陆了。顺便多说一句,SSH只是一种协议,当要访问一个主机的时候,通常是通过主机的地址(名字)访问主机。 试想,一个主机是多任务了,可以被A登陆,也可以被B登陆R... 阅读全文

posted @ 2009-06-20 16:00 vincenzo.lai 阅读(1942) 评论(0) 推荐(0)

导航