Current version

v1.10.4 (stable)

Navigation

Main page
Archived news
Downloads
Documentation
   Capture
   Compiling
   Processing
   Crashes
Features
Filters
Plugin SDK
Knowledge base
Donate
Contact info
Forum
 
Other projects
   Altirra

Search

Calendar

« September 2014
S M T W T F S
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        

Archives

01 Aug - 31 Aug 2013
01 May - 31 May 2013
01 Mar - 31 Mar 2013
01 Feb - 29 Feb 2013
01 Dec - 31 Dec 2012
01 Nov - 30 Nov 2012
01 Oct - 31 Oct 2012
01 Sep - 30 Sep 2012
01 Aug - 31 Aug 2012
01 June - 30 June 2012
01 May - 31 May 2012
01 Apr - 30 Apr 2012
01 Dec - 31 Dec 2011
01 Nov - 30 Nov 2011
01 Oct - 31 Oct 2011
01 Sep - 30 Sep 2011
01 Aug - 31 Aug 2011
01 Jul - 31 Jul 2011
01 June - 30 June 2011
01 May - 31 May 2011
01 Apr - 30 Apr 2011
01 Mar - 31 Mar 2011
01 Feb - 29 Feb 2011
01 Jan - 31 Jan 2011
01 Dec - 31 Dec 2010
01 Nov - 30 Nov 2010
01 Oct - 31 Oct 2010
01 Sep - 30 Sep 2010
01 Aug - 31 Aug 2010
01 Jul - 31 Jul 2010
01 June - 30 June 2010
01 May - 31 May 2010
01 Apr - 30 Apr 2010
01 Mar - 31 Mar 2010
01 Feb - 29 Feb 2010
01 Jan - 31 Jan 2010
01 Dec - 31 Dec 2009
01 Nov - 30 Nov 2009
01 Oct - 31 Oct 2009
01 Sep - 30 Sep 2009
01 Aug - 31 Aug 2009
01 Jul - 31 Jul 2009
01 June - 30 June 2009
01 May - 31 May 2009
01 Apr - 30 Apr 2009
01 Mar - 31 Mar 2009
01 Feb - 29 Feb 2009
01 Jan - 31 Jan 2009
01 Dec - 31 Dec 2008
01 Nov - 30 Nov 2008
01 Oct - 31 Oct 2008
01 Sep - 30 Sep 2008
01 Aug - 31 Aug 2008
01 Jul - 31 Jul 2008
01 June - 30 June 2008
01 May - 31 May 2008
01 Apr - 30 Apr 2008
01 Mar - 31 Mar 2008
01 Feb - 29 Feb 2008
01 Jan - 31 Jan 2008
01 Dec - 31 Dec 2007
01 Nov - 30 Nov 2007
01 Oct - 31 Oct 2007
01 Sep - 30 Sep 2007
01 Aug - 31 Aug 2007
01 Jul - 31 Jul 2007
01 June - 30 June 2007
01 May - 31 May 2007
01 Apr - 30 Apr 2007
01 Mar - 31 Mar 2007
01 Feb - 29 Feb 2007
01 Jan - 31 Jan 2007
01 Dec - 31 Dec 2006
01 Nov - 30 Nov 2006
01 Oct - 31 Oct 2006
01 Sep - 30 Sep 2006
01 Aug - 31 Aug 2006
01 Jul - 31 Jul 2006
01 June - 30 June 2006
01 May - 31 May 2006
01 Apr - 30 Apr 2006
01 Mar - 31 Mar 2006
01 Feb - 29 Feb 2006
01 Jan - 31 Jan 2006
01 Dec - 31 Dec 2005
01 Nov - 30 Nov 2005
01 Oct - 31 Oct 2005
01 Sep - 30 Sep 2005
01 Aug - 31 Aug 2005
01 Jul - 31 Jul 2005
01 June - 30 June 2005
01 May - 31 May 2005
01 Apr - 30 Apr 2005
01 Mar - 31 Mar 2005
01 Feb - 29 Feb 2005
01 Jan - 31 Jan 2005
01 Dec - 31 Dec 2004
01 Nov - 30 Nov 2004
01 Oct - 31 Oct 2004
01 Sep - 30 Sep 2004
01 Aug - 31 Aug 2004

Stuff

Powered by Pivot  
XML: RSS feed 
XML: Atom feed 

