19" Riot is only as large as the medium Merida 96, for example
compare reach, FC, wheelbase for yourself: https://www.merida-bikes.com/en/bike/1984/ninety-six-rc-9000?spm=a2700.12243863.0.0.38403e5fbrCKPv#w1
it would probably be fine for me at 178cm, with some 50mm stem (I ride a 430mm reach frame with 80mm stem currently)
TLDR below. Summary: I'm the same height, but I think I'd go for the 17.5, though both would work.
I've been browsing this forum for a couple months, and this is the frame that looks the best to me. I'm also 178cm, but I might go for the 17.5". The LCFS911 looks good too, but I'm more in between sizes on that one, preferring not an excessive reach.
I have had two mountain bikes, a 1993 Stumpjumper hardtail since new that is my current ride, and a 2015 29er Stumpjumper Elite M5 that was stolen late last year. My '93 Stumpjumper is surprisingly feeling really good with my current setup after messing with spacers, stems, and bars (and saddle slammed forward on straight post) since a large fork length increase after a swap. It fits and rides better than it ever has (came with 130 stem back in the day, and couldn't avoid a huge bar drop). I learned about the RAD fit theory last week, and it turns out my body measurement RAD of 790mm happens to be exactly the same as the 790mm bike RAD that was my final result after trial and error fitting by feel. That it feels right kind of validates the RAD theory for me, since I arrived at the same fit on my own before even hearing about RAD.
My stolen 2015 bike was a 19" that had a 437mm reach and a 70mm stem after trying some different stems, suggesting that the 19 frame here would work well with a 60mm stem for me. Although I didn't feel too stretched out on my 2015 hardtail, the extra reach to the bars (greater than RAD fit) meant that I did have a really hard time getting the front wheel up to practice manuals/wheelies/hops and things like that. I ride XC style, but don't currently race. My liking both fits, with a reach+stem difference of 25mm(!), for most riding shows how adaptable riders can be. But since I don't feel cramped or have difficulty at all with the RAD fit, even on the steepest climbs, I think I would choose that fit for my next XC style bike for the other benefits, even though I know most XC pros go longer.
Playing around in CAD, and I can duplicate the RAD fit of my '93 bike (including the angle of the RAD diagonal) with the 17.5 frame and a 50mm +6deg stem on a 10mm spacer, with the option of going lower and longer with a different stem if I want the XC racer fit (longer stem not at all out of place on XC pros bikes after all). The 19 frame would also work, but the seat tube is quite a bit taller. I had an issue with my legs rubbing the top tube when out of the saddle pedaling on my 19" 2015 bike, as well as basically having no standover clearance, so I like the lower top tube on the 17.5. I don't care about water bottle mounts, riding without water on my mountain bikes, so one cage is fine with me. Finally, I would likely be able to run a 140mm dropper on the 17.5 vs. 120mm on the 19. I haven't had a bike with a dropper, so 120mm it likely great already, but why not a bit more?