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.

Published by Arto Jarvinen on 05 Apr 2010

Easter experiments

ATI update
A messy update.

It’s been a four-day Easter weekend in Sweden. There’s been time to go running, riding, to clean the house and to play around with some new stuff. I decided to give Voddler a second chance after the epic failure to even connect to their server when I first tried it (see Voddler woes). Also, a friend hinted about XBMC, a media center software that was the basis of the early Voddler clients (they have recently migrated to Adobe Air for their video streaming instead) so I thought I should give that piece of software a spin as well. Said and done.

The Voddler web site strongly recommended an update of the graphics drivers. I was a bit hesitant since the last update resulted in total blackness that was only repaired after I replaced the graphics board (see this post).

This time I was a bit more lucky but the upgrade wasn’t entirely uneventful. My resolutions, display order and desktop configuration were all messed up after the upgrade (see screen-shot). It seems that it would take just about the same effort to keep the settings as to change them but I may be wrong.

Back to Voddler and XBMC. I will write more about both later but initially I was quite impressed with XBMC. It has a very slick user interface that on my XP starts in exclusive mode full-screen meaning that tearing is not a problem. It seems to play formats such as VC-1 and AVCHD with its built in decoders. And it ran equally well on Windows XP as on Linux (Ubuntu 8.04) which is very impressive. Looking under the hood I even found a sync algorithm that is equivalent to Sync video to display in MPC-HC, with or without resampling of the sound. (I will probably hang on to the GothSync code just a little while more though. Synchronizing the display to the video is after all the optimal kind of sync – whenever the hardware supports it.)

This time Voddler actually connected to the server immediately. Maybe they have changed the protocol or something. After my last attempt there were hundreds of frustrated users like me on the Voddler forum not being able to get through. I was even able to play a movie with decent resolution and without glitches. In windowed mode that is. As soon as I set it to full-screen it started to judder in a very unpleasant way. I couldn’t find any settings that might affect it. I will run some tests on the Windows 7 machine later to see if the same issue is present there too. Unfortunately tomorrow is a work day so the play will have to wait a while.

Published by Arto Jarvinen on 04 Apr 2010

The return of the Goth

I need a break from MPC-HC. If you’ve read some of my earlier posts you probably understand why. The full-screen toggling code kind of works but there are a couple of open DXVA-related bugs that I just can’t find. I suspect that there is something that I don’t understand about the DXVA2 support code and the DXVA decoder. The decoder grabs a whole bunch of interfaces to the DirectX device that I don’t know how to release. Having looked at the same part of the code for so many hours, a break is the only way to get a pair of fresh eyes and a somewhat fresher brain.

So I decided to see if I could still compile my old GothPlayer. Lo and behold: I set the correct references to the base classes, migrated to Visual Studio 2008 and it all worked again. I even found a bug in the full-screen toggling code that has probably been there for ages. The new version (including source code) is available through the GothPlayer download page.

I also recently learned that the tearing problem is really solved by Aero in Windows 7. Since there is a fair chance that people will soon enough migrate to Windows 7 from XP on their HTPCs (I did already), I don’t really see the point in putting too much effort into getting EVR to work on XP. The VMR9-based SyncVMR9 renderer that I use in GothPlayer works well enough for me and provides DXVA1 on XP.

SyncVMR9 is a stand-alone DirectShow filter with many of the VMR9 interfaces exposed and with one special interface, ISyncVMR9, for controlling the renderer. I’ll try to clean up the interface to a bare minimum and then see if it is possible to do the same trick (COM aggregation) with EVR for Windows 7. That way the synchonizing renderers could be used in any player that agrees to manage the renderer according to the protocol that comes with the custom interface.

Published by Arto Jarvinen on 03 Apr 2010

Issues with automatic deinterlacing mode

Automatic deinterlacing
Automatic deinterlacing. A similar graph is obtained with vector adaptive interlacing.
Motion adaptive
Motion adaptive deinterlacing.

DXVA2 kicks in on my XP machine when using the CyberLink Video/SP Decoder with MPC-HC. (This is not 100% consistent though and I haven’t been able to figure out exactly why.) With VMR9, DXVA1 is always activated.

The CyberLink decoders are nice in the sense that they do frame-doubling when presented interlaced content. This works wonders when playing e.g. interlaced AVCHD movies from my Sony Handycam. The motion is truly fluid as I have written about earlier.

When using any of the EVR-based renderers with the Video/SP decoder, I have found out that with my ATI board “automatic” or “vector adaptive” deinterlacing seriously messes up the video – display sync algorithms. “Motion adaptive” interlacing works fine though.

I have had similar issues with the NVidia PureVideo decoder with which I couldn’t use the automatic deinterlacing mode. With the NVidia I finally was able to figure out that with automatic deinterlacing it produced an uneven frame-rate which jumped between 25 fps and 50 fps which doesn’t agree with the synchronization algorithm that expects an even frame rate. Perhaps the CyberLink decoder is doing something similar.

Published by Arto Jarvinen on 02 Apr 2010

Test version available

There is a test version of MPC-HC available through the download page.

This test version is only intended to work under the following circumstances:

  • EVR Sync
  • Reinitialize when changing display: Checked
  • Use worker thread to construct the filter graph: Unchecked

It has the following features and peculiarities:

  • You can toggle between windowed mode and exclusive mode (D3D) full-screen without restart.
  • Does not work with DXVA.
  • If something other than Current is selected as full-screen display, then the DirectX device is created for that display meaning that there may be sync issues (judder) in windowed mode.
  • Multi-screen on W7 doesn’t work 100%. I suspect driver issues though. I get random pixels coming on and off like noise with certain resolutions.

There is probably a ton of other problems that I would love to have feedback on. I’m not entirely sure if this is the right approach for full-screen toggling. I still haven’t been able to hunt down the last references that hold the DirectX device. Even if things seem to work on my XP machine, I’m not satisfied with having outstanding references.

Next »