|
|
|
|
|
|
|
Sponsored By


|
|
|
|
|
|

|
|
|
|
|
|
|
Efika 5200B Project
 |
Reggae on Efika
in category Multimedia proposed by Grzegorz Kraszewski on 21st February 2006 (accepted on 20th March 2006)
|
|
|
|
|
|
|
|
|
|
|
|
|
Project Summary
Porting Reggae to MorphOS on Efika. As Reggae is designed to be effective and has very low memory footprint, it perfectly fits Efika.
|
|
|
|
|
Project Blog Entries
|
|
|
|
|
|
|
Blog archive
posted by Grzegorz Kraszewski on 16th May 2008
As the site does not provide links to view archived blog entries, I've prepared an archive with all the blog entries linked using permanent links. I also have the contents stored locally, will probably make it public as well, for easier browsing.
|
|
|
|
|
|
|
|
|
|
|
|
Resampling filters design
posted by Grzegorz Kraszewski on 13th May 2008
I've designed -60 dB and -80 dB resampling filters today. The first one is 48-tap one (and more when downsampling), is oversampled 32 times, so the half-width table has 768 coefficents. The second, high quality one is 64-tap and is oversampled 128 times, which yields 4096 coefficents in the table. Both filters have 3 dB attenuation at 0.45 of sampling frequency and respectively -60 or -80 dB at 0.5 of sampling frequency. I've also made siginficant progress on resampler reference (not optimized at all) code, but it is not yet finished.
|
|
|
|
|
|
|
|
|
|
|
|
audio.output progress, audio resampling
posted by Grzegorz Kraszewski on 12th May 2008
I've done some more work on new audio.output class version. It has a complete subthread framework including command passing. The thread opens AHI, in case of failure, object fails gracefully as it should, with error reported.
I've also started work on a variable rate audio resampler. It uses bandlimited resampling concept described by J. O. Smith. I've started from designing three resample filters, for three levels of quality. The first, low quality filter is ready. It has 257 coefficents in total and spans over 32 input samples (if no scaling is used). The filter ensures both aliasing distortions and filter interpolation distortions are kept below -40 dB.
|
|
|
|
|
|
|
|
|
|
|
|
Another busy day
posted by Grzegorz Kraszewski on 7th May 2008
I've made some more changes to http.stream bumping the revision to 51.8. I've added missing attributes, cleaned up the docs, simplified subthread initialization and shutdown code. I've also added a feature allowing applications handling HTTP permanent redirections properly. MMA_StreamName attribute may be queried after object construction, and if there has been any 301 redirection, the attribute contains a new URL. Then an application can update its links.
I've fixed a nasty bug in gif.decoder then. It caused 0x4 location read on every GIF image decoded. Just three missing letters in a function call.
Then there is another bugreport pending, for audio.output this time. Subthread initialization code is broken, so if for any reason subthread fails to initialize, calling application will crash. I've decided to reuse extensively tested http.stream subthread framework. This is work in progress currently.
BTW my Ph.D. thesis is two pages longer since today :-).
|
|
|
|
|
|
|
|
|
|
|
|
http.stream 51.7
posted by Grzegorz Kraszewski on 6th May 2008
After almost total rewriting of the class I've finished in finally. The most troublesome thing has been automatic redirection on 3xx server response. It requires that current connection is closed and a fresh one is made with newly generated request. While testing it, it also turned out that some HTTP servers do not comply with RFC 2616 and send relative pathes in "Location" header field, while the protocol specification clearly states it must be absolute. A workaround for this issue has been added.
Anyway it is finished (except some cosmetics) and in my opinion it is a very nice component not only usable as a media stream source for Reggae. An application can use it standalone to fetch any resource available via HTTP GET request. The programmer does not need to have HTTP or socket API knowledge. As http.stream gives easy access to (parsed) HTTP request and response headers, an application can use some advanced features like cookie handling, range requests, conditional requests and more. Automatic redirection makes it easier too (as it is standard feature of any WWW browser, we usually don't even know that it happens, but handling it in own application is a headache, believe me). The new class is on the MorphOS CVS server and probably will not be released separately before the day 11111 (the mysterious date of MorphOS 2.0 release).
Christian Rosentreter reviewed MediaLogger 1.8 and sent me a bunch of style guide and GUI consistency notes. Most of them have been implemented, and MediaLogger 1.9 is on the way to be released publicly at the usual place.
|
|
|
|
|
|
|
|
|
|
|
|
Old code, new code...
posted by Grzegorz Kraszewski on 26th April 2008
Glueing an old code and a new code always lead to troubles. The same in http.stream. I've added network thread code and response header parser. After fixing some obvious compiler errors and warnings, I've got a ready executable, which... crashes. My limited time allowed me only to localise the crash in the source code. I will attempt to fix it on Monday.
|
|
|
|
|
|
|
|
|
|
|
|
Still messing with HTTP
posted by Grzegorz Kraszewski on 24th April 2008
HTTP request header generator is almost finished. Network code and response parser will be taken from the previous version. Redirection resolver loop is ready as well. That means, new http.stream will be ready tomorrow (or in a few days). New nice features are: working automatic redirection, user agent spoofing, and passing custom fields to the request header (this last feature allows for example for supporting cookies).
|
|
|
|
|
|
|
|
|
|
|
|
http.stream revisited
posted by Grzegorz Kraszewski on 23rd April 2008
On demand of application programmers I'm in a process of rewriting http.stream. Most important thing is really working atomatic redirection (in response to HTTP 3xx codes). There are also new features like custom request header fields, User-Agent spoofing and some minor enchancements. Network errors handling is improved. The work is not yet finished, I expect to release the new class before the end of May.
|
|
|
|
|
|
|
|
|
|
|
|
Reggae 2007 summary and plans for 2008
posted by Grzegorz Kraszewski on 8th January 2008
The past 2007 year has been one of the best in the whole Reggae history (which has been started in 2003). In this blog entry I want to summarize 2007 achievements and try to shed some light on the project future.
3-rd party classes
Moving a software project from an one person's pet to a real thing developed by at least a few people is very important and often difficult step. Reggae has made this step succesfully in the second half of 2007, when Michal Zukowski started work of Reggae decoders of many important image formats. It proves that Reggae is a mature, stable and well documented framework, which anyone can contribute to. Michal's classes are also important from another point of view. All classes written before were carefully written from scratch, handtuned and optimized pieces. While it is good for high performance and small memory footprint, it takes time. JPEG and PNG decoders by Michal base on "industry standard" off-the-shelf libraries, and as such are a proof that Reggae can easily adopt new multimedia technologies, which is very important for possible commercial applications. Of course these components can be later refined, or even replaced with some optimized code (for example using hardware components to speed processing up), but in the meantime applications can use new codecs, transition to newer, improved versions is smooth.
Video metaformat
The video metaformat, described briefly in my previous posts is another new thing introduced into Reggae in 2007. It is worth noting, thanks to high Reggae modularity and good framework design, introduction of the metaformat has been totally backward compatible and no single class has to be modified to accomodate the metaformat. To make a short recall, the metaformat is designed to extend Reggae capability of video handling. The metaformat exposes video structure to applications. While it may be not very interesting for typical fixed-size, fixed framerate streams, it allows for variable rate streams (AnimGIF), partial updates, partial restore (another AnimGIF feature) and more. Metaformat is designed to be very extendable in the future, as I plan to use it for processing vectorial graphics and video. While a need of exposing internal structure of raster-oriented media is debatable (but keep MPEG-4 in mind...), it is obvious for vectorial graphics, especially for any application intending to do anything more than just display. Metaformat will be also extended to support compound documents containing text with embedded images, video and sounds. Metadata stream will be then splitted by splitter Reggae class, directing chunks of data into decoders for any kind of media, and, what is important, metadata will retain object position in the document and other informations needed for document reassembly for display or processing. To sum it up, while the metaformat is by no mean rocket science, its introduction moves Reggae to another, higher level of flexibility and versatility.
Media encoding
It can be noticed by looking at the Reggae class list that there are no encoders. There is a reason for this. Decoding is easier - all parameters of encoded stream, like compression method, quality, bitrate etc. are just contained in the stream itself. For encoder one can expect an application (or user via application GUI) will be able to specify those parameters. To achieve this, a Reggae encoder (and maybe multiplexer) class must be able to describe itself (describe possible encoding parameters) to an application. The ideal solution will allow to handle even encoders unknown at the time of application building. An API for this must be carefully designed, as encoding parameters vary in their types. Some of them are choices, some are continuous values from a range, also a parameter can depend on another one. Describing parameters and their dependencies for example for MPEG Audio encoder is surprisingly complicated. Two solutions emerge from discussions. An encoder class can use some metalanguage to describe encoding parameters and their dependencies, or alternatively encoder can just deliver a code creating GUI component embeddable in an application (more technically it will deliver MUI Gruop object). The second soultion is easier to implement (there were some succesfull experiments) and more flexible (even weirdest parameters dependencies can be coded down). The disadvantage is making Reggae dependent on specific GUI toolkit, but as MUI is integral part of MorphOS, it does not seem to be a real problem.
After programming
Every programmer needs some rest after sleepless nights of bug hunting. To relax myself I build a custom case for my Efika. I've seen some Efika DIY cases, but most of them do not look good because of one fundamental mistake - when you make something at home, with simple tools, do not use industrial materials and technologies. That is why my case is made of laminated chipboard, which is quite unusual material for computer case, but has a few advantages. The first one is giving a furniture like look. I do not want my Efika to look like a computer ;-). Secondly, chipboard is good at sound attenuation. My Efika is fanless, so very quiet, but HDD emits some noise, my case will made it almost unhearable. And last but not least, chipboard is easy for tooling. On the picture you can see ready sheets of 10 mm chipboard with yet unfinished edges. I plan to finish and assemble them this week.
Another unusual material is used for mounting board and backplate. You may expect a metal plate here, but again, it is not DIY-friendly material (especially steel sheets). On my pictures it looks like I've used a copper plate, but don't be fooled, it is just copper covered glass-epoxide laminate, a common material for making printed circuit boards. I will paint it in black later, as copper gets oxygenated and looks dirty. The laminate is very strong, yet making holes of any shape in it is very easy (important for the backplate, lots of holes for all these connectors and plugs...).

The chassis is designed to be a single self-contained unit, which will be slided into the chipboard box with guides made of aluminium profiles, then secured in place with two screws on the back. Then I avoid another amateur projects mistake - where a device is assembled in a way making further disassembling, or parts exchanging almost impossible ;-). My design makes for example exchange of graphics card as easy as in a typical PC casing.
The final thing will be a front plate made of black plexi with only two LED-s and two buttons on it. I like clean designs :-). Below my MorphOS devstation at work :-)
And the last photo - teleinfo.pb.edu.pl server. Of course Efika too. Just a new meaning for a word "server" :-).
Expect more photos soon. By the way, all photos here have been processed on Efika using ShowGirls, an excellent image viewer and processor for MorphOS, written by Michal Wozniak.
|
|
|
|
|
|
|
|
|
|
|
|
First 3-rd party Reggae classes
posted by Grzegorz Kraszewski on 21st November 2007
Michal Zukowski finished a set of 4 classes (two demuxers, two decoders) for decoding IFF ILBM and IFF DEEP formats. Available for download at Reggae home page.
|
|
|
|
|
|