rigaya / QSVEnc

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

MFXENCODE: Failed to get required buffer size for MFXENCODE: invalid video parameters. #119

Closed Justin62628 closed 1 year ago

Justin62628 commented 1 year ago

QSVEnc Version:

7.34

Device:

Command:

QSVEncC64.exe --raw --input-csp yuv444p10le --fps 24/1 --input-res 1920x1080 -i - --fallback-rc --la-depth 50 --la-quality slow --extbrc --mbbrc --i-adapt --b-adapt --gop-len 250 -b 6 --ref 8 --b-pyramid --weightb --weightp --adapt-ltr --output-res 960x540 --output-depth 10 -c hevc --profile main10 --tier main --sao luma --ctu 64 -u best --cqp 10 -o test.mp4

Error Log:

--------------------------------------------------------------------------------
test.mp4
--------------------------------------------------------------------------------
Adaptve I-frame insert is not supported on current platform, disabled.
Adaptve B-frame insert is not supported on current platform, disabled.
ExtBRC is not supported on current platform, disabled.
AdaptiveLTR is not supported on current platform, disabled.
MBBRC is not supported on current platform, disabled.
HEVC SAO is not supported on current platform, disabled.
MFXENCODE:   Failed to get required buffer size for MFXENCODE: invalid video parameters.
Failed to initialize encoder. : invalid video parameters.

Additional Notes:

The same command works for 6.10 (r2609), whose log looks like:

--------------------------------------------------------------------------------
test.mp4
--------------------------------------------------------------------------------
Adaptve I-frame insert is not supported on current platform, disabled.
Adaptve B-frame insert is not supported on current platform, disabled.
ExtBRC is not supported on current platform, disabled.
AdaptiveLTR is not supported on current platform, disabled.
MBBRC is not supported on current platform, disabled.
HEVC CTU is not supported on current platform, disabled.
HEVC SAO is not supported on current platform, disabled.
vidprm.mfx.QPI value changed 10 -> 12 by driver
vidprm.mfx.QPP value changed 10 -> 12 by driver
vidprm.mfx.QPB value changed 10 -> 12 by driver
cop.SingleSeiNalUnit value changed off -> auto by driver
cop3.DirectBiasAdjustment value changed off -> auto by driver
cop3.GlobalMotionBiasAdjustment value changed off -> auto by driver
QSVEncC (x64) 6.10 (r2609) by rigaya, Mar  6 2022 00:52:15 (VC 1929/Win)
OS             Windows 10 x64 (19045) [UTF-8]
CPU Info       Intel Core i7-10875H @ 2.30GHz [TB: 4.45GHz] (8C/16T) <Coffeelake>
GPU Info       Intel UHD Graphics (24EU) 1200MHz (27.20.100.9664)
Media SDK      QuickSyncVideo (hardware encoder) PG, 2nd GPU, API v1.35
Async Depth    3 frames
Buffer Memory  d3d11, 80 work buffer
Input Info     raw(yuv444(10bit))->p010 [AVX2], 1920x1080, 24/1 fps
VPP            Resize 1920x1080 -> 960x540
AVSync         cfr
Output         HEVC(yuv420 10bit) main10 @ Level 4
               960x540p 1:1 24.000fps (24/1fps)
               avwriter: hevc => mp4
Target usage   1 - best
Encode Mode    Constant QP (CQP)
CQP Value      I:12  P:12  B:12
QP Limit       min: 12, max: 63
Trellis        Auto
Ref frames     8 frames
Bframes        6 frames, B-pyramid: on
Max GOP Length 250 frames
Ext. Features  WeightP WeightB QPOffset 

encoded 10 frames, 25.77 fps, 4962.70 kbps, 0.25 MB
encode time 0:00:00, CPULoad: 3.5
frame type IDR 1
frame type I   1,  total size  0.24 MB
frame type P   2,  total size  0.01 MB
frame type B   7,  total size  0.00 MB
rigaya commented 1 year ago

Thank you for letting me know the issue and the detailed report.

Coffeelake GPU does not support --ctu 64, so this was the cause of the error. There was a check for this ctu parameter, but the check was broken from QSVEnc 7.00 (which works fine at QSVEnc 6.10). QSVEnc 7.35 will check ctu support properly, and should be able to avoid this error.

Justin62628 commented 1 year ago

Thanks for the fix, 7.35 works like a charm