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 5th February 2023, 17:30   #8981  |  Link
vadlerg
Registered User
 
Join Date: May 2005
Posts: 11
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:
x265 [WARN]: Dynamic-rd disabled, requires RD <= 4, VBV and aq-mode enabled
That seems to be not rational. There must be some typo in the source, the build itself is OK.
vadlerg is offline   Reply With Quote
Old 5th February 2023, 19:40   #8982  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,610
Quote:
Originally Posted by vadlerg View Post
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


That seems to be not rational. There must be some typo in the source, the build itself is OK.
The error message is a bit bad English to me. Do you have VBV enabled as well? I believe the AQ-mode checks ok if AQ auto is enabled.

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...
Boulder is offline   Reply With Quote
Old 6th February 2023, 08:07   #8983  |  Link
vadlerg
Registered User
 
Join Date: May 2005
Posts: 11
VBV is set automatically because of the parameters
Quote:
--crf 18 --preset slower --profile main10 --level-idc 52
.
aqMode should be 2 by default, but --aq-auto 10 sets it to
Quote:
AQ: mode / str(edg) / qg-size / cu-tree : auto-hyst-aq5 / 1.0(1.0) / 32 / 1
rdLevel is set to 4 and encoder still disabling dynamic-rd, even if I set --rd to 3.
In the INFO section I see
Quote:
x265 [INFO]: tools: rect amp limit-modes rd=4 psy-rd=2.00 rdoq=2 psy-rdoq=1.00
x265 [INFO]: tools: rskip mode=2 rskip-edge-threshold=0.03 limit-tu=4 signhide
x265 [INFO]: tools: tmvp b-intra strong-intra-smoothing deblock sao
x265 [INFO]: tools: selective-sao
vadlerg is offline   Reply With Quote
Old 6th February 2023, 09:06   #8984  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,610
Quote:
Originally Posted by vadlerg View Post
aqMode should be 2 by default
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...
Boulder is offline   Reply With Quote
Old 6th February 2023, 09:35   #8985  |  Link
LeXXuz
20 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 678
Quote:
Originally Posted by vadlerg View Post
aqMode should be 2 by default, but --aq-auto 10 sets it to
Isn't that what it is supposed to do?
https://forum.doom9.org/showthread.p...00#post1981600
LeXXuz is offline   Reply With Quote
Old 6th February 2023, 09:41   #8986  |  Link
vadlerg
Registered User
 
Join Date: May 2005
Posts: 11
Of course it is what it supposed to be but this should not disable dynamicRd.
vadlerg is offline   Reply With Quote
Old 6th February 2023, 13:18   #8987  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,610
Quote:
Originally Posted by vadlerg View Post
Of course it is what it supposed to be but this should not disable dynamicRd.
Yes, it's probably just that validation which has not been updated accordingly. I don't remember I've ever seen the dynamic RD option used by anyone so it's definitely understandable.
__________________
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 6th February 2023, 17:47   #8988  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,610
I found the cause of the issue, it's not auto-aq related. The validation is almost ok, it just doesn't understand that --level-idc enables VBV. If you add the VBV parameters to the command line, it will work.

EDIT: Here's a build where the validation is fixed (if VBV is not set and --level-idc is 0, it will disable dynamic-rd): https://drive.google.com/file/d/1U9c...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...

Last edited by Boulder; 6th February 2023 at 17:55.
Boulder is offline   Reply With Quote
Old 7th February 2023, 03:58   #8989  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,489
Quote:
Originally Posted by Boulder View Post
Yes, it's probably just that validation which has not been updated accordingly. I don't remember I've ever seen the dynamic RD option used by anyone so it's definitely understandable.
I've used it before, with high resolution CRF with VBV encodes. It lets the encoder run faster when it can achieve CRF, and then slows down to improve quality when VBV limitations keep CRF from being hit.

It can improve throughput across many clips, but perf improvements for any given encode are unpredictable, varying with how often the content would hit the VBV.

Of course, this will increase ABR versus just using full complexity the whole time, so it's quite scenario specific. There is also the risk of the different modes causing some "stylistic" discontinuities.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 7th February 2023, 18:36   #8990  |  Link
vadlerg
Registered User
 
Join Date: May 2005
Posts: 11
Thank You. That's it.
vadlerg is offline   Reply With Quote
Old 12th February 2023, 10:10   #8991  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,233
I'm stuck with an issue i've no idea for now how to solve, and i may think that's there is just no solution at all (unless a loooooot of rework of the code).
After adding just the command line asked by Boulder, i've hit the C1061 error issue with MS compiler...
Why have they done this...????
As it's specific to MS compiler, i still can make the clang version, but for now, it's the only build i can do.
To do the others builds, i have to see how i can build x265 with gcc, maybe i'll do that, but not the time for now...
__________________
My github.
jpsdr is offline   Reply With Quote
Old 12th February 2023, 12:06   #8992  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,233
Finaly i made some tests for gcc build, but when things want to get in your way, they are very efficients...

I've tested msys script build, but what i'm looking for is where i can find the parameter list you see in command like this:
Code:
cmake -G "MSYS Makefiles" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
I want to make a static standalone .exe, not a one when you start it asked a lot of gcc dll...!
This is possible with cmake-gui (i have trouble to make it start also), but cmake-gui doesn't give all the options (you don't have 12bits for exemple).
Also, i would like to add "-mavx2" in the gcc command, no idea how to do that's kind of stuff (this is why i choose the Visual Studio solution, where i have access to all the compiler options in the ide).

Edit
Even with "static link CRT" checked in cmake-gui, the .exe from gcc build is still asking for dll... Not the same than my first attempt without, but still...

So, gcc builders, can you provide my your whole complete build script ?
As i said, when things want to get in your way, they are very efficients !!
__________________
My github.

Last edited by jpsdr; 12th February 2023 at 12:11.
jpsdr is offline   Reply With Quote
Old 12th February 2023, 17:04   #8993  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,610
For GCC builds, I use Media Autobuild Suite to take care of the cumbersome scripting. You can use custom patches, for example with x265, create a file named x265_git_extra.sh and add the patch in the main 'build' folder and it will get applied during the compile operation. This is what I have in the file.

Code:
#!/bin/bash

_pre_ninja(){

patch -p 1 -i "$LOCALBUILDDIR/x265-jpsdr-aqauto-v5.patch"

}
__________________
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 12th February 2023, 18:35   #8994  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,377
Quote:
Originally Posted by jpsdr View Post
I've tested msys script build, but what i'm looking for is where i can find the parameter list you see in command like this:
Code:
cmake -G "MSYS Makefiles" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
cmake . -LAH will emit the full list of variables that get set with their values, although it isn't all that nicely formatted. In many cases it's just easier to open CMakeLists.txt and see what things are either listed as option() or being toggled as an environment variable with set() or some such.

Quote:
I want to make a static standalone .exe, not a one when you start it asked a lot of gcc dll...!
This is possible with cmake-gui (i have trouble to make it start also), but cmake-gui doesn't give all the options (you don't have 12bits for exemple).
Also, i would like to add "-mavx2" in the gcc command, no idea how to do that's kind of stuff (this is why i choose the Visual Studio solution, where i have access to all the compiler options in the ide).

Edit
Even with "static link CRT" checked in cmake-gui, the .exe from gcc build is still asking for dll... Not the same than my first attempt without, but still...

So, gcc builders, can you provide my your whole complete build script ?
As i said, when things want to get in your way, they are very efficients !!
See example here (yes, x265 is in the guide, but for clarity's sake use a smaller example):
https://github.com/qyot27/mpv/blob/1...dious.txt#L475

Most GCC toolchains that are widely distributed are built assuming shared runtime by default, you have to either pass something like -static-libgcc -static-libstdc++ to LDFLAGS (in CMake, -DCMAKE_SHARED_LINKER_FLAGS for libraries and -DCMAKE_EXE_LINKER_FLAGS for executables) or you can just turn this off entirely by building GCC with static runtime only (which is what I do when building the MinGW/GCC toolchain, hence why the guide doesn't use those flags).

I need to do a good refresh on that guide because while I typically do a once-through every six months after moving to the current release of Ubuntu, I was so stressed out last year and now spend >95% of my time in Linux that I still haven't done so since last May or something like that.
qyot27 is offline   Reply With Quote
Old 12th February 2023, 20:26   #8995  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,233
Ok, translation issue from my part, my question is not properly made.

I was asking, from people using gcc, their whole complete build script for building static x265 (not building gcc...).
__________________
My github.
jpsdr is offline   Reply With Quote
Old 13th February 2023, 19:21   #8996  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,659
Mine (depends on the media-autobuild suite directory tree and its MSYS2/MinGW64 shell).
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 14th February 2023, 19:43   #8997  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,233
@LigH
Is in your script the following line:
Code:
export CXXFLAGS=
allow to add compiler options (like -mavx2) that will be used afterward ?
__________________
My github.
jpsdr is offline   Reply With Quote
Old 14th February 2023, 23:10   #8998  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,659
No, just basic adaptions of the Multicoreware templates.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 14th February 2023, 23:27   #8999  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,233
No luck, i've tried several options, but i always have an error message telling me that libstdc++6.dll is missing when i try to run the x265.exe builded...
Don't know what option i have to use to make a standalone version.
__________________
My github.
jpsdr is offline   Reply With Quote
Old 15th February 2023, 10:21   #9000  |  Link
LeXXuz
20 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 678
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 )
jpsdr, is it normal that Mediainfo shows all kinds of aq-mode when encoding with --aq-mode 5? Some files show aq-mode=2, others 3, 4 or 5. All have been encoded with --aq-mode 5 and --aq-auto 10.
LeXXuz 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 04:59.


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