Its like everything is stripped from the ICS base except the ICS portion and the kernel. This isn't exactly easy which is why some ports have their original Phone.apk and Camera.apk, since there integrated so well into the system.
Patchrom (The overlay project), then lays decompiled java code (which is smali) into the files of the decompiled ICS base. This merge becomes MIUI (a very buggy MIUI), which is why every week Patchrom devices (Honor, SGS2, Arc S, One X, Sensation) have bugs that the source built ROMs don't.
Patchrom is coming along though. Its not the same project they released 6 months ago, its proving to be easier and more stable. If a bug exists in the core ICS base (EX: Video not working), that won't work in the MIUI build, unless they aimed to fix it (which is outside of the MIUI overlay)
There is no DHD ICS port with video camera recording working, which is why all MIUI v4 DHD ports have no video camera working. Your only as strong as your base. So if a manufacturer releases ICS to a device, it makes it easier to give MIUI to it. (Unless its a highly modified version of ICS, like HTC Sense or Samsung Touchwiz). Pure ICS = Better. Which is why Google phones get MIUI so easily.