Archive for the 'Uncategorized' Category

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 14 Mar 2010

Some help needed

Device lost
A very useful window.

Ok, I’m stuck. I’m trying to implement toggling between windowed mode and exclusive mode full-screen on a 2 monitor setup. It works – almost. This is how it doesn’t work (for more detailed player settings see below):

  1. Start the player
  2. Move the window to the secondary monitor
  3. Start a movie
  4. Double-click to go into full-screen (see to it that the option D3D Fullscreen is checked)
  5. Double-click to go back into windowed mode
  6. The video freezes but audio goes on playing. Trace output says that the device is lost even though it should be a windowed device
  7. Double-click again to go into full-screen
  8. And double-click one more time to go back to windowed
  9. Now, if your computer behaves like my two XP machines, the video plays and subsequent toggles work

Toggling between windowed and exclusive mode full-screen works fine on my primary monitor. Once it has started working on the secondary monitor (and this is the really weird part) it keeps on working even if playback is closed and then restarted. It seems as if either the player or the gfx board stores some useful data enabling it to work the second time. Everything works fine if windowed (non-D3D) full-screen is used.

Not everything is implemented yet so the above experiment only works with the following MPC-HC settings:

  • Windows XP
  • 2 monitors
  • EVR Sync
  • D3D Fullscreen
  • Reinitialize when changing display
  • Fullscreen monitor: Current
  • Use worker thread to construct the filter graph: Unchecked

If anybody would like to help out with some interesting debugging, you can find the modified files here. They are updated with trunk revision 1752.

Published by Arto Jarvinen on 13 Sep 2009

Waiting for a break…

New HTPC
A new HTPC in pieces. Quad-core Intel for effortless CPU decoding and a nice cabinet. I’ll keep my old 7000-series NVidia board as it is supported by PowerStrip. It will run Windows 7 which will enable me to test the GothSync code on several platforms. Everything tends to work too well on XP! Now I only need a break from work so that I can put it all together.

Published by Arto Jarvinen on 06 Apr 2009

Renderer running wild – sometimes

As long as the display frequency is close to an even multiple of the framerate of the incoming video, the nudges to the reference clock in the new synchronization algorithm described a couple of posts ago can be very small. Sound, video and the display stay in sync.

I tried to adjust the framerate of the video from 25 fps to 24 fps by adjusting the reference clock, a 4% change in rate. This caused the audio to get ahead of the video, i.e. the audio renderer ignored the adjusted rate. But when I speeded up a 23.976 fps movie to 24 fps for display on a 48 Hz screen, a 0.1 % increase in rate, the audio stayed in sync even after two hours into the movie. If the audio renderer had run totally independently, the audio should have lagged about 1 second after 1000 seconds of movie, or so I gather. So maybe the audio renderer does some rate matching after all. I’m a bit confused at the moment and very eager to carry out more experiments. That something works is good. If you know why it works then it is even better.

Published by Arto Jarvinen on 06 Apr 2009

One data point

I let the GothPlayer play an almost 2h long movie from an m2ts file with the new synchronization mechanism (tuning of the incoming stream speed, see the previous post). The movie fps was 23.976 and the display refresh rate was set to 47.95 with PowerStrip (this LCD genuinely synchronizes to 47.95, instead of faking it as some other displays seem to do). The movie resolution was 1920 x 1080 and the display had a 1280 by 720 resolution. The scaling was performed by the video renderer.

The time between the arrival of the sample to the video renderer and the actual vsync stayed between 7.3 and 11.1 ms (the desired value was 10 ms in this case) which means that as long as the graphics board did it’s job, displaying what was gently thrown at it, there should have been no skipped or duplicated frames (I didn’t watch the whole movie – I’ll save that to later). There was no loss of synchronization between video and sound. The player corrected the speed of the video stream 168 times during that time. Filters used:

  • Haali Media Splitter
  • VMVideo Decoder DMO
  • SyncVMR9 custom video renderer
  • SyncClock custom reference clock filter
  • AC3 Filter audio decoder
  • Default DirectSound Device audio renderer (from quartz.dll)

There is a Swedish saying that goes something like “one fly does not make a summer”. The same goes for data points. But it’s a start.