rigaya / QSVEnc

QSVによる高速エンコードの性能実験
http://rigaya34589.blog135.fc2.com/blog-category-10.html
Other
313 stars 28 forks source link

Possible bug with chromaloc and dolby vision encoding #106

Closed kliffgomel closed 1 year ago

kliffgomel commented 1 year ago

When encoding video using dolby vision metadata, the chromaloc parameter does not work correctly. As an example, for original video with chromaloc topleft, I set the parameters to get the same chromaloc. d:\SOFT\QSVEnc\QSVEncC64.exe -i Alita_BL.hevc -o alita_qsvenc.hevc --avhw --crop 0,280,0,280 --fps 24000/1001 -c hevc --level 5.1 --profile main10 --tier high --output-depth 10 --d3d --vbr 26000 --max-bitrate 40000 --vbv-bufsize 80000 --quality best --la-depth 100 --la-quality slow --bframes 8 --ref 5 --b-pyramid --gop-len 240 --strict-gop --weightp --weightb --extbrc --sao none --sar 1:1 --aud --pic-struct --chromaloc 2 --colormatrix bt2020nc --colorprim bt2020 --transfer smpte2084 --colorrange tv --max-cll 737,130 --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1)" --dolby-vision-profile 8.1 --dolby-vision-rpu alita_RPU.bin --dhdr10-info alita_HDR10Plus.json --log alita_qsvenc_log.txt

But I got an output video with chromaloc left.

... Video Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile A compatible Width : 3 840 pixels Height : 1 600 pixels Display aspect ratio : 2.40:1 Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 ...

At the same time, video processing without using dolby vision with the same chromaloc parameters gives the correct result.

And I would like to point out one more bug, the given parameter vbv-bufsize 80000kbps , as indicated in the log file, does not work properly. ... Target usage 1 - best Encode Mode Bitrate Mode - VBR Bitrate 26000 kbps Max Bitrate 40000 kbps VBV Bufsize 14464 kbps ... alita_BL.ffprobe_video.txt alita_BL.mediainfo.txt alita_qsvenc.mediainfo.txt alita_qsvenc.ffprobe_video.txt alita_qsvenc_log.txt

rigaya commented 1 year ago

Thank you for letting me know the issue of vbv bufsize. QSVEnc 7.26 should fix --vbv-bufsize over 65536 not set properly.

When --dolby-vision-profile was used --chromaloc was intended to be ignored. QSVEnc 7.26 changes this behavior and --chromaloc shall work.

kliffgomel commented 1 year ago

Everything is fixed, thanks!

kliffgomel commented 1 year ago

Only there is a small error in the log for VBV bufsize: kb instead of kbps Target usage 1 - best Encode Mode Bitrate Mode - VBR Bitrate 26000 kbps Max Bitrate 40000 kbps VBV Bufsize 80000 kb

rigaya commented 1 year ago

Actually, I'm thinking that the previous "kbps" was wrong. "VBV bufsize" is "size" and not "rate", I thought that the unit shall be in "kilobit", and not "kilobit per sec" (used for "rate").

Help for x264 also shows unit is kilo bit.

      --vbv-bufsize <integer> Set size of the VBV buffer (kbit) [0]

Actually, I think I need to change the web help.