Published by Arto Jarvinen on 28 Dec 2011

CUDA in Eclipse

Having used VisualStudio for all the video programming described earlier on this site, I have realized the benefits of a good integrated development environment. Since I’ve used Eclipse for other stuff and it has the very attractive feature of being entirely free, I started looking for ways to set it up with CUDA. I found the excellent blog post [1]. It worked out of the box. (I still haven’t got used to the new Ubuntu GUI though.)

I used the simple vector addition program as a starting point for my experiments; I simply copied it and called it test. Time to play around a bit…

CUDA hello world
Hello CUDA!.

Links

[1] Setting up Eclipse for CUDA

Published by Arto Jarvinen on 26 Dec 2011

Not sure where this is going but anyway…

It’s Christmas time with some time to spend on things not necessarily useful. So I decided to install CUDA on my Ubuntu machine. CUDA is a framework for parallel computing on NVidia’s graphics boards. I’m not at all sure what I want to use it for but it’s been widely used for image processing so there might be a connection to some of my old work described elsewhere on this blog.

I started out with Ubuntu 10.04 which was too old for CUDA so I started an upgrade project. I went to 10.10 which was the first one supported by the current version of CUDA (4.0). The installation instructions recommended to upgrade the NVidia driver which didn’t go at all well. I ended up with no GUI at all. After some detours I managed to restore the original driver and gave up the effort to manually install a driver. Instead I continued the Ubuntu upgrade path hoping that newer releases had newer drivers. I ended up with 11.10.

Then I followed the instructions in this post. I still got linker errors. It seemed as if the LINKFLAGS modification didn’t have any effect. Instead I did:

export LD_LIBRARY_PATH=/usr/lib/nvidia-current:$LD_LIBRARY_PATH

After that everything compiled and linked, albeit with a plethora of warnings from the compiler. I ran the deviceQuery application and got the coveted “PASSED”.

Published by Arto Jarvinen on 09 Dec 2010

Is a stand-alone blu-ray player judder-free?

Having watched a few movies with the new blu-ray player, I find the image quality acceptable. It does a competent 2:3 pulldown of 24 fps material for my old projector that can’t handle 24 fps natively but this is of course not a long-term solution for my judder-sensitive eyes (although some critics say they actually prefer the pulldown variety of judder before the 24 fps native judder – I have written about that arcane fps in an earlier post). I have spent countless hours watching smooth and not so smooth test patterns on my computer and I claim I can spot a skipped or duplicated frame when I see one (well, I of course can’t see the skipped frame but you get the picture… frame).

I visited Lefflers, my local dealer, to watch some new 24 fps capable projectors. There’s been a lot of development since I purchased my current projector, mostly with the dynamic range. What disappointed me though was that the dealer told me that there will be the occasional judder from a blu-ray player too and that an HTPC was actually better in this respect (with the right software such as XBMC or MPC-HC). I can envision two potential sources for this judder, of which I believe I saw the first.

  1. Poor encoding of the blu-ray material. I don’t know how this is even technically possible but the scene from the Return of the King when Faramir rides into Minas Tirith looked awful with a lot of judder. It should be pretty straight-forward to encode 24 fps original material into 24 fps mp4. We watched the scene with two different projectors with the same results (the same player though).
  2. The other source could be, and now I’m extrapolating from what I’ve seen on the computer and my satellite TV box, that the player doesn’t even try to sync the outgoing video to the video on the disc, i.e. it is just as bad as the average computer.

If reason #2 turns out to be real, and I’ll be watching my movies very carefully, then I’ll throw myself back into one of the open source projects again to see if I can improve and generalize my algorithms.

Published by Arto Jarvinen on 03 Nov 2010

Going mainstream

I today ordered a Samsung BD-C6900 bluray player. It is supposed to be able to play video right off my network including WMV9, MKV and AVCHD which was one of the buying criteria. It also comes with 3D although I don’t expect to buy a 3D display any time soon. The price was a relatively modest SEK 2400, less than a half-decent graphics board for the PC.

I got tired of not having any bluray navigator in my HTPC-based media players (XBMC, MPC-HC) and I don’t have the stamina to join yet another open source project (the one working on the said navigator). It sucks that these interfaces are proprietary but that’s that dark side of capitalism that comes with the good.

I guess I now need to get a 24 fps capable projector also which will increase the total cost by a factor of 10 but why fight the inevitable?

Published by Arto Jarvinen on 23 Jul 2010

Set-top box judder

Some time ago I briefly met a few engineers at a leading digital TV company and took the opportunity to ask them about my favorite topic, how they avoid sync problems in their set-top boxes (see many of my previous posts). It turned out that I had a hard time even explaining the issue to them and I realized that this is not something they think about a lot. Of course they use standard HDMI transmitters for the video output and are probably happy with whatever comes out. So I never really got an answer and I haven’t been able to find any through Google ever since. (And I’m not sure if Broadcom and the likes are interested in answering random questions without promises of future cash flow so I haven’t bothered to try.)

What I do know for a fact is that my own set-top box exhibits serious pan judder from time to time. I’m not sure about the exact source of this judder but since there aren’t any other artifacts in the picture, I suspect that it is the same old culprit as in the case of PCs, that the HDMI output isn’t synchronized to the incoming video from the satellite. Anyone out there working on HDMI transmitters who could enlighten me a bit about their inner workings?

Published by Arto Jarvinen on 19 Jul 2010

Updates, updates, updates

I know I’m a bit of a nag but I do find the updates that I wrote about in my previous post both annoying and a bit amusing. Now I’m on vacation so this particular instance was perhaps more amusing than annoying.

