Same problem with r6435. Slow encoding on Mac OS 10.11.6, MinGW 5.3, MinGW 7.3 (x64). Configure doesn't add optimization flags for gcc. I've set them manually: export CFLAGS ="-O3 -ffast-math -funroll-loops -Wall" and started configure again. And result is excellent. Encoding speed is 3x faster.