§ VirtualDub's accelerator keys

VirtualDub has a number of keyboard shortcuts bound to its menu commands. Two of these are F5 (Preview) and F7 (Save as AVI).

Where did these shortcuts come from? No, I don't play darts.

They're the shortcuts for Run (F5) and Build (F7) in Microsoft Visual C++ 6.0. I got so used to those shortcuts during VirtualDub's early development that I naturally used them for my app as well. To the utter confusion of normal users, of course.

(Read more....)

§ AMD64 and frustrations of an assembly language programmer

I recently discovered a bug in current versions of VirtualDub that manifests itself as occasionally massive audio sync errors when working with large frame start offsets, at least frame 60000 or so. It is caused by an overflow in the fraction scaling routines, which are used to compute the audio offset since AVI sample rates are 32:32 rational fractions. Whether or not you hit this bug depends on how reduced the fraction is in the AVI file; most files have small numbers here and thus the bug requires a very large frame offset, but it is rarely possible to encounter it in a 1hr+ file if you have a really large or unnormalized fraction. This is being fixed for the future 1.6.6 version by adding 96-bit intermediate arithmetic. What is annoying, however, is that the lack of both sufficient intrinsics and inline assembly support in the AMD64 compiler forces a rather silly assembly language function:

VDFractionScale64 proc public
    mov  rax, rcx
    mul  rdx
    div  r8
    mov  [r9], edx
    ret
VDFractionScale64 endp

For some reason, the VS2005 compiler for AMD64 has intrinsics to do 128-bit multiply and shift operations, but no add, subtract, or divide operations. Gee, thanks.

On the good side, the AMD64-compatible version of the Platform SDK is out for public download!

http://www.microsoft.com/downloads/details.aspx?FamilyID=d8eecd75-1fc4-49e5-bc66-9da2b03d9b92&DisplayLang=en
(Read more....)

§ Compiler intrinsics, revisited

I received an email recently from a member of the Microsoft Visual C++ compiler team who is working on the AMD64 compiler, regarding my comments about intrinsics support in the VC++ compiler. Given my past feedback on this blog and in the MSDN Product Feedback Center on the quality of the intrinsics in VC++, one of two possibilities was possible:

Fortunately, the team member turned out to be a nice guy and informed me that intrinsics support had indeed been improved in Whidbey.

To review, compiler intrinsics are psuedo-functions that expose CPU functionality that doesn't fit well into C/C++ constructs. Simple operations like add and subtract map nicely to + and -, but four-way-packed-multiply-signed-and-add-pairs doesn't. Instead, the compiler exposes a __m64 type and _m_pmaddwd() psuedo-function that you can use. In theory, you get the power and speed of specialized CPU primitives, with some of the portability benefits of using C/C++ over straight assembly language. The problem in the past was that Visual Studio .NET 2003 and earlier generated poor code for these primitives that was either incorrect or slower than which could be written straight in assembly language with moderate effort.

(Read more....)

§ Pitch shifting

I have a lot of miscellaneous junk lying around my hard drive's projwin directory, which is where I keep most of my VC++ projects. A quick glance:

All very unfinished, of course.

One pair of projects that I've hacked on sporadically is an MP3 player with a spectrum analyzer and a WinAmp plugin, which share a simple audio processing library in common. I've experimented with a few audio effects with these; most of them were failures, particularly all of my attempts at reverb. I did have some mild success with some frequency-based algorithms, namely the "center cut" filter that is now in VirtualDub.

A filter that I've been trying to get working well for some time is a pitch shifter. VirtualDub has an experimental one, the "ratty pitch shifter," but as you might guess it's not very good. I recently found an algorithm that works better, though.

(Read more....)

§ VirtualDub 1.6.5 released

VirtualDub 1.6.5 is out. I actually had this ready on Friday, but April 1st is not a good day to release software. It's a good thing too since a couple of bugs got fixed between then and today. The 1.6 branch is getting closer to stable and as such most of the changes are bug fixes, although a few new features snuck in there.

One new feature that I hadn't originally planned to add was significantly expanded support for automation; I worked a bit on this after talking with someone who was having difficulty automating video processing in a build pipeline. As a result, 1.6.5 introduces two new executables, vdub.exe and vdub64.exe that are used for command-line operation.

(Read more....)