I was happily eating my light lunch and watching a program from SVT Play (the Swedish Public Television on-line program archive) in full-screen mode. All of a sudden Firefox exits full-screen because it seems to think it is a wonderful time to offer me to update the application. And it actually looks like Windows 7 takes the opportunity to throw some updates at me while it has my attention. Imagine if my car did that while I was overtaking a truck. Of if I needed to make an urgent call with my cell phone and it started updating an application and asked me to kindly wait. Like Frankie Goes to Hollywood puts it: there’s gotta be a better way! (Like making the applications safe in the first place.)

More updates
Bad timing. I was watching an interview with Ian Gillan.

Published by Arto Jarvinen on 25 Jun 2010

No value added

Update
Welcome to my HTPC!

I installed Windows 7 on my new HTPC since XP seems to be singing it’s last verse. The sad thing is that I totally fail to see the value of the upgrade. It actually made things worse:

  • Once I get video to play, the video quality is no better than on XP. The built-in decoder DMOs seem to have timing issues too increasing the risk for stutter.
  • I can no longer choose filters for my GothPlayer using the merit system (or any other system for that matter) and sound doesn’t work with some video formats (e.g. AVCHD). There is an open source utility for selecting filters that works so and so but Microsoft has decided to force its users to use its own filters.
  • Many of the default update rules actually wake up the computer from sleep and don’t shut it down again. I have found the computer humming many mornings. It’s been a pain to go though all the scheduled tasks to try to find what’s waking up my computer.
  • I might be imagining but there are a lot of updates. So typically when I fire up the computer to watch a movie I end up baby-sitting an update instead and that update invariably eventually wants to restart my computer.

I start losing my faith in the whole concept of an HTPC. I feel patronized by all the stuff that I must do just be able to play some movies with the apps and decoders of my choice. And I feel cheated having paid positive money for a W7 license in exchange for negative value. Maybe I’m just a grumpy old man but I’m off to scan the market for a good Blu-ray player with its software in a ROM.

Links

I’m not alone complaining about the missing filter merit system. See for instance this post.

Published by Arto Jarvinen on 09 May 2010

Regrouping for a while

I started out my professional career in digital image processing working on the GOP image processing computer. At that time (mid 1980′s) we wired together our computer out of discreet ALUs, multipliers, comparators, program counters and so forth to get the kind of performance required for the fairly complex algorithms. The concepts have been developed further and are today quite successful for enhancing medical images etc. [1]

I left the image processing lab and eventually strayed into management consultancy. One of my old pals from the university wrote me an email some time after that asking what I was up to and I explained that I worked with quality issues, strategy, organizational development and other similar things. The reply that I got back contained a single word followed by an exclamation mark: “perverse!”

I’m going to regroup for a while and focus on that perverse area, in particular the problem of modeling organizations with a formal language. I will probably write about it on my other blog (I would guess that the union of the sets of people interested in both areas is very close to the null set though). I have in the mean time purchased a very expensive book on video quality which I hope will come to good use when I return to the digital video domain. Cheers for a while!

Links

[1] Introduction to the the General Operator Processor

Note

According to Dictionary.com “perverse” means “turned away from or rejecting what is right, good, or proper; wicked or corrupt”.

Published by Arto Jarvinen on 23 Apr 2010

Voddler revisited

I think I got the Swedish movie on demand service Voddler to work for a short while on one of my computers since my last post on this topic. Today I tried it on my HTPC. I get two green check-marks when starting up Voddler. Then it hangs for at least five minutes setting up one thing or another. I get impatient and I click around a bit and hit the “force playback” option. I get about 10 opportunities to accept the license agreement for the Adobe player. I see the start of a jerky commercial. And then some more license agreements. I think I prefer the GNU licence of the previous client. I give up again. Perhaps I will give it yet another try in a few months’ time.

I use SVT Play, the Swedish public service channel’s Internet service, quite often to catch up with some of my favorite TV shows. The user Interface is excellent. You point at a show in a nice looking browser, you click and the video starts playing right there in Firefox. Usually I get interrupt-free playback and reasonable video quality. The encoding is a little leaner than that of Voddler but that’s the only difference I think.

How hard can it be?

Published by Arto Jarvinen on 11 Apr 2010

Where to go from here?

I cleaned up the GothPlayer code and built both a 32-bit and a 64-bit version (they can be downloaded through the GothPlayer download page). If nothing else, it’s a nice test rig for filters and renderers. And TV looks much better with GothPlayer than with the TerraTec media player that came with the TV card (there you have some serious judder).

I’m slowly reading up on, and testing Windows 7 and Media Foundation. It seems that GothPlayer doesn’t behave at all the same on Windows 7 as on Windows XP. The merit system from XP doesn’t work and even if I manually add ffdshow decoders to the graph before rendering a media file, they don’t end up in the running graph. To add insult to injury, neither my debug console code nor graphedt seem to work under Windows 7. The console doesn’t turn up at all and graphedt doesn’t find the graph from the running GothPlayer. It’s like somebody would have anticipated all my moves to understand what’s happening and made sure none of them would work. Another Microsoft trick to force me to an upgrade that ultimately will add very little to my movie watching experience I’m afraid. And Spotify has stopped working on Ubuntu after a recent “upgrade” so that’s not an option either.

I have still not decided which way to go with further development. It’s fun to code but I need a goal too. The question is what the “unique selling point” of yet another player would be. MPC-HC has a lot of nice features but some of the code is just too time consuming to understand and debug (for me at least, not being a professional programmer). I think I should probably spend some more time evaluating the “competition” first.

Next »