<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Marco's blog</title>
	<link>http://www.mgerards.net</link>
	<description></description>
	<pubDate>Thu, 14 Aug 2008 18:51:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>
	<language>en</language>
			<item>
		<title>ATA bug fixes</title>
		<link>http://www.mgerards.net/?p=40</link>
		<comments>http://www.mgerards.net/?p=40#comments</comments>
		<pubDate>Thu, 14 Aug 2008 18:51:27 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
		
		<category><![CDATA[GRUB 2]]></category>

		<category><![CDATA[Summer of Code]]></category>

		<guid isPermaLink="false">http://www.mgerards.net/?p=40</guid>
		<description><![CDATA[Last week I have updated the ATA driver code in GRUB 2. Error handling was broken and delays were long until Colins TSC patch was applied. The current code is now quite resilient to errors. In the meanwhile I removed the ATAPI code. Instead, I have added a SCSI module. The SCSI modules allows other [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I have updated the ATA driver code in GRUB 2. Error handling was broken and delays were long until Colins TSC patch was applied. The current code is now quite resilient to errors. In the meanwhile I removed the ATAPI code. Instead, I have added a SCSI module. The SCSI modules allows other modules to register a SCSI command interface. The SCSI modules exports a disk device that is communicated with using SCSI commands over this SCSI command interface. The ATA driver was changes to uses scsi.mod.</p>
<p>I am working on USB support for Google Summer of Code. One of my goals is implementing USB Mass Storage Device support (USBMSD). USBMSD also uses SCSI commands. Thus this module will be shares between at least USBMSD and ATAPI. Hopefully someone will add SCSI drivers some day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mgerards.net/?feed=rss2&amp;p=40</wfw:commentRss>
		</item>
		<item>
		<title>Sidux boot video</title>
		<link>http://www.mgerards.net/?p=39</link>
		<comments>http://www.mgerards.net/?p=39#comments</comments>
		<pubDate>Tue, 15 Jul 2008 17:44:04 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mgerards.net/?p=39</guid>
		<description><![CDATA[A while ago I wrote a blog entry on how to boot iso9660 CDROM images using GRUB 2. Someone made a video out of it and placed it on youtube
Enjoy 
]]></description>
			<content:encoded><![CDATA[<p>A while ago I wrote a <a href="http://mgerards.net/blog/?p=16">blog entry</a> on how to boot iso9660 CDROM images using GRUB 2. Someone made a video out of it and placed it on <a href="http://youtube.com/watch?v=udmPbGP4IYA">youtube</a></p>
<p>Enjoy <img src='http://www.mgerards.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mgerards.net/?feed=rss2&amp;p=39</wfw:commentRss>
		</item>
		<item>
		<title>Google Summer of Code 2008</title>
		<link>http://www.mgerards.net/?p=37</link>
		<comments>http://www.mgerards.net/?p=37#comments</comments>
		<pubDate>Fri, 02 May 2008 18:25:38 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
		
		<category><![CDATA[GRUB 2]]></category>

		<category><![CDATA[Summer of Code]]></category>

		<guid isPermaLink="false">http://www.mgerards.net/?p=37</guid>
		<description><![CDATA[Last year I have implemented a Dirac (BBC) decoder for FFmpeg, as a Google Summer of Code project. This year I will be working on a Summer of Code project again, now for GNU GRUB. The goal is to implement a USB framework including some drivers for GRUB 2. When this is implemented, you can [...]]]></description>
			<content:encoded><![CDATA[<p>Last year I have implemented a Dirac (BBC) decoder for FFmpeg, as a Google Summer of Code project. This year I will be working on a Summer of Code project again, now for GNU GRUB. The goal is to implement a USB framework including some drivers for GRUB 2. When this is implemented, you can access USB HID and USB Mass Storage devices from GRUB, even when the firmware does not support this. You might want to use this when your BIOS does not support USB. More importantly, this increases the usability of GRUB 2 on top of Coreboot (formerly known as LinuxBIOS). Because of this (and other GRUB 2 features we are working on), Coreboot + GRUB 2 might serve as a good (and Free!) BIOS replacement.</p>
<p>The first thing I will do is reading some books about USB, namely &#8220;USB Complete&#8221; and &#8220;Universal Serial Bus System Architecture&#8221;. Although I have some doubts about the quality of the second book, it&#8217;s better than reading the USB specification from the screen (which I eventually will have to do). I have ordered both books and I am looking forwards to getting started.</p>
<p>Because I will read these books first and because I am busy with my studies, I will not start producing code from the start, you can expect the first code somewhere in June. The first thing I plan to look at is libusb, which makes it possible to play with USB without having a complete UHCI driver. It should be easy to integrate this into grub-emu, more on this later.</p>
<p>As for Dirac, it still isn&#8217;t finished (unfortunately!). When I have time to look at this, I will. But if someone is interested in working on this, please tell me. The remaining tasks are not hard.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mgerards.net/?feed=rss2&amp;p=37</wfw:commentRss>
		</item>
		<item>
		<title>Dirac updates</title>
		<link>http://www.mgerards.net/?p=36</link>
		<comments>http://www.mgerards.net/?p=36#comments</comments>
		<pubDate>Sun, 23 Dec 2007 14:28:51 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
		
		<category><![CDATA[FFmpeg]]></category>

		<guid isPermaLink="false">http://www.mgerards.net/?p=36</guid>
		<description><![CDATA[BBC research has been updating the Dirac specification again. My work wasn&#8217;t updated after August, so I had to go over the changes in the specification. After some frustration and hard work, it&#8217;s updated again. The only thing left is adding the new interpolation filter. This should result in a performance gain, because this filter [...]]]></description>
			<content:encoded><![CDATA[<p>BBC research has been updating the Dirac specification again. My work wasn&#8217;t updated after August, so I had to go over the changes in the specification. After some frustration and hard work, it&#8217;s updated again. The only thing left is adding the new interpolation filter. This should result in a performance gain, because this filter is simpler and can be done using shifts, instead of multiplications <img src='http://www.mgerards.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Now I will focus on some cleanups and optimizations. Now I have some time for this because of Christmas holidays (2 weeks). I have several in mind and I will post the performance gain to my blog after the optimizations are committed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mgerards.net/?feed=rss2&amp;p=36</wfw:commentRss>
		</item>
		<item>
		<title>Reading a bit&#8230;</title>
		<link>http://www.mgerards.net/?p=35</link>
		<comments>http://www.mgerards.net/?p=35#comments</comments>
		<pubDate>Sun, 18 Nov 2007 17:10:05 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
		
		<category><![CDATA[FFmpeg]]></category>

		<category><![CDATA[Stuff]]></category>

		<category><![CDATA[GRUB 2]]></category>

		<guid isPermaLink="false">http://www.mgerards.net/?p=35</guid>
		<description><![CDATA[Last week I started working on my graduation project. It&#8217;s a full-time job and at the moment my top priority. During the weekend I try not to spend too much time using the computer. For example, next weekend I will go to a concert of Sonata Arctica :-). Last weekend I have been keeping up [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I started working on my graduation project. It&#8217;s a full-time job and at the moment my top priority. During the weekend I try not to spend too much time using the computer. For example, next weekend I will go to a concert of Sonata Arctica :-). Last weekend I have been keeping up with the emails on grub-devel so GRUB 2 will remain to be maintained.</p>
<p>Besides that, I am reading <a href="http://vig.prenhall.com/catalog/academic/product/0,1144,0131429388,00.html">Operating Systems Design and Implementation</a> by Andrew Tanenbaum. Although I know quite a lot on this subject already, I am reading it to refresh my memory on this subject and to prepare myself to read more papers on microkernel design. I have the silly idea to waste my precious time on writing my own microkernel some day. More importantly, I like reading and I do not want to spent too much time working on the computer. I am considering buying the book <a href="http://www.cs.vu.nl/~ast/books/mos2/">Modern Operating Systems</a>, also by Andrew Tanenbaum. Can someone tell me if this is a good book and if it doesn&#8217;t have too much overlap with the book I am currently reading?</p>
<p>So I do not have much time at the moment. Still, I intend to finish the ATA driver and networking support for GRUB 2 somewhere in 2007. Also, I want to get the Dirac code for FFmpeg in shape so it can be committed soon. I am not sure if doing all this in 2007 is realistic though&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mgerards.net/?feed=rss2&amp;p=35</wfw:commentRss>
		</item>
		<item>
		<title>ATA/ATAPI driver for GRUB 2</title>
		<link>http://www.mgerards.net/?p=34</link>
		<comments>http://www.mgerards.net/?p=34#comments</comments>
		<pubDate>Sat, 03 Nov 2007 12:37:00 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
		
		<category><![CDATA[GRUB 2]]></category>

		<guid isPermaLink="false">http://www.mgerards.net/?p=34</guid>
		<description><![CDATA[Last week I committed a patch to add support for ATA and ATAPI to GRUB 2. The ATA driver supports the CHS, ATA and ATA48 sector addressing methods. It should be capable of reading from and writing to every ATA harddisk. The ATAPI support is only capable of reading sectors from CDROM. I still have [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I committed a patch to add support for ATA and ATAPI to GRUB 2. The ATA driver supports the CHS, ATA and ATA48 sector addressing methods. It should be capable of reading from and writing to every ATA harddisk. The ATAPI support is only capable of reading sectors from CDROM. I still have to add features like reading the sector count.</p>
<p>This driver will be especially useful for  the LinuxBIOS port that has been recently committed. It can also be used to load something from CDROM when the BIOS doesn&#8217;t have CDROM support. Although I should further look into this, the only thing I have tested is loading files from CDROM.</p>
<p>There are several shortcomings in this driver. My driver and the one in the BIOS do not like each other. After my driver initializes, disk access from the BIOS might result in a crash. Therefore it disables biosdisk support. It also means that windows, for example, cannot be loaded using this driver because it later on accesses the disk via the BIOS interface. Perhaps this problem can be avoided by not resetting disks or storing the state somehow. I would appreciate it if someone can explain how I should do this properly so it will work on all systems.</p>
<p>Another shortcoming is its speed. For the moment it waits one tick, which is the shortest time GRUB can currently wait. One tick is 1/18th of a second, while it isn&#8217;t required to wait this long. Because of this, when the driver waits, it is wasting way too much time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mgerards.net/?feed=rss2&amp;p=34</wfw:commentRss>
		</item>
		<item>
		<title>Keyboard controller</title>
		<link>http://www.mgerards.net/?p=32</link>
		<comments>http://www.mgerards.net/?p=32#comments</comments>
		<pubDate>Sat, 15 Sep 2007 18:17:31 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
		
		<category><![CDATA[FPGA]]></category>

		<guid isPermaLink="false">http://www.mgerards.net/?p=32</guid>
		<description><![CDATA[During the afternoon I decided to play a bit with my FPGA development board. It has a PS/2 connector and I tried to make a PS/2 controller (using VHDL) that is able to receive PS/2 packets. I have no electrical engineering background, so what I did might just be plain wrong. But I had fun [...]]]></description>
			<content:encoded><![CDATA[<p>During the afternoon I decided to play a bit with my FPGA development board. It has a PS/2 connector and I tried to make a PS/2 controller (using VHDL) that is able to receive PS/2 packets. I have no electrical engineering background, so what I did might just be plain wrong. But I had fun and the design seems simple and clean to me. Feedback is of course welcome!</p>
<p>For now, I just interfaced with a keyboard. My PS/2 controller waits for the start bit, then starts reading the bits (and calculates the parity in parallel). It uses the clock generated by the keyboard to do this. When the byte is received and the parity is correct, a signal is sent to inform another process that the data is available. This process runs using a 27Mhz oscillator and waits for the data to settle before it makes it available.</p>
<p>Of course it is not finished yet. It can&#8217;t send commands to the keyboard yet, in order to do this I first have to learn a bit more about tri-states. I haven&#8217;t tried connecting a mouse yet. I will do this too and figure out how this works in detail. When everything works, I will make my VHDL code available. Can someone suggest a good license for VHDL code? I will use the GPLv3, unless someone can suggest something that is more appropriate for hardware. Of course I can already show you the schematic of what I currently have:</p>
<p><a href="http://www.mgerards.net/blog/wp-content/uploads/2007/09/kb.png" title="Keyboard controller RTL">Keyboard controller RTL</a></p>
<p>This development board also has VGA output (I implemented something for this already), DRAM, SD interface, RS232, USB, sound, buttons, a 7 segment display (got it working, this one requires scanning) and  it has TV output! So it can be used to develop multimedia stuff like MPEG-2, MP3, MJPEG or so. It would be neat to write a decoder or encoder some day. But my idea is to create my own gameboy some day. Although I can not promise I will actually come to this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mgerards.net/?feed=rss2&amp;p=32</wfw:commentRss>
		</item>
		<item>
		<title>Motion Vector packing</title>
		<link>http://www.mgerards.net/?p=31</link>
		<comments>http://www.mgerards.net/?p=31#comments</comments>
		<pubDate>Mon, 10 Sep 2007 17:21:29 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
		
		<category><![CDATA[FFmpeg]]></category>

		<category><![CDATA[Summer of Code]]></category>

		<guid isPermaLink="false">http://www.mgerards.net/?p=31</guid>
		<description><![CDATA[To implement motion vector packing, I just generate semi-random motion vectors and write these to the bitstream. In that case the rest of the encoding process has to adapt to these (incorrect) vectors. Most importantly: this will result in a bigger residue, thus in a bigger file. But this way this part of the encoder [...]]]></description>
			<content:encoded><![CDATA[<p>To implement motion vector packing, I just generate semi-random motion vectors and write these to the bitstream. In that case the rest of the encoding process has to adapt to these (incorrect) vectors. Most importantly: this will result in a bigger residue, thus in a bigger file. But this way this part of the encoder can be tested.</p>
<p>The motion vector packing now works!  I have also implemented calculating the residue and fixed many bugs in the other parts of the encoding process. Now the encoder writes intra+inter frames with the semi-random motion vectors for a single reference frame.</p>
<p>So what needs to be done now is searching for (optimal) motion vectors. Perhaps I can use the algorithm from the Snow codec for this, otherwise I will have to implement this myself. I also need support for two reference frames. Actually the support is there, it just has to be enabled properly :-). In order to produce smaller files I need to add quantization.</p>
<p>Despite what&#8217;s missing, I think I can say I quite succeeded with writing the Dirac codec during Summer of Code (about 2 months, with a break of one week because of exams). When Summer of Code started, one of the Schrodinger developers called me <a href="http://blogs.gnome.org/uraeus/2007/04/12/gstreamer-projects-in-the-years-google-summer-of-code/">Biggest Optimist in the Universe and Beyond 2007</a>. Although the encoder is not in a state that it can efficiently code all videos yet, the biggest part has been implemented already. But more importantly, my decoder can play back videos at a decent speed. So I got the &#8220;Biggest Optimist in the Universe and Beyond 2007 Award&#8221;, now I am waiting for the certificate, medal or whatever comes with the title ;-).</p>
<p><a href="http://multimedia.cx/eggs/gsoc-2007-wrap-up/">Mike</a> and <a href="http://guru.multimedia.cx/googles-summer-of-code-2007/">Michael</a> from the FFmpeg project both wrote a blog entry to wrap up how they look at the last Summer of Code, my work on the Dirac codec is part of this.  Summer of Code is finished now so I will start using the FFmpeg category for my future work on Dirac. Don&#8217;t worry, I will keep working on Dirac!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mgerards.net/?feed=rss2&amp;p=31</wfw:commentRss>
		</item>
		<item>
		<title>Intra frame coding fixed</title>
		<link>http://www.mgerards.net/?p=30</link>
		<comments>http://www.mgerards.net/?p=30#comments</comments>
		<pubDate>Mon, 03 Sep 2007 10:11:50 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
		
		<category><![CDATA[Summer of Code]]></category>

		<guid isPermaLink="false">http://www.mgerards.net/?p=30</guid>
		<description><![CDATA[In a previous post I mentioned that intra frame encoding works, but the reference implementation couldn&#8217;t decode my frames yet. Now I fixed this bug, it seemed to be a silly typo, I was using uint8_t instead of int8_t. With this fixed, the reference implementation is capable of decoding the frames encoded by my encoder.
Of [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous post I mentioned that intra frame encoding works, but the reference implementation couldn&#8217;t decode my frames yet. Now I fixed this bug, it seemed to be a silly typo, I was using uint8_t instead of int8_t. With this fixed, the reference implementation is capable of decoding the frames encoded by my encoder.</p>
<p>Of course a lot is missing in the encoder. First I will focus on writing the bitstream for the inter frames. So I need motion vectors to write out. First I will just take some random vectors, calculate the residue using these vectors and write both to the bitstream. That way it will become easier to test if writing out this data works, before I start working on Motion Estimation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mgerards.net/?feed=rss2&amp;p=30</wfw:commentRss>
		</item>
		<item>
		<title>Decoder performance</title>
		<link>http://www.mgerards.net/?p=29</link>
		<comments>http://www.mgerards.net/?p=29#comments</comments>
		<pubDate>Sun, 02 Sep 2007 11:45:08 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
		
		<category><![CDATA[Summer of Code]]></category>

		<guid isPermaLink="false">http://www.mgerards.net/?p=29</guid>
		<description><![CDATA[Today I built the decoder with profiling and debugging information disabled to compare the speed with that of the reference implementation. When building the reference implementation I disabled MMX, so I am just comparing C code with C code. At the end my code can also be speed up using SIMD code.
To measure the speed, [...]]]></description>
			<content:encoded><![CDATA[<p>Today I built the decoder with profiling and debugging information disabled to compare the speed with that of the reference implementation. When building the reference implementation I disabled MMX, so I am just comparing C code with C code. At the end my code can also be speed up using SIMD code.</p>
<p>To measure the speed, I used `time&#8217;. The first video I tried is a small video of just a few seconds. Using the reference implementation:</p>
<p>real    0m4.029s<br />
user    0m3.704s<br />
sys     0m0.272s</p>
<p>When  using my decoder:</p>
<p>real    0m3.754s<br />
user    0m3.528s<br />
sys     0m0.192s</p>
<p>The first video is a longer video. Using the reference implementation:</p>
<p>real    0m59.709s<br />
user    0m52.447s<br />
sys     0m5.168s</p>
<p>Using my decoder:</p>
<p>real    0m55.814s<br />
user    0m51.327s<br />
sys     0m2.460s</p>
<p>I had a look at what makes the difference. It appears that because I cache halfpel interpolated reference frames I save lots of time. This is not being done for the reference implementation. The reference implementation recalculated the interpolated frame every time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mgerards.net/?feed=rss2&amp;p=29</wfw:commentRss>
		</item>
	</channel>
</rss>

