14.04.2018, 19:37
(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? sinceLooking at the source code:
see: https://bitbucket.org/multicoreware/x265...ew-defaultif (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...esets-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
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.