View Full Version : Your thoughts and results for merange
Cmptr
31st August 2026, 19:08
I've been doing a lot of tests lately.... Alot... I've re-encoded a whole season of Snowpiercer at least 3 times now. (OCD). I'll admit it.. I'm a pixel peeper.. Ima just say it.
I've got a lot of my baseline settings dialed in. Some very unconventional such as no-cuturee, no-deblock, aq-mode 0 and aq-strength 0.. I've done some tests using them. I've redone tests as well. I'm open to my mind being changed on them, especially aq-mode and aq-strength because sometimes I do get issues in dark areas, but that is for another thread.
I'm curious as to what people are using for merange. Now I know not every encode is the same. Sure some videos you can get away with using the same settings, some you can't. Not here to debate that.
I'm also curious, has there ever been a time where you have noticed that using above 57 has given better results. If so, what has the highest you have gone?
If you got some spare fps to loose, and you've already got settings such as, tu-intra-depth 4, tu-inter-depth 4, max-merge 5, limit-tu 0, no-limit-modes, rskip 0, limit-refs 0, me umh, rd 4, subme 7, ref 7, bframes 8.. What setting would you change? Would it be merange?
Can't really increase ref frames. Could possibly change rd, but I've heard that above 4 the results are worse. I could go Back to rdoq-level 2, but Microchip8 made some really good points on it, and when I finally understood, rdoq-level 1 is better.
Z2697
31st August 2026, 21:29
use hme
Cmptr
1st September 2026, 06:23
use hme
Does that just basically run ME multiple times instead of just once? Then chooses the best prediction? Theoretically, if I use umh,umh,umh and 96,96,96, would that be the same as just using umh 96?
Z2697
1st September 2026, 09:48
Does that just basically run ME multiple times instead of just once? Then chooses the best prediction? Theoretically, if I use umh,umh,umh and 96,96,96, would that be the same as just using umh 96?
Negative.
microchip8
1st September 2026, 10:39
If you have the processing power, using hme=umh,umh,star can compress further but I didn't notice much improvements in picture quality. The default range is fine. Otherwise, use me=umh. The default merange of 57 is calculated and assumes you're using a ctu of 64 and hex as ME. If you're using something else than hex, you'd use 58 instead.
That said, if you're using a ctu of 32, the calculated value will be 26. I use the double of that, 52
merange's formula to calculate the range is:
ctu size - 4(luma) - 2(chroma) (- 1 if me=hex is used)
microchip8
1st September 2026, 10:51
Does that just basically run ME multiple times instead of just once? Then chooses the best prediction? Theoretically, if I use umh,umh,umh and 96,96,96, would that be the same as just using umh 96?
HME is a pyramidal search, it works by doing an ME search on One-Sixteenth scaled-down resolution, One-Quarter scaled-down resolution and Full resolution.
Hellboy.
2nd September 2026, 21:27
If you have the processing power, using hme=umh,umh,star can compress further but I didn't notice much improvements in picture quality. The default range is fine. Otherwise, use me=umh. The default merange of 57 is calculated and assumes you're using a ctu of 64 and hex as ME. If you're using something else than hex, you'd use 58 instead.
That said, if you're using a ctu of 32, the calculated value will be 26. I use the double of that, 52
merange's formula to calculate the range is:
ctu size - 4(luma) - 2(chroma) (- 1 if me=hex is used)
That mean that presets slow, slower and veryslow are wrong?
Because they are using ctu=64, me=star, merange=57, and should be merange=58?
microchip8
2nd September 2026, 21:32
That mean that presets slow, slower and veryslow are wrong?
Because they are using ctu=64, me=star, merange=57, and should be merange=58?
The presets haven't been updated for a very, very long time. None of them are optimal. I recommend "writing" your own preset params and use them.
Hellboy.
2nd September 2026, 22:43
Thanks.
Z2697
3rd September 2026, 07:53
There's no wrong or right... (in narrow sense)
merange is just the range to search around PMV, theoretically you can use anything and you won't suddenly get 100x worse/better result from a single pixel range.
The reason for *that* calculation is frame parallelism (frame-threads), and x265 has another form of parallism (wpp, or wavefront), so it's not as important.
I won't go into more detail but just stop worrying about it.
Z2697
3rd September 2026, 10:14
BTW for all non-HME methods in x265, the lookahead is hard coded to use HEX-16. (unlike x264)
Cmptr
15th September 2026, 06:46
If you have the processing power, using hme=umh,umh,star can compress further but I didn't notice much improvements in picture quality. The default range is fine. Otherwise, use me=umh. The default merange of 57 is calculated and assumes you're using a ctu of 64 and hex as ME. If you're using something else than hex, you'd use 58 instead.
That said, if you're using a ctu of 32, the calculated value will be 26. I use the double of that, 52
merange's formula to calculate the range is:
ctu size - 4(luma) - 2(chroma) (- 1 if me=hex is used)
Sorry for delayed response. You mentioned merange formula, just to clear some confusion, will x265 auto change merange from 57 if I dont change it myself if I use ctu 32? Or will it stay at 57? Almost didn't want to ask this question, but I just dont want to assume, just incase it does change internally.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.