View Single Post
Old 15th October 2020, 17:01    |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
defaults:
Code:
x265 --input - --output-depth 10 --y4m --profile main10 --limit-modes --no-early-skip --no-open-gop --opt-ref-list-length-pps --crf 18.00 --opt-qp-pps --cbqpoffs -2 --crqpoffs -2 --qpfile GENERATED_QP_FILE --limit-refs 0 --ssim-rd --psy-rd 2.50 --rdoq-level 2 --psy-rdoq 10.00 --aq-mode 0 --deblock=-1:-1 --limit-sao --no-repeat-headers --range limited --colormatrix unknown --output OUTPUTFILE
activated hevc-ac:
Code:
x265 --input - --output-depth 10 --y4m --profile main10 --limit-modes --no-early-skip --no-open-gop --opt-ref-list-length-pps --crf 18.00 --opt-qp-pps --cbqpoffs -2 --crqpoffs -2 --qpfile GENERATED_QP_FILE --limit-refs 0 --ssim-rd --psy-rd 2.50 --rdoq-level 2 --psy-rdoq 10.00 --aq-mode 0 --hevc-aq --no-cutree --deblock=-1:-1 --limit-sao --no-repeat-headers --range limited --colormatrix unknown --output OUTPUTFILE
set psy-rd to 0:
Code:
x265 --tune psnr --input - --output-depth 10 --y4m --profile main10 --limit-modes --no-early-skip --no-open-gop --opt-ref-list-length-pps --crf 18.00 --opt-qp-pps --cbqpoffs -2 --crqpoffs -2 --qpfile GENERATED_QP_FILE --limit-refs 0 --ssim-rd --rdoq-level 2 --psy-rdoq 10.00 --hevc-aq --no-cutree --deblock=-1:-1 --limit-sao --no-repeat-headers --range limited --colormatrix unknown --output OUTPUTFILE
-> used encoding call:
Code:
ffmpeg -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "F:\TestClips&Co\files\test.avi" -map 0:0 -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p10le -strict -1 -vsync 0  -f yuv4mpegpipe - | x265 --tune psnr --input - --output-depth 10 --y4m --profile main10 --limit-modes --no-early-skip --no-open-gop --opt-ref-list-length-pps --crf 18.00 --opt-qp-pps --cbqpoffs -2 --crqpoffs -2 --limit-refs 0 --ssim-rd --rdoq-level 2 --psy-rdoq 10.00 --hevc-aq --no-cutree --deblock=-1:-1 --limit-sao --no-repeat-headers --range limited --colormatrix bt470bg --output "E:\Temp\2020-10-15@17_37_08_9710_01.265"
results in:
Code:
x265 [info]: HEVC encoder version 3.4+26-ga82c6c7a7
x265 [info]: build info [Windows][GCC 10.2.0][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main 10 profile, Level-2.1 (Main tier)
x265 [info]: Thread pool created using 16 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 4 / wpp(6 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 3
x265 [info]: Keyframe min / max / scenecut / bias  : 25 / 250 / 40 / 5.00
x265 [info]: Cb/Cr QP Offset                     : -2 / -2
x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / off / off
x265 [info]: Rate Control / qCompress            : CRF-18.0 / 0.60
x265 [info]: tools: limit-modes rd=3 ssim-rd rdoq=2 psy-rdoq=10.00 rskip mode=1
x265 [info]: tools: signhide tmvp b-intra strong-intra-smoothing
x265 [info]: tools: deblock(tC=-1:B=-1) sao
there is no info that hevc-aq would be ignored,...

MediaInfo reports:
Code:
Writing library                          : x265 3.4+26-ga82c6c7a7:[Windows][GCC 10.2.0][64 bit] 10bit
Encoding settings                        : cpuid=1111039 / frame-threads=4 / numa-pools=16 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=640x352 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=25 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=0 / scenecut=40 / hist-scenecut=0 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=0 / limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=-1:-1 / sao / no-sao-non-deblock / rd=3 / selective-sao=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=0.00 / psy-rdoq=10.00 / no-rd-refine / no-lossless / cbqpoffs=-2 / crqpoffs=-2 / rc=crf / crf=18.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=0 / aq-strength=0.00 / no-cutree / zone-count=0 / no-strict-cbr / qg-size=64 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=5 / chromaloc=0 / display-window=0 / cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / opt-qp-pps / opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / hist-threshold=0.03 / no-opt-cu-delta-qp / no-aq-motion / no-hdr10 / no-hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / no-scenecut-aware-qpconformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0 / no-vbv-live-multi-pass
-> 'no-hevc-aq'

hevc-aq documentaion:
Quote:
--hevc-aq

Enable adaptive quantization It scales the quantization step size according to the spatial activity of one coding unit relative to frame average spatial activity. This AQ method utilizes the minimum variance of sub-unit in each coding unit to represent the spatial complexity of the coding unit.
source: https://x265.readthedocs.io/en/lates...option-hevc-aq

disabling 'minimize command line' results in:
Code:
x265 --frame-threads 0 --wpp --no-pmode --no-pme --log-level 2 --input - --output-depth 10 --y4m --profile main10 --high-tier --min-cu-size 8 --ctu 64 --qg-size 32 --no-opt-cu-delta-qp --tu-intra-depth 1 --tu-inter-depth 1 --limit-tu 0 --max-tu-size 32 --no-hme --me hex --subme 2 --merange 57 --no-analyze-src-pics --limit-modes --no-rect --no-amp --max-merge 3 --no-early-skip --rskip 1 --temporal-mvp --rdpenalty 0 --no-tskip --strong-intra-smoothing --no-constrained-intra --no-open-gop --gop-lookahead 0 --scenecut 40 --scenecut-bias 5 --no-scenecut-aware-qp --no-hist-scenecut --opt-ref-list-length-pps --keyint 250 --min-keyint 0 --max-ausize-factor 1 --radl 0 --bframes 4 --no-weightb --no-b-intra --bframe-bias 0 --b-adapt 2 --b-pyramid --ref 3 --weightp --rc-lookahead 20 --slices 1 --lookahead-threads 0 --qpstep 4 --qpmin 0 --qpmax 69 --qblur 0.50 --cplxblur 20.0 --crf 18.00 --opt-qp-pps --no-rc-grain --cbqpoffs -2 --crqpoffs -2 --ipratio 1.4 --pbratio 1.3 --nr-intra 0 --nr-inter 0 --qpfile GENERATED_QP_FILE --limit-refs 0 --rd 3 --no-fast-intra --ssim-rd --no-rd-refine --no-psy-rd --rdoq-level 2 --psy-rdoq 10.00 --signhide --no-splitrd-skip --qcomp 0.60 --qp-adaptation-range 1 --no-aq-motion --aq-mode 0 --hevc-aq --no-cutree --no-const-vbv --vbv-maxrate 0 --vbv-bufsize 0 --vbv-init 0.9 --vbv-end 0.000 --no-hrd --no-aud --info --no-idr-recovery-sei --deblock=-1:-1 --sao --selective-sao 4 --no-sao-non-deblock --limit-sao --no-repeat-headers --no-temporal-layers --log2-max-poc-lsb 8 --no-fades --no-psnr --no-ssim --no-interlace --range limited --colormatrix bt470bg --no-single-sei --no-hdr10 --output "E:\Temp\test.265"
and
Code:
ffmpeg -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "F:\TestClips&Co\files\test.avi" -map 0:0 -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p10le -strict -1 -vsync 0  -f yuv4mpegpipe - | x265 --frame-threads 0 --wpp --no-pmode --no-pme --log-level 2 --input - --output-depth 10 --y4m --profile main10 --high-tier --min-cu-size 8 --ctu 64 --qg-size 32 --no-opt-cu-delta-qp --tu-intra-depth 1 --tu-inter-depth 1 --limit-tu 0 --max-tu-size 32 --no-hme --me hex --subme 2 --merange 57 --no-analyze-src-pics --limit-modes --no-rect --no-amp --max-merge 3 --no-early-skip --rskip 1 --temporal-mvp --rdpenalty 0 --no-tskip --strong-intra-smoothing --no-constrained-intra --no-open-gop --gop-lookahead 0 --scenecut 40 --scenecut-bias 5 --no-scenecut-aware-qp --no-hist-scenecut --opt-ref-list-length-pps --keyint 250 --min-keyint 0 --max-ausize-factor 1 --radl 0 --bframes 4 --no-weightb --no-b-intra --bframe-bias 0 --b-adapt 2 --b-pyramid --ref 3 --weightp --rc-lookahead 20 --slices 1 --lookahead-threads 0 --qpstep 4 --qpmin 0 --qpmax 69 --qblur 0.50 --cplxblur 20.0 --crf 18.00 --opt-qp-pps --no-rc-grain --cbqpoffs -2 --crqpoffs -2 --ipratio 1.4 --pbratio 1.3 --nr-intra 0 --nr-inter 0 --limit-refs 0 --rd 3 --no-fast-intra --ssim-rd --no-rd-refine --no-psy-rd --rdoq-level 2 --psy-rdoq 10.00 --signhide --no-splitrd-skip --qcomp 0.60 --qp-adaptation-range 1 --no-aq-motion --aq-mode 0 --hevc-aq --no-cutree --no-const-vbv --vbv-maxrate 0 --vbv-bufsize 0 --vbv-init 0.9 --vbv-end 0.000 --no-hrd --no-aud --info --no-idr-recovery-sei --deblock=-1:-1 --sao --selective-sao 4 --no-sao-non-deblock --limit-sao --no-repeat-headers --no-temporal-layers --log2-max-poc-lsb 8 --no-fades --no-psnr --no-ssim --no-interlace --range limited --colormatrix bt470bg --no-single-sei --no-hdr10 --output "E:\Temp\2020-10-15@17_44_14_4510_01.265"
results in:
Code:
x265 [info]: HEVC encoder version 3.4+26-ga82c6c7a7
x265 [info]: build info [Windows][GCC 10.2.0][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main 10 profile, Level-2.1 (Main tier)
x265 [info]: Thread pool created using 16 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 4 / wpp(6 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 3
x265 [info]: Keyframe min / max / scenecut / bias  : 25 / 250 / 40 / 5.00
x265 [info]: Cb/Cr QP Offset                     : -2 / -2
x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / off / off
x265 [info]: Rate Control / qCompress            : CRF-18.0 / 0.60
x265 [info]: tools: limit-modes rd=3 ssim-rd rdoq=2 psy-rdoq=10.00 rskip mode=1
x265 [info]: tools: signhide tmvp strong-intra-smoothing deblock(tC=-1:B=-1)
x265 [info]: tools: sao
MediaInfo report:
Code:
cpuid=1111039 / frame-threads=4 / numa-pools=16 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=640x352 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=25 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=0 / scenecut=40 / hist-scenecut=0 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=0 / limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=-1:-1 / sao / no-sao-non-deblock / rd=3 / selective-sao=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=0.00 / psy-rdoq=10.00 / no-rd-refine / no-lossless / cbqpoffs=-2 / crqpoffs=-2 / rc=crf / crf=18.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=0 / aq-strength=0.00 / no-cutree / zone-count=0 / no-strict-cbr / qg-size=64 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=5 / chromaloc=0 / display-window=0 / cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / opt-qp-pps / opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / hist-threshold=0.03 / no-opt-cu-delta-qp / no-aq-motion / no-hdr10 / no-hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / no-scenecut-aware-qpconformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0 / no-vbv-live-multi-pass
-> 'hevc-aq'

so it's an issue with 'minimize command line'.

so looking at command line before setting psy-rd to zero:
Code:
x265 --input - --output-depth 10 --y4m --profile main10 --limit-modes --no-early-skip --no-open-gop --opt-ref-list-length-pps --crf 18.00 --opt-qp-pps --cbqpoffs -2 --crqpoffs -2 --qpfile GENERATED_QP_FILE --limit-refs 0 --ssim-rd --psy-rd 2.50 --rdoq-level 2 --psy-rdoq 10.00 --aq-mode 0 --hevc-aq --no-cutree --deblock=-1:-1 --limit-sao --no-repeat-headers --range limited --colormatrix unknown --output OUTPUTFILE
and with psy-rd to 0:
Code:
x265 --tune psnr --input - --output-depth 10 --y4m --profile main10 --limit-modes --no-early-skip --no-open-gop --opt-ref-list-length-pps --crf 18.00 --opt-qp-pps --cbqpoffs -2 --crqpoffs -2 --qpfile GENERATED_QP_FILE --limit-refs 0 --ssim-rd --rdoq-level 2 --psy-rdoq 10.00 --hevc-aq --no-cutree --deblock=-1:-1 --limit-sao --no-repeat-headers --range limited --colormatrix unknown --output OUTPUTFILE

before: --psy-rd 2.50 --aq-mode 0 --hevc-aq
after: --tune psnr -hevc-aq

checking tune psnr:
Code:
if (!strcmp(tune, "psnr"))
{
    param->rc.aqStrength = 0.0;
    param->psyRd = 0.0;
    param->psyRdoq = 0.0;
}
see: https://bitbucket.org/multicoreware/...mmon/param.cpp (line 566-571)
so: "--aq-strength 0 --psy-rd 0 --psy-rdoq 0"
since "--aq-strength 0" should be the same as "--aq-mode 0".

now looking again at before and after:
before: --psy-rd 2.50 --aq-mode 0 --hevc-aq
after: --tune psnr --hevc-aq = --aq-mode 0 --psy-rd 0 --psy-rdoq 0 --hevc-aq
since after also has '--psy-rdoq 10.00'
after = --aq-mode 0 --psy-rd 0 --psy-rdoq 10.00 --hevc-aq

-> don't see where Hybrid is making a mistake. those command lines should be identical unless '--tune psnr' has other side effect that I don't know about.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote