A cold water pre-wash w/ baking soda will normally eliminate ammonia/urine odor. If you have a toploader, you can use anywhere from 1/4 to 1/2 cup baking soda. For a frontloader, 1/16 to 1/8 cup should do. You can tell if you used too much baking soda, because fabrics will come out a little stiff and/or rough feeling after washing. Usually an extra rinse will take care of that. Too much baking or detergent can also be neutralized w/ a very small amount white vinegar in the rinse. If you use vinegar w/ dipes tho, do be careful not to use too much or too frequent because you can make the smell problem worse.
To keep urine odor (ammonia smell) from coming back or building up, regularly put a little baking soda in your cold water pre-wash about every 2-3 times you wash the diapers. If you do that, you should only need to use the smaller end of the measurement scale referenced above.
hth!
