If you’re going to be doing any reencoding, particularly for color alterations, it’s always going to be a better idea to convert it to a lossless (or near-lossless) codec first. H264 is… not that.
I recommend Lagarith personally, though I’ve zero experience working with it in any resolution greater than 1080p, and even that does require fairly large file sizes.
Resolve won’t open AVI files. (though it will let you encode them). Strange but true.