- UID
- 238
- 积分
- 730
- 帖子
- 117
- 主题
- 4
- 论坛币
- 2705
- 威望
- 2
- EP值
- 556
- MP值
- 50
- 阅读权限
- 50
- 注册时间
- 2011-10-28
- 在线时间
- 102 小时
- 最后登录
- 2018-12-12
|
本帖最后由 愛萌就要控丶 于 2013-2-13 20:20 编辑
开始研究TCAS了,碰到不少麻烦。。无耻的来求助了。。。
一、
在http://www.tcax.org/docs/tcas-spec.htm中,由于英语不过关,有些地方没看明白。。。
TCAS文件结构的summary中写到“Dislike videos whose data is stored in a linear time-line sequence form, the data of TCAS file (TCAS data chunks) can be stored in any order.”
里面的“视频的数据储存方式”是怎样的,那个词用翻译软件翻不出来。
还有这一段“However non-linear timing makes it inefficient to parse the TCAS file, so TCAS brings in the indexing technique to make time-line linearization possible, hence increasing performance dramatically, moreover, as a side effect of such indexing technique, multi-threading becomes possible and can be easily implemented at the parsing phase.”
是什么方式使得编译TCAS文件的效率下降了?翻译不出= =(泪目)然后引进了XX方法又有什么副作用使得多线程什么得以实现。
还有TCAS FX 。。。FX是什么的缩写呢,软件领域的基础不足啊
求解= =英语不好实在太惭愧了。。。。
二、
在http://www.tcax.org/forum.php?mod=viewthread&tid=220的4.1节中,创建TCAS的方法里面:
from tcaxPy import *
def tcaxPy_User():
# 固定的TCAS文件创建方式
file_name = GetVal(val_OutFile) + '.tcas'
fx_width = GetVal(val_ResolutionX)
fx_height = GetVal(val_ResolutionY)
fx_fps = GetVal(val_FXFPS)
TCAS_FILE = CreateTcasFile(file_name, fx_width, fx_height, fx_fps)
# 往TCAS文件中写入内容
for i in range(100):
TCAS_BUF = [] # 创建一块新缓冲区
PIX = BlankPix(40, 40, MakeRGBA(255 - i, 2 * i, 0, 255))
dx = (fx_width - PIX[1][0]) / 2 - PIX[0][0]
dy = (fx_height - PIX[1][1]) / 2 - PIX[0][1]
tcas_main(TCAS_BUF, PIX, i * 1000 / fx_fps, (i + 1) * 1000 / fx_fps, dx, dy, 0) # 往缓冲区添加内容
WriteTcasFile(TCAS_FILE, TCAS_BUF) # write the buffer in memory to the file # 将缓冲区中的内容写入到TCAS文件里
# 关闭TCAS文件
FinTcasFile(TCAS_FILE)
其中 dx = (fx_width - PIX[1][0]) / 2 - PIX[0][0]
dy = (fx_height - PIX[1][1]) / 2 - PIX[0][1]
这种算法没看懂,是确定写入TCAS中的像素点的位置吗
三、
顺便再问一下,pixLibs.ImageStone中有哪些函数,有没有对应的说明能看。
比如
PIX = pstSoftGlow(PIX_0, 10, 180, 180) # 柔光效果, 该函数定义在pixStone.pyd模块中
这样的函数,对于后面的参数,不知道代表什么意义,很难使用啊。
但是感觉表现效果还不错。 |
|