I'm getting about 1150 h/s on R 1700 using aes-avx2. Limit the threads to number of cores and set up cpu-affinity to use all the cores and not just the first ones.
"set up cpu-affinity" How do it ?

cpuminer-aes-avx2.exe -t 6 - again ~ 600 h\s and use first 6 threads, not cores
I use --cpu-affinity AAAA, it converts from hex to binary as 1010 1010 1010 1010. 8 threads spread across 4 cores. For Ryzen 5, try AAA.