2007年6月26日星期二

regular expression

在vi中匹配一行
1. ^.*
2. ^\(.*\)
3. ^\(.\)*
4. ^.*\n
5. ^\(.*\)\n
6. ^\(.\)*\n

说明: ^表示起始行, ()表示括号中的字符重复的次数, ()必须使用\进行转义. \n表示换行, 在应用中发现加上或者不加没有效果都一样, 不知是否存在未知的区别?

2007年6月1日星期五

Xvid 学习笔记

使用xvidcore-1.1.0版本
这个版本在Linux(FC4)上可以编译成功, 在Windows上无法编译, 错误提示:
Compiling...
plugin_2pass2.c
y:\temp\xvid\xvidcore-1.1.0\src\plugins\plugin_2pass2.c(468) : warning C4244: 'function' : conversion from 'const double ' to 'const float ', possible loss of data
y:\temp\xvid\xvidcore-1.1.0\src\plugins\plugin_2pass2.c(474) : warning C4244: 'function' : conversion from 'const double ' to 'const float ', possible loss of data
y:\temp\xvid\xvidcore-1.1.0\src\plugins\plugin_2pass2.c(1358) : warning C4244: '=' : conversion from 'unsigned __int64 ' to 'double ', possible loss of data
y:\temp\xvid\xvidcore-1.1.0\src\plugins\plugin_2pass2.c(1541) : warning C4244: 'initializing' : conversion from 'double ' to 'const float ', possible loss of data
y:\temp\xvid\xvidcore-1.1.0\src\plugins\plugin_2pass2.c(497) : error C2520: conversion from unsigned __int64 to double not implemented, use signed __int64
y:\temp\xvid\xvidcore-1.1.0\src\plugins\plugin_2pass2.c(497) : error C2520: conversion from unsigned __int64 to double not implemented, use signed __int64
y:\temp\xvid\xvidcore-1.1.0\src\plugins\plugin_2pass2.c(1182) : error C2520: conversion from unsigned __int64 to double not implemented, use signed __int64
y:\temp\xvid\xvidcore-1.1.0\src\plugins\plugin_2pass2.c(1261) : error C2520: conversion from unsigned __int64 to double not implemented, use signed __int64
y:\temp\xvid\xvidcore-1.1.0\src\plugins\plugin_2pass2.c(1338) : error C2520: conversion from unsigned __int64 to double not implemented, use signed __int64
y:\temp\xvid\xvidcore-1.1.0\src\plugins\plugin_2pass2.c(1339) : error C2520: conversion from unsigned __int64 to double not implemented, use signed __int64
y:\temp\xvid\xvidcore-1.1.0\src\plugins\plugin_2pass2.c(1358) : error C2520: conversion from unsigned __int64 to double not implemented, use signed __int64
Error executing cl.exe.

Debug和Release版本都是如此.

examples中用的视频文件"cactus.pgm"是pgm格式的文件. 里面包含三帧画面. 使用"ppmtoyuv"或"ppmtojpeg"命令只能将文件第一帧转为jpeg或yuv文件. 我是手动将"cactus.pgm"文件切割为三帧的pgm文件, 然后转为yuv文件. 使用"ppmtoyuv"转出的yuv格式是4:2:2.