a bad AVI file will make a bad MKV file.
It also depends on what resolution you are trying to achieve with the conversion process.
It will not make an SD AVI file into an HD MKV file. Attempting to do that will result in a very bad image as there is not enough data available to increase the resolution.
Good rule of thumb is to know that the converted file will not be any better than the original