Download Pocket DivX Encoder, and excellent freeware program designed to convert avi etc to divx and also allows you too change resolution, brightness/saturation etc. http://divx.ppccool.com/ Enjoy!
If anything the quality is going to go down. You can't just pull extra quality out of thin air. You can increase sharpness (will also enhance noise), remove artifacts (will also remove some details), change brightness, etc. however you aren't really going to get better quality, especially when compressing to a lossy format.