我写故我在

I write, therefore I am

Posts Tagged ‘gsoc’

GSoC 2011 is over

Posted by ieipi 于 八月 31, 2011

Google has announced the final evaluation result and the integration work is underway—my GSoC2011 journey with Jitsi has approached to its final period. Now it’s the right time to reminisce about this unique experience.

I can’t forget the moment when I received the email from Google saying that I had been accepted by Jitsi as a GSoC2011 student. The official announcement time is 19:00 UTC April 25, which is 03:00 here in Beijing. I spent all night waiting for the final moment with butterflies in my stomach. When the announcement came, I was even too excited to fall asleep.

After immersed in the excitement for a week, coding period started.

The project is to implement support for wideband codecs, to be specific, SILK, in Jitsi. So why wideband codecs? Thanks to the advancement of Internet access technology, the available bandwidth has increased a lot, and the major concern of VoIP developers has shifted from using less bandwidth to supporting better quality. Imagine the quality of music rather than speech, that’s cool. And then why SILK? Well, to be honest, Skype has done pretty well in the VoIP industry, and they share their main audio codec, SILK, to the open source community. And we are eager to have it in Jitsi.

The main work is to import SILK from C to Java. Sounds very straightforward, right? It may be easy to start, but you may suffer to make it work well. We’ve decided to translate the C code from scratch rather than using JNI technique. There are some important notes to be taken care of in the translation process.1). Pointers. The C programs use pointers intensively. However, there is no pointer in Java. So you should be careful when encounter pointers. Generally speaking, when the pointer is of complex type, e.g. struct, you can use an object reference in Java to translate it. However, when the pointer points an array, you should use an array reference and a data offset in addition. 2). Callbacks. C supports function pointers, which make callbacks flexible and powerful. Again, no pointers in Java, so you should design carefully based on the interface technique to support callbacks.3). Unsigned data types. There is no unsigned data type in Java, so you should be careful when unsigned data is involved in the operation.4). Shift operations. Java has separated operators for logic shift and arithmetic shift operation. 5). Endianness. Java is big endian, and usually the input data is in the format of little-endian. 6).Float point arithmetic. Subtle problems will arise when float point operation is involved.

The coding work was finished nearly in the mid-term, and then came the test. I should say that test really takes time. The test and debugging can easily take more time than you expect. So I think you should always remember to assign more time than you predict for debugging and test. In the first phase, it was not difficult to clear the bugs and made the program run. Though it gave no error messages, the result was not correct. For example, when I played the music which was encoded/decoded by the codec, the last part of the audio was not clear at all. At first, I tried to find the bugs from top down—debug step by step, and compare the intermediate result with that of the C version. But I found it was really difficult to determine whether they match or not when float point arithmetic operation was involved. Since the float point operation result is not exactly the same in Java as in C, when the intermediate result doesn’t match, it’s difficult to judge whether it’s because of a bug or just because of the float point operation itself. After discussion with my mentor Lyubomir, I decided to use another approach—a down-top approach. Get the intermediate result from C, and hard-coded it into Java to test whether there are bugs in the following parts. By this approach, I finally located the bug. It resides in the re-sampler part, and this explains why only part of encoded/decoded audio is incorrect.

Finally, how to test a codec? I think there are basically two methods. The first is to write a script to compare the result with a reference signal to see whether they match with each other. And the second is by hearing. Let the user test it. You play the audio result which is processed by the encoder and decoder and compare with the original sample audio. If it’s clear enough, I think you can say the codec works correctly.

The 3 months passed quickly, but the memory will last. Thank Google, thank Jitsi, and especially thank my mentor Lyubomir. I hope I can continue to work with the community in the future.

Advertisements

Posted in 随笔 | Tagged: | Leave a Comment »

感谢郭佳 GSoC中了

Posted by ieipi 于 五月 10, 2011

gsoc结果公布已经快两周了,还是写点什么吧。

大概是在今年刚开学的时候就看到了来自Google的新闻,似乎今年Google在二月份就启动gsoc项目了。当时没怎么在意,主要是幻想今年能出去找找实习。后来逐渐认识到了现实的残酷,身不由己。。。。。。

既然不能出去实习,gsoc似乎是最好的选择了。无奈去年失利的阴影还在,万一这回又挂了咋办,上次失败的日志还在那儿尸骨未寒,总不能这回又写个失败总结吧?

318日,周五,Google公布了所有入选的开源组织。周末晚上回去浏览了一下,发现去年的那个组织还在,本着试一试又不犯法的精神,我发出了第一封邮件。忐忑间,mentor已经有了回复,很热情的回复。这下我的热情也上来了,于是接下来数天,邮件往来,不亦乐乎。

下一周就是提交proposal了。在这里,很有必要喷一下GFW。狗日的GFW,连gsoc的官网都被墙了。宁可错杀一千,也不放过一个。头几天,用了个GApp代理能上。刚好在临提交时却发现这个代理不行了,难不成让我为了这事去买个VPN?鼓捣了一个晚上,尝试各种翻墙术,总算可以上了。但是有GFW在,心里总归不踏实。

屋漏偏逢连阴雨,这时老板突然心血来潮,让写一篇paper投稿。只差一个月就截稿了。我委婉的表示无米之炊难为,但是老板坚持说只是一个小paper,可以投。可是再小的paper它也是paper啊,麻雀虽小,五脏俱全啊。我也知道双线作战乃兵家大忌,两手抓,往往两手都硬不起来。但是没办法,我还得先应承下来。

为了赶时间,早早提交proposal后就开始等回应了。心想着先抢得先机,再根据mentor的意见慢慢完善。但是邮箱却开始沉寂下来了。这时清明假期来了。出去玩了几天。这期间,gsoc官网不能上了,也不知道进展如何。也亲身体验了一把Gmail抽风的问题,邮箱经常连不上。话说它们真的会对Gmail全面动手吗?God bless gmail

放假回来后就发现邮箱有动静了。原来就在假期中,组织的大头目给我comment了。怎么就没有邮件通知呢?我连忙去仔细看了一下他的留言。大事不妙!他对我之前的有些问题不太满意,feel uncomfortable,似乎觉得我说了大话,骗了他们。他只是uncomfortable,我却是非常的terrible,赶紧想办法补救。马上就回了留言。然后就开始coding,这时候恐怕只有source code才能证明我的清白。没等他们回复我的留言,我就把我的代码给附了上去,又balabala说了一大推。然后就静候佳音。一连几天过去了,仍然没有消息,我开始坐不住了。只有直接联系我的mentor,探探口风。Mentor实在是个好人,他让我不要多想,专注于项目本身。我总算稍微能宽宽心。

就这样,在忐忑中,48日,application deadline到了。接下来就是更为煎熬的evaluation period

我这边却还是没什么动静,也没收到有什么test。在channelmailing list里面问了,得到的回复是他们很忙,正在evaluate我们的proposal。也不知道他们是怎么evaluate的。不能干等,于是我就不断的自己找问题主动联系mentor。这个周末,16号,戴同学和占同学来北京玩,于是乎我又放了几天假。玩的很happy。回来之后,还是没谱。眼看着两个deadline都要到了,心里万分捉急。终于忍不住在周三的时候,又找了一下mentor。这个时候,他们的人选应该也定的差不多了。在我一再焦虑的逼问下,他总算给了一些积极的回应。先是说我的proposal在他看来acceptable,接着说我提交的code看起来promising。我承认我看到这两个词时很是心花怒放了一会。但是老外有时太gentlemen了,习惯说赞语。我还是不敢太当真。接下来他竟然跟我聊起了中西方文化差异,这当然是我感兴趣的话题。无奈英文不给力,连first namelast name都差点搞错了,伤不起啊。但是心里一阵窃喜,他既然跟我聊这些,莫非有戏了。又不敢直接问他我中没中,显得中国人不守规则,好打听。之前就发生了一件小插曲。还是在申请阶段的时候,有个阿三在channel里面不无得意的说因为中国政府和Google之间的紧张关系,Google禁止中国学生参加,所以印度成为除美国本土以外申请人数最多的国家。搞得我很紧张,连忙去问。结果引来一帮人对文凭含金量的议论。说什么虽然Google只接受大学生和研究生申请,但是各个学校的文凭含金量不一样。还建议Google今后是不是也得对学校进行一些资格审查。难不成我们国家文凭泛滥已经名声在外了?莫非又成功输出价值观了。

第二天,周四。这回mentor主动找我聊了。他上来就整一句how are you?我差点条件反射般跟一句fine, thank you, and you?想起了网上那些段子,觉得不可。可是他来这么一句到底是一种什么样的思想感情?初中英语瞎学了。是让我汇报工作吗?于是我就老老实实的说最近在憋论文,他很nice地祝我成功。然后他就问我什么时候可以开始工作,我当然说随时可以。到了最后,他就开始嘱咐我了,说他从周五到周一要回去度假,有什么事该找哪些人等等。这下我终于可以心花怒放了。看来至少在他那里是没什么大问题了,而且既然他周末可以去度假,那我是不是也可以放松放松。。。

然后我就等着过个愉快的周末,去了趟798,然后就把手机弄丢了。然后就买了个android

原本以为是周日晚上出结果,做好了准备熬通宵。结果发现我把时间搞错了,是UTC时间42519:00,相当于北京时间周二凌晨三点。

于是周一整天心神不宁。到了晚上,不得不靠看电影消磨时间。大概凌晨一点时,电影也看不下去了,电视剧也不行。还有两个小时,可怎么熬?于是开始dota,打了一半发现竟然连dota都难以让我集中精力。接下来的时间就变成了垃圾时间,不断的刷屏。

大概差三分钟三点时,Google发来贺电,Congratulations, 你的申请已通过!赶紧上channel等着开会庆祝,却发现一点锣鼓喧天鞭炮齐鸣的喜庆气氛也没有,冷静的很。为啥大家都这么淡定呢。心里有点不踏实,又上官网去求证。上面明白无误的有我的名字和我的proposal。应该不会有错。于是进到我们组织的channel,感谢cctv,感谢mtv,瞎感谢一通,终于可以上床睡觉了。

Google官方规定的时间是从五月底开始,但是我之前给过他们承诺,所以现在就得提前开始,毕竟要为我们曾经吹过的NB负责啊。

开始coding吧。

Posted in 随笔 | Tagged: | Leave a Comment »

GSoC2011 announcement

Posted by ieipi 于 四月 26, 2011

At April 25, 19:00 UTC, the accepted student proposals have been announced.

It’s 3:00 am here in Beijing. I have to hold up late again. But this time it’s more difficult.I just can’t calm down and concentrate after 1:00 am. I tried watching movie, TV plays and even dota, but all failed.

At about 3 mininutes to the final time, I got an email from Google. Congratulations! your proposal has been accpeted as the GSoC 2011 project. Is that ture?! I went to the gsoc webpage, and searched my proposal. Yes, i made it!All work has paid.

Thanks Jitsi community! Thanks Lyubomir!

Posted in 随笔 | Tagged: | Leave a Comment »

GSoC application deadline

Posted by ieipi 于 四月 10, 2011

The GSoC2011 application deadline is 19:00 UTC, April 8, which is 3 am here in Beijing. I have hold on to the last minute, and submitted my final application.Hope i will get positive feedback from mentors.

Posted in 随笔 | Tagged: | Leave a Comment »