I don't think anything special was made for XviD (as I made the first hack to allow YV12). The code is somewhere in
Dup.cpp
(Search for YV12 - skip the overlay things - actually I don't know why vdubmod doesn't attempt YV12 overlay, but nevermind that).
Even though the comments state that it attempts "UYVY" first this isn't the case when you look at the actual code.