![]() |
|
[BUG] x265 psyrd default value - Printable Version +- Selur's Little Message Board (https://forum.selur.net) +-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html) +--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html) +--- Thread: [BUG] x265 psyrd default value (/thread-376.html) |
x265 psyrd default value - andrewschen - 11.04.2018
RE: x265 psyrd default value - Selur - 12.04.2018 The x265 command line you used: x265 --input - --output-depth 10 --y4m --profile main10 --me umh --merange 24 --limit-modes --max-merge 3 --bframes 2 --ref 2 --rc-lookahead 24 --crf 30.00 --qpfile GENERATED_QP_FILE --rd 4 --rdoq-level 2 --range limited --colormatrix bt709 --output "H:\TMP\USERTMP\test.265"Psy-RDO quantizer is grayed out an does nothing, which is correct since 'rdoq-level' is 0. Quote:Psy-RDO Quantization:Which is correct since you applied preset 'medium', which sets psy-rdoq to 0. see: http://x265.readthedocs.io/en/default/presets.html Quote:--rdoq-level <0|1|2>, --no-rdoq-levelsee: http://x265.readthedocs.io/en/default/cli.html?highlight=rdoq-level#cmdoption-rdoq-level => With '--rdoq-level 0', '--psy-rdoq 1' doesn't do anything. So it looks to me that Hybrid works correctly and you are making a mistake. If you think I made a mistake in my assessment please let me know. In case there is a bug in Hybrid I'm happy to look into it. But atm. I see no reason problem. Cu Selur RE: x265 psyrd default value - andrewschen - 12.04.2018 1. Enable 'x265->Misc->Random Stuff->Minimize command line' 2. Apply a preset whose default psyrdoq value is 1 3. Manually sets tu-inter-depth=1 / tu-intra-depth=1 by Hybrid GUI interface option 4. Encode a file, whose psyrdoq value will be 0 (incorrect) 5. Disable 'x265->Misc->Random Stuff->Minimize command line' 6. Encode again and save to a different file, now whose psyrdoq value will be 1 now (correct) A little bit different from x264 scenerio, but they all looks like issues of 'minimize command line'. RE: x265 psyrd default value - Selur - 12.04.2018 Will look into it over the weekend and report back. Cu Selur RE: x265 psyrd default value - Selur - 12.04.2018 Quote:Apply a preset whose default psyrdoq value is 1Can you tell me one? Because looking at: http://x265.readthedocs.io/en/default/presets.html#presets There isn't a preset which sets '--psy-rdoq'. So applying any preset will set '--psy-rdoq' will set 'psy-rdoq' to the default value which is 0.0: --[no-]psy-rdoq <0..50.0> Strength of psycho-visual optimization in RDO quantization, 0 to disable. Default 0.0-> Still can't reproduce the issue. But, I stumbled over some code which might cause your issue,.. Cu Selur RE: x265 psyrd default value - andrewschen - 14.04.2018 (12.04.2018, 20:33)Selur Wrote:Quote:Apply a preset whose default psyrdoq value is 1Can you tell me one? Tested the dev version file, x264 rc-lookahead and x265 psy-rdoq was all fixed. I did read the Preset Option page before I submit this issue, and I thought maybe they just didn't list all the detail parameters in that page? since http://x265.readthedocs.io/en/default/cli.html#cmdoption-psy-rdoq here mentioned psy-rdoq should be 1.0 for presets slow, slower, veryslow. (And maybe placebo also) And I tested further in the dev release you sent, by just enabling/disabling 'x265->Misc->Random Stuff->Minimize command line' after applying each preset, some other parameters could still be switched on/off. (Following order is Enable / Disable 'minimize command line') ultrafast: high-tier=1/high-tier=0 (I think this should always be 0 by default, since the default setting in Hybrid GUI is main tier) deblock=0:0/no-deblock (don't know which is correct, is that deblock should be disabled in preset ultrafast?) no-opt-qp-pps/opt-qp-pps (I think this should always be disabled by default?) no-opt-ref-list-length-pps/opt-ref-list-length-pps (I think this should always be disabled by default?) superfast, veryfast, faster, fast, medium, slow, slower: high-tier=1/high-tier=0 no-opt-qp-pps/opt-qp-pps no-opt-ref-list-length-pps/opt-ref-list-length-pps veryslow: high-tier=1/high-tier=0 rskip/no-rskip (should be no-rskip for preset veryslow) no-opt-qp-pps/opt-qp-pps no-opt-ref-list-length-pps/opt-ref-list-length-pps placebo: high-tier=1/high-tier=0 tskip/no-tskip (I guess this should always be no-tskip by default?) limit-refs=0/limit-refs=3 (should be 0 for placebo) no-opt-qp-pps/opt-qp-pps no-opt-ref-list-length-pps/opt-ref-list-length-pps For you reference. Maybe you can fix them at the same time? RE: x265 psyrd default value - Selur - 14.04.2018 Quote:I did read the Preset Option page before I submit this issue, and I thought maybe they just didn't list all the detail parameters in that page?Looking at the source code: if (preset)
{
char *end;
int i = strtol(preset, &end, 10);
if (*end == 0 && i >= 0 && i < (int)(sizeof(x265_preset_names) / sizeof(*x265_preset_names) - 1))
preset = x265_preset_names[i];
if (!strcmp(preset, "ultrafast"))
{
param->lookaheadDepth = 5;
param->scenecutThreshold = 0; // disable lookahead
param->maxCUSize = 32;
param->minCUSize = 16;
param->bframes = 3;
param->bFrameAdaptive = 0;
param->subpelRefine = 0;
param->searchMethod = X265_DIA_SEARCH;
param->bEnableEarlySkip = 1;
param->bEnableSAO = 0;
param->bEnableSignHiding = 0;
param->bEnableWeightedPred = 0;
param->rdLevel = 2;
param->maxNumReferences = 1;
param->limitReferences = 0;
param->rc.aqStrength = 0.0;
param->rc.aqMode = X265_AQ_NONE;
param->rc.qgSize = 32;
param->bEnableFastIntra = 1;
}
else if (!strcmp(preset, "superfast"))
{
param->lookaheadDepth = 10;
param->maxCUSize = 32;
param->bframes = 3;
param->bFrameAdaptive = 0;
param->subpelRefine = 1;
param->bEnableEarlySkip = 1;
param->bEnableWeightedPred = 0;
param->rdLevel = 2;
param->maxNumReferences = 1;
param->limitReferences = 0;
param->rc.aqStrength = 0.0;
param->rc.aqMode = X265_AQ_NONE;
param->rc.qgSize = 32;
param->bEnableSAO = 0;
param->bEnableFastIntra = 1;
}
else if (!strcmp(preset, "veryfast"))
{
param->lookaheadDepth = 15;
param->bFrameAdaptive = 0;
param->subpelRefine = 1;
param->bEnableEarlySkip = 1;
param->rdLevel = 2;
param->maxNumReferences = 2;
param->rc.qgSize = 32;
param->bEnableFastIntra = 1;
}
else if (!strcmp(preset, "faster"))
{
param->lookaheadDepth = 15;
param->bFrameAdaptive = 0;
param->bEnableEarlySkip = 1;
param->rdLevel = 2;
param->maxNumReferences = 2;
param->bEnableFastIntra = 1;
}
else if (!strcmp(preset, "fast"))
{
param->lookaheadDepth = 15;
param->bFrameAdaptive = 0;
param->rdLevel = 2;
param->maxNumReferences = 3;
param->bEnableFastIntra = 1;
}
else if (!strcmp(preset, "medium"))
{
/* defaults */
}
else if (!strcmp(preset, "slow"))
{
param->bEnableRectInter = 1;
param->lookaheadDepth = 25;
param->rdLevel = 4;
param->rdoqLevel = 2;
param->psyRdoq = 1.0;
param->subpelRefine = 3;
param->maxNumMergeCand = 3;
param->searchMethod = X265_STAR_SEARCH;
param->maxNumReferences = 4;
param->limitModes = 1;
param->lookaheadSlices = 4; // limit parallelism as already enough work exists
}
else if (!strcmp(preset, "slower"))
{
param->bEnableWeightedBiPred = 1;
param->bEnableAMP = 1;
param->bEnableRectInter = 1;
param->lookaheadDepth = 30;
param->bframes = 8;
param->tuQTMaxInterDepth = 2;
param->tuQTMaxIntraDepth = 2;
param->rdLevel = 6;
param->rdoqLevel = 2;
param->psyRdoq = 1.0;
param->subpelRefine = 3;
param->maxNumMergeCand = 3;
param->searchMethod = X265_STAR_SEARCH;
param->maxNumReferences = 4;
param->limitReferences = 2;
param->limitModes = 1;
param->bIntraInBFrames = 1;
param->lookaheadSlices = 4; // limit parallelism as already enough work exists
param->limitTU = 4;
}
else if (!strcmp(preset, "veryslow"))
{
param->bEnableWeightedBiPred = 1;
param->bEnableAMP = 1;
param->bEnableRectInter = 1;
param->lookaheadDepth = 40;
param->bframes = 8;
param->tuQTMaxInterDepth = 3;
param->tuQTMaxIntraDepth = 3;
param->rdLevel = 6;
param->rdoqLevel = 2;
param->psyRdoq = 1.0;
param->subpelRefine = 4;
param->maxNumMergeCand = 4;
param->searchMethod = X265_STAR_SEARCH;
param->maxNumReferences = 5;
param->limitReferences = 1;
param->limitModes = 1;
param->bIntraInBFrames = 1;
param->lookaheadSlices = 0; // disabled for best quality
param->limitTU = 4;
}
else if (!strcmp(preset, "placebo"))
{
param->bEnableWeightedBiPred = 1;
param->bEnableAMP = 1;
param->bEnableRectInter = 1;
param->lookaheadDepth = 60;
param->searchRange = 92;
param->bframes = 8;
param->tuQTMaxInterDepth = 4;
param->tuQTMaxIntraDepth = 4;
param->rdLevel = 6;
param->rdoqLevel = 2;
param->psyRdoq = 1.0;
param->subpelRefine = 5;
param->maxNumMergeCand = 5;
param->searchMethod = X265_STAR_SEARCH;
param->bEnableTransformSkip = 1;
param->bEnableRecursionSkip = 0;
param->maxNumReferences = 5;
param->limitReferences = 0;
param->bIntraInBFrames = 1;
param->lookaheadSlices = 0; // disabled for best quality
// TODO: optimized esa
}you are right. -> Created a new issue inside the x265 bugtracker for this: https://bitbucket.org/multicoreware/x265/issues/398/please-maintain-the-presets-page, will adjust Hybrid to the source code. Will go through the source code and adjust Hybrid. Won't change things like tier&co which are covered by the presets and don't have a default value and are only given a default value by Hybrid. Cu Selur RE: x265 psyrd default value - andrewschen - 14.04.2018 (14.04.2018, 09:11)Selur Wrote:Quote:I did read the Preset Option page before I submit this issue, and I thought maybe they just didn't list all the detail parameters in that page?Looking at the source code: Tested the new dev version, here are the issue still need to check/fix: 1. For all presets high-tier=1 when enabling 'minimize command line' in all preset. opt-qp-pps / opt-ref-list-length-pps are both true when disabling 'minimize command line'. Same issues as the previous dev version. 2. min-cu-size = 16 if apply superfast preset and disable 'minimize command line', which should be 8 according to preset page. It's a new one. 3. limit-refs = 3 if apply veryslow preset and disable 'minimize command line', which should be 1 according to preset page. It's a new one. 4. limit-refs = 3 if apply placebo preset and disable 'minimize command line', which should be 0 according to preset page. It's the same issue as previous dev version. RE: x265 psyrd default value - Selur - 14.04.2018 looking into it,.. RE: x265 psyrd default value - Midnight44 - 06.05.2018 (14.04.2018, 00:42)andrewschen Wrote:(12.04.2018, 20:33)Selur Wrote:Quote:Apply a preset whose default psyrdoq value is 1Can you tell me one? This is getting a wee bit off topic here, but for future reference Andrew, while encoding most HD content with x265 you're better off to simply increase Psy-RD to 2.0-3.5 and leave Psy-RDOQ at 0. Psy-RDOQ has a HUGE impact on file size with CRF RC (Rate Control), and will deteriorate your perceived video quality with 2 Pass RC, compared to Psy-RD. There are of course exceptions to this, however. Also, unless you have a 40+ core server and time to kill, I would HIGHLY recommend against using raw presets (without changes).. In addition to most of the slower presets using Psy-RDOQ, they also have extremely high Motion Estimation searches selected. For most HD content, motion estimation reduces your encoding speed by MASSIVE amounts, with VERY little improvement in perceived visual quality. So, if time is an issue for your encodes, and you don't have a supercomputer, then choose the lowest ME and SubME possible (--me dia --subme 0). |