jack的视频编码工作台

专注h.264硬件编码实现

IT博客 首页 新随笔 联系 聚合 管理
  6 Posts :: 0 Stories :: 5 Comments :: 0 Trackbacks

2005年11月17日 #

     摘要: Turbo C 2.0 函数中文说明大全分类函数,所在函数库为ctype.h int isalpha(int ch) 若ch是字母('A'-'Z','a'-'z')返回非0值,否则返回0 int isalnum(int ch) 若ch是字母('A'-'Z','a'-'z')或数字('0'-'9'),返回非0值...  阅读全文
posted @ 2005-11-17 11:13 jackopt 阅读(212) | 评论 (0)编辑 收藏

2005年11月16日 #

char str[100];
memset(str,0,100);
memcpy(str,"This is a",9);
strcpy(&str[9],"example!");

--------------------------

memset用来对一段内存空间全部设置为某个字符,一般用在对定义的字符串进行初始化为‘ ’或‘\0’;例:char a[100];memset(a, '\0', sizeof(a));

memcpy用来做内存拷贝,你可以拿它拷贝任何数据类型的对象,可以指定拷贝的数据长度;例:char a[100],b[50]; memcpy(b, a, sizeof(b));注意如用sizeof(a),会造成b的内存地址溢出。

strcpy就只能拷贝字符串了,它遇到'\0'就结束拷贝;例:char a[100],b[50];strcpy(a,b);如用strcpy(b,a),要注意a中的字符串长度(第一个‘\0’之前)是否超过50位,如超过,则会造成b的内存地址溢出。

--------------------------

mem是一段内存,他的长度,必须你自己记住
str也是一段内存,不过它的长度,你不用记,随时都可以计算出来
所以memcpy需要第三个参数,而strcpy不需要
------------------------------
strcpy
 原型:extern char *strcpy(char *dest,char *src);
 用法:#include <string.h>
 功能:把src所指由NULL结束的字符串复制到dest所指的数组中。
 说明:src和dest所指内存区域不可以重叠且dest必须有足够的空间来容纳src的字符串。
       返回指向dest的指针。
memcpy
 原型:extern void *memcpy(void *dest, void *src, unsigned int count);
 用法:#include <string.h>
 功能:由src所指内存区域复制count个字节到dest所指内存区域。
 说明:src和dest所指内存区域不能重叠,函数返回指向dest的指针。
memset
 原型:extern void *memset(void *buffer, int c, int count);
 用法:#include <string.h>
 功能:把buffer所指内存区域的前count个字节设置成字符c。
 说明:返回指向buffer的指针。

posted @ 2005-11-16 19:27 jackopt 阅读(371) | 评论 (0)编辑 收藏

2005年11月4日 #

&lt;A href=&quot;http://www.61ic.com&quot;&gt;http://www.61ic.com&lt;/A&gt; 不错,有很多资源,常去看看&lt;BR&gt;&lt;A href=&quot;http://www.techonline.com/community/tech_group/dsp/forum&quot;&gt;http://www.techonline.com/community/tech_group/dsp/forum&lt;/A&gt;&amp;nbsp;待查&lt;BR&gt;电子产品世界的论坛[2004年09月30日]&lt;BR&gt;&lt;A href=&quot;http://bbs.edw.com.cn/index.asp&quot;&gt;http://bbs.edw.com.cn/index.asp&lt;/A&gt;&lt;BR&gt;恒颐高科论坛[2004年09月30日]&lt;BR&gt;&lt;A href=&quot;http://www.hyesco.com/forum/index.asp&amp;amp;amp;amp;quot&quot;&gt;http://www.hyesco.com/forum/index.asp&lt;/A&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;A href=&quot;http://www.ednchina.com/&quot;&gt;http://www.ednchina.com/&lt;/A&gt;
posted @ 2005-11-04 21:47 jackopt 阅读(113) | 评论 (0)编辑 收藏

     摘要: &lt;TABLE cellSpacing=5 cellPadding=5 width=&quot;100%&quot; border=0&gt; &lt;TBODY&gt; &lt;TR&gt; &lt;TD style=&quot;TABLE-LAYOUT: fixed; WORD-BREAK: break-...  阅读全文
posted @ 2005-11-04 21:11 jackopt 阅读(261) | 评论 (0)编辑 收藏

2005年11月1日 #

先Y后U后V,无冗余信息

A video sequence stored in the YUV format is stored  by concatenating
consecutive frames into a single big file. Each frame contains the Y pixels
for that frame first, followed by the U pixels (actually Cr pixel), followed
by V pixels (actually Cb pixels). Each component is raster-scanned from
the top left corner down to the bottom right corner.
Each pixel value is stored as a 8 bit unsigned character.

For example, a frame in a QCIF sequence with 176x144 Y pixels and
88x72 U and V pixels is stored in the following order:

           176
     +-------------+
     |                      |
     |     Y              | 144
     |                      |
     |                      |
     +-------------+
       88
     +------+
     |  U      |
     |           |72
     +------+
     |  V      |
     |           |72
     +------+
posted @ 2005-11-01 11:06 jackopt 阅读(4930) | 评论 (5)编辑 收藏

2005年10月31日 #

#使用vc6编译环境

文件打开 fopen("C:\\exam.dat","ab+");

a:append 追加

if((fp=fopen("c:\\hzk16","rb")==NULL)
{
printf("\nerror on open c:\\hzk16 file!");      //include
getch();       //include
exit(1);       //include
}

文件关闭 fclose(文件指针)
如果正常关闭,返回0,返回非零表示有错误发生。

字符读写函数 :fgetc和fputc

字符串读写函数:fgets和fputs

数据块读写函数:freed和fwrite

格式化读写函数:fscanf和fprinf

FILE *fp = stdout   表示文件指针对应标准输出文件(显示器)。

posted @ 2005-10-31 10:57 jackopt 阅读(568) | 评论 (0)编辑 收藏

仅列出标题