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.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th January 2023, 11:09   #8961  |  Link
Barough
Registered User
 
Barough's Avatar
 
Join Date: Feb 2007
Location: Sweden
Posts: 456
x265 v3.5+87
Built on January 20, 2023, GCC 12.2.0

https://www.mediafire.com/file/iz8fqi7rqpi55sm
Barough is offline   Reply With Quote
Old 20th January 2023, 19:12   #8962  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,490
Quote:
Originally Posted by ShortKatz View Post
Nope, the patch still does apply. So, I was wondering, if this bug is so big and there since (minimum) 2018, why did no one else notice?
Have been a before/after analysis to show the benefits of the fix?
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 20th January 2023, 21:52   #8963  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,234
I've made a new build of my custom version, small quick encode test seems fine.
Check my Github.
__________________
My github.
jpsdr is offline   Reply With Quote
Old 21st January 2023, 05:25   #8964  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: On a need to know basis.
Posts: 752
Quote:
Originally Posted by jpsdr View Post
I've made a new build of my custom version, small quick encode test seems fine.
Check my Github.
I have done a lot of testing, you maybe interested in the results:-

https://forum.doom9.org/showthread.p...17#post1981517
&
https://forum.doom9.org/showthread.p...53#post1981553

But only up to build 85.
__________________
This can be SO "TeDiouS"..
Long term RipBot264 user.

#1 Ryzen 7950X
#2 Intel i9-13900KF
#3 Ryzen 5950X
#4 Ryzen 5900X
#5 Ryzen 3950X
TDS is offline   Reply With Quote
Old 21st January 2023, 23:45   #8965  |  Link
LeXXuz
20 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 680
Quote:
Originally Posted by jpsdr View Post
I've made a new build of my custom version, small quick encode test seems fine.
Check my Github.
jpsdr, I have been using v+75 with extra switches: "--aq-mode 5 --sbrc --sbrc-aq5 --sbrc-hyst" for 1080p SDR content.

Is this still valid with v+87? A lot of talk about new switch names here which confuses me a little.
LeXXuz is offline   Reply With Quote
Old 22nd January 2023, 10:40   #8966  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,234
@LeXXuz
For the same command line effect, you have to replace --sbrc --sbrc-aq5 --sbrc-hyst with --aq-auto 10 assuming you don't want the new sbrc (wich has totaly nothing to do with the first patch) and just keep the auto AQ feature.
(And still check with the log file )
__________________
My github.

Last edited by jpsdr; 22nd January 2023 at 10:42.
jpsdr is offline   Reply With Quote
Old 22nd January 2023, 12:37   #8967  |  Link
LeXXuz
20 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 680
Quote:
Originally Posted by jpsdr View Post
@LeXXuz
For the same command line effect, you have to replace --sbrc --sbrc-aq5 --sbrc-hyst with --aq-auto 10 assuming you don't want the new sbrc (wich has totaly nothing to do with the first patch) and just keep the auto AQ feature.
(And still check with the log file )
Thank you jpsdr. Actually I'm not sure if I want or need the new sbrc as I don't fully understand what it does and if it is beneficial for my usage.

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.
LeXXuz is offline   Reply With Quote
Old 23rd January 2023, 06:17   #8968  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,612
Quote:
Originally Posted by LeXXuz View Post
So with the latest version I just add "--aq-mode 5 --aq-auto 10", is that right?
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...
Boulder is offline   Reply With Quote
Old 23rd January 2023, 18:34   #8969  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,234
Quote:
Originally Posted by LeXXuz View Post
EDIT: Btw the clang version shows "x265 [INFO]: build info [Windows][MSVC 1928][64 bit] 10bit", is that correct
Yes, because it's build with llvm but still with Visual Studio (so using clang compiler instead).
__________________
My github.
jpsdr is offline   Reply With Quote
Old 30th January 2023, 05:59   #8970  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,612
@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.
Boulder is offline   Reply With Quote
Old 30th January 2023, 21:22   #8971  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,234
@Boulder
Euh... I don't know. I'll see but absolutely not promises... Don't have time for now.
__________________
My github.
jpsdr is offline   Reply With Quote
Old 31st January 2023, 05:57   #8972  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,612
Quote:
Originally Posted by jpsdr View Post
@Boulder
Euh... I don't know. I'll see but absolutely not promises... Don't have time for now.
Thank you

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...
Boulder is offline   Reply With Quote
Old 31st January 2023, 18:29   #8973  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,234
@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);
So, you want something that can change the value of strength when aq-auto is enabled ?
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.
jpsdr is offline   Reply With Quote
Old 31st January 2023, 19:20   #8974  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,612
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.
Boulder is offline   Reply With Quote
Old 1st February 2023, 20:35   #8975  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,234
Is it what you want ?
https://github.com/jpsdr/x265/commit...6dc36cef1d1880
__________________
My github.
jpsdr is offline   Reply With Quote
Old 2nd February 2023, 05:51   #8976  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,612
Quote:
Originally Posted by jpsdr View Post
Yes, that looks exactly what I thought of doing Thank you so much, I really appreciate it
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 2nd February 2023, 14:21   #8977  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,234
I don't know when i'll be able to make a build (as it takes time), maybe this evening, maybe in few days, but you still can make your own build frommy github.
__________________
My github.
jpsdr is offline   Reply With Quote
Old 2nd February 2023, 19:20   #8978  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,612
Quote:
Originally Posted by jpsdr View Post
I don't know when i'll be able to make a build (as it takes time), maybe this evening, maybe in few days, but you still can make your own build frommy github.
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.
Boulder is offline   Reply With Quote
Old 5th February 2023, 11:43   #8979  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,234
If you have your own build, in that case, i'll realy take my time to make a new build...
__________________
My github.
jpsdr is offline   Reply With Quote
Old 5th February 2023, 11:55   #8980  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,612
Quote:
Originally Posted by jpsdr View Post
If you have your own build, in that case, i'll realy take my time to make a new build...
Yeah, no problem with that

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...
Boulder is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.