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. |
22nd January 2023, 12:37 | #8961 | Link | |
21 years and counting...
Join Date: Oct 2002
Location: Germany
Posts: 716
|
Quote:
So with the latest version I just add "--aq-mode 5 --aq-auto 10", is that right? EDIT: Btw the clang version shows "x265 [INFO]: build info [Windows][MSVC 1928][64 bit] 10bit", is that correct Last edited by LeXXuz; 22nd January 2023 at 13:36. |
|
23rd January 2023, 06:17 | #8962 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,731
|
If you want to use the automatic AQ mode with AQ5 + hysteresis enabled, just use --aq-auto 10. --aq-auto 6 for HDR (enables auto mode + hysteresis, no AQ3 or AQ5 used since it's counterproductive).
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
30th January 2023, 05:59 | #8964 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,731
|
@jpsdr: I've seen mentioned in some places that AQ mode 4 needs a bit lower aq-strength than other modes. Would it be possible to have a separate aq-strength parameter for it in case aq-auto is enabled?
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... Last edited by Boulder; 30th January 2023 at 06:10. |
31st January 2023, 05:57 | #8966 | Link | |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,731
|
Quote:
I was thinking that it might be as simple as adding the parameter and then conditionally using it as the base strength when the mode for the frame is either X265_AQ_EDGE or X265_AQ_EDGE_BIAS.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
31st January 2023, 18:29 | #8967 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,316
|
@Boulder
For X265_AQ_EDGE the calcul is: Code:
inclinedEdge = curFrame->m_lowres.edgeInclined[blockXY]; qp_adj = curFrame->m_lowres.qpCuTreeOffset[blockXY]; if(inclinedEdge && (qp_adj - avg_adj > 0)) qp_adj = ((strength + AQ_EDGE_BIAS) * (qp_adj - avg_adj)); else qp_adj = strength * (qp_adj - avg_adj); If it's that, 2 options. Somethings like strength2 = strength*coeff or strength2 = strength + bias with coeff=1 or bias=0 when aq-auto is disabled and use strength2 instead of strength in calcul. And if i add some kind of AQ4 specific parameter, it can be applied to AQ 4 mode, with or without aq-auto enable, if default value keeps original behavior.
__________________
My github. Last edited by jpsdr; 31st January 2023 at 18:44. |
31st January 2023, 19:20 | #8968 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,731
|
What I was thinking was basically that - having AQ 4 its own strength parameter. Maybe making it equal to aq-strength in case aq-auto is not enabled so any command line would work normally.
I was wondering if it would make sense to just change the calculation of 'strength' here, I haven't had the time to get the whole idea to work because the compiled exe won't accept my new parameters for some reason. What I did was just carbon copy the existing aq-strength and aq-bias-strength parameters in various files and adjust the variable names accordingly, but probably I've missed something. In this example there's also a different value for AQ 5 bias strength. Code:
if (param->rc.aqMode == X265_AQ_EDGE || param->rc.aqMode == X265_AQ_EDGE_BIASED) strength = param->rc.aqStrengthEdge * avg_adj; else strength = param->rc.aqStrength * avg_adj; avg_adj = avg_adj - 0.5f * (avg_adj_pow2 - modeTwoConst) / avg_adj; if (param->rc.aqMode == X265_AQ_EDGE_BIASED) bias_strength = param->rc.aqBiasStrengthEdge * param->rc.aqStrengthEdge; else bias_strength = param->rc.aqBiasStrength * param->rc.aqStrength;
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... Last edited by Boulder; 1st February 2023 at 16:53. |
1st February 2023, 20:35 | #8969 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,316
|
Is it what you want ?
https://github.com/jpsdr/x265/commit...6dc36cef1d1880
__________________
My github. |
2nd February 2023, 05:51 | #8970 | Link | |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,731
|
Quote:
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
2nd February 2023, 19:20 | #8972 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,731
|
No worries, I created a diff file to use for patching in Media Autobuild Suite so I got a compiled exe to test. First impression looks good, so I believe it's working. I didn't do any frame by frame compares but just watched an encoded clip to see if anything's weird.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... Last edited by Boulder; 2nd February 2023 at 19:27. |
5th February 2023, 11:55 | #8974 | Link | |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,731
|
Quote:
If anyone wants to test the modifications, here's the build I made. 10-bit only, and optimized for Zen 3. I can also provide the patch file I used if needed. https://drive.google.com/file/d/1WGi...usp=share_link
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
5th February 2023, 17:30 | #8975 | Link | |
Registered User
Join Date: May 2005
Posts: 15
|
Thank You for sharing the build.
--aq-auto 10 works. It is about 3% faster than --aq-mode 4 and may preserve a bit more detail. When using --rd 4 --dynamic-rd 3 options I've got the warning Quote:
|
|
5th February 2023, 19:40 | #8976 | Link | |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,731
|
Quote:
Code:
if (m_param->dynamicRd && (!bIsVbv || !p->rc.aqMode || p->rdLevel > 4)) { p->dynamicRd = 0; x265_log(p, X265_LOG_WARNING, "Dynamic-rd disabled, requires RD <= 4, VBV and aq-mode enabled\n"); }
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
6th February 2023, 08:07 | #8977 | Link | |||
Registered User
Join Date: May 2005
Posts: 15
|
VBV is set automatically because of the parameters
Quote:
aqMode should be 2 by default, but --aq-auto 10 sets it to Quote:
In the INFO section I see Quote:
|
|||
6th February 2023, 09:06 | #8978 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,731
|
Then it must be because of --aq-auto. I'll take a look at it when I'm back home from work and adjust that check in the code accordingly to make it work again.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
6th February 2023, 09:35 | #8979 | Link |
21 years and counting...
Join Date: Oct 2002
Location: Germany
Posts: 716
|
Isn't that what it is supposed to do?
https://forum.doom9.org/showthread.p...00#post1981600 |
Thread Tools | Search this Thread |
Display Modes | |
|
|