Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
21st April 2023, 19:30 | #1 | Link |
Registered User
Join Date: Mar 2021
Location: North Carolina
Posts: 138
|
Placebo vs Very Slow & merange
Hi,
I tend to encode a lot of shorter content on Placebo, but I was just looking at the differences between that and Very Slow, and one thing that I saw (as a major difference) is the merange values. Placebo uses 92 for merange and Very Slow and everything else uses 57. It basically says in the docs that anything above 57 really may not be worth the cost. So, is merange=92 beneficial, and is it worth it? I know there are a few more things that are affected by Placebo, but I'm really just wondering about this. Is 57 always the best no matter the content? Is it this number content-based? Thanks. |
21st April 2023, 21:46 | #2 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
|
Quote:
|
|
6th May 2023, 04:06 | #4 | Link | |
Registered User
Join Date: Mar 2021
Location: North Carolina
Posts: 138
|
Quote:
Could you set your ctu to 32 and set merange to 64? If so, does the search only go right to the next ctu? Could it search to the next line of ctu's underneath or only in one direction? I'm asking this because I believe ctu's are built from top to bottom, and left to right. |
|
8th May 2023, 04:26 | #7 | Link | |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,845
|
Quote:
So the default of 57 comes from the fact that default CTU size in x265 is 64 and default ME is hex. 64 - 4 - 2 - 1 = 57 If using a CTU of 32, the max would be: 32 - 4 - 2 = 26 (or 25 if me=hex is used) |
|
11th May 2023, 06:14 | #8 | Link | |
Registered User
Join Date: Mar 2021
Location: North Carolina
Posts: 138
|
Quote:
Are there benefits to going outside the CTU range? |
|
11th May 2023, 06:37 | #9 | Link | |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,845
|
Quote:
|
|
11th May 2023, 06:54 | #10 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,730
|
It's not clipped at all, the encoder does use a value you set there. A different question is if it's meaningful to use a bigger value than the CTU size
x265.h does have a conflicting comment regarding the default, which is 57 as calculated in the earlier post. It's pointed out that the range should be lowered is CTU is lower. Code:
/* The maximum distance from the motion prediction that the full pel motion * search is allowed to progress before terminating. This value can have an * effect on frame parallelism, as referenced frames must be at least this * many rows of reconstructed pixels ahead of the referencee at all times. * (When considering reference lag, the motion prediction must be ignored * because it cannot be known ahead of time). Default is 60, which is the * default max CU size (64) minus the luma HPEL half-filter length (4). If a * smaller CU size is used, the search range should be similarly reduced */
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
11th May 2023, 07:28 | #12 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,730
|
I ended up at that part of code by searcing for "searchRange" in the repository, and I cannot see anything clipping the input. I have myself noticed a difference between 26 and 58 with CTU 32, which is why I initially assumed that any legal value is actually used.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
17th May 2023, 16:24 | #13 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
|
Quote:
The --merange value means different things in different modes, and doesn't match with the actual search range at full resolutions. |
|
18th May 2023, 18:46 | #14 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,845
|
I know that! The reason I thought it gets clipped is because years ago, I vaguely remember Dark Shikari mentioning that "something" gets clipped to a max value if the provided one is bigger than it. I don't recall exactly, but I "think" he was talking about merange in x264 and x265 is baed on its codebase.
|
18th May 2023, 20:15 | #15 | Link | |
Registered User
Join Date: Dec 2013
Posts: 347
|
Quote:
|
|
18th May 2023, 22:46 | #16 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
|
Quote:
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|