First you need to download media player classic. Download from here:
I personally prefer Media Player Classic Home Cinema version. After you have install it (actually unzip it in a directory in your programs), download ffdshow codecs / filters from here:
Install it and open FFDShow > Video Decoder Configuration. Now make the following changes:
Codecs: Make sure you have libavcodec for Xvid, Divx 3/4/5/6 and Other MPeg4. You can enable it for H.264/ AVC codec also, but I personally prefer a standalone codec for this type of HD content.
Postprocessing: Make sure you have the following options:
Resize & Aspect: Make sure you have the following options. Here you can specify a custom size, for example 720p (1280×720) or 1080p (1920×1080). For 1080p you'll need a dual core processor at least, so try a resolution of 1280×720 or 2x multiply option first.
Make sure you have Lanczos for Luma and Chroma method and all the following options for settings:
Sharpen: Choose the following options:
If you have a powerful processor (4 cores recommended) you can enable warpsharp with the following options:
Output: Choose the following for output:
Now open media player classic / options and choose the following for output tab:
Make sure that Divx / Xvid are not enabled in internal filters.
That's it! Now you can enjoy your divx/xvid content almost in HD quality…
Thanks to Geomantis for his help and testing the best options in ffdshow.