2007年6月14日星期四

video format conversion

These two days, I developped a library to convert YUV format to RGB, and vice visa. The core algorithm is based on ccvt's codes. But I found the interfaces provided by ccvt are not sufficient, and also contain bugs. So I sat down to analyse the YUV formats(420p, 420i, yuyv), program and debug. Finally a satisfying library is avaliable which is quite easy for use.
The algorithm itself is very simple, but debugging is not so easy a thing. You have to design special routines to expose the errors. The problem is, programmer may always presumes some "facts" or "certainties" which are total error in essence. And sometimes, the code's behavior depends on the dataset fed to the program. All these add to the difficulty of code testing. I've spend neary 3/4 time on testing and debugging~~

没有评论: