QSVEnc icon indicating copy to clipboard operation
QSVEnc copied to clipboard

A380 + Ubuntu 22.04 --icq doesnt work

Open alexdns1 opened this issue 3 years ago • 12 comments

Im trying to figure out why --icq doesnt work under Ubuntu 22.04 with A380 for AV1 CBR/VBR/CQP works just fine Any ideas ?

 QSVEncC --avhw -i  source.mp4 -c av1 --icq 20 -o test.mp4
--------------------------------------------------------------------------------
test.mp4
--------------------------------------------------------------------------------
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
PG is not supported on this platform, switched to FF mode.
Failed to initialize encoder. : device operation failure.


QSVEncC.exe finished with error!


QSVEncC --avhw -i  source.mp4 -c av1 --icq 20 --output-depth 10  -o test.mp4
--------------------------------------------------------------------------------
test.mp4
--------------------------------------------------------------------------------
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
PG is not supported on this platform, switched to FF mode.
Failed to initialize encoder. : device operation failure.


QSVEncC.exe finished with error!



QSVEncC --check-features
Checking for QSV...
QSVEncC (x64) 7.24 (r2930) by rigaya, Dec  5 2022 22:45:34 (gcc 11.3.0/Linux)
 Intel Media SDK API v2.07
 reader: raw, avsw, avhw [H.264/AVC, H.265/HEVC, MPEG2, VP8, VP9, AV1]
 vpp:    resize, deinterlace, denoise, detail-enhance, image-stab, delego, sub
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
Environment Info
OS : Ubuntu 22.04.1 LTS (5.17.0-1019-oem) x64
CPU: Intel Core i7-4790K @ 4.00GHz (4C/8T)
RAM: Used 1201 MB, Total 32039 MB
GPU: Intel Graphics / Driver : Intel iHD driver for Intel(R) Gen Graphics - 22.5.1 (a12fef1)

libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: VA-API version 1.15.0
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: Found init function __vaDriverInit_1_15
libva info: Found init function __vaDriverInit_1_15
libva info: VA-API version 1.15.0
libva info: VA-API version 1.15.0
libva info: VA-API version 1.15.0
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: VA-API version 1.15.0
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: VA-API version 1.15.0
libva info: Found init function __vaDriverInit_1_15
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: Found init function __vaDriverInit_1_15
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
libva info: va_openDriver() returns 0
libva info: va_openDriver() returns 0
libva info: va_openDriver() returns 0
libva info: va_openDriver() returns 0
libva info: va_openDriver() returns 0
libva info: va_openDriver() returns 0
libva info: va_openDriver() returns 0
libva info: va_openDriver() returns 0
libva info: va_openDriver() returns 0
Media SDK Version: Hardware API v2.07

Supported Enc features:
Codec: H.264/AVC FF
             CBR   VBR   AVBR  QVBR  CQP   LA    LAHRD ICQ   LAICQ VCM
RC mode       o     o     x     o     o     x     x     o     x     x
10bit depth   x     x     x     x     x     x     x     x     x     x
Hyper Mode    x     x     x     x     x     x     x     x     x     x
Interlace     x     x     x     x     x     x     x     x     x     x
VUI info      o     o     x     o     o     x     x     o     x     x
Trellis       o     o     x     o     o     x     x     o     x     x
BFrame/GopRef o     o     x     o     o     x     x     o     x     x
Adaptive_I    x     x     x     x     x     x     x     x     x     x
Adaptive_B    x     x     x     x     x     x     x     x     x     x
WeightP       o     o     x     o     o     x     x     o     x     x
WeightB       o     o     x     o     o     x     x     o     x     x
FadeDetect    x     x     x     x     x     x     x     x     x     x
B_Pyramid     o     o     x     o     o     x     x     o     x     x
 +ManyBframes o     o     x     o     o     x     x     o     x     x
PyramQPOffset x     x     x     x     x     x     x     x     x     x
MBBRC         o     o     x     o     x     x     x     o     x     x
ExtBRC        o     o     x     x     x     x     x     x     x     x
AdaptiveRef   o     o     x     o     o     x     x     o     x     x
AdaptiveLTR   x     x     x     x     x     x     x     x     x     x
AdaptiveCQM   x     x     x     x     x     x     x     x     x     x
LA Quality    x     x     x     x     x     x     x     x     x     x
QP Min/Max    o     o     x     o     o     x     x     o     x     x
IntraRefresh  x     x     x     x     x     x     x     x     x     x
No Deblock    x     x     x     x     x     x     x     x     x     x
No GPB        x     x     x     x     x     x     x     x     x     x
Windowed BRC  x     x     x     x     x     x     x     x     x     x
PerMBQP(CQP)  o     o     x     x     o     x     x     x     x     x
DirectBiasAdj o     o     x     o     o     x     x     o     x     x
MVCostScaling o     o     x     o     o     x     x     o     x     x
SAO           x     x     x     x     x     x     x     x     x     x
Max CTU Size  x     x     x     x     x     x     x     x     x     x
TSkip         x     x     x     x     x     x     x     x     x     x



Codec: H.265/HEVC FF
             CBR   VBR   AVBR  QVBR  CQP   LA    LAHRD ICQ   LAICQ VCM
RC mode       o     o     x     o     o     x     x     x     x     o
10bit depth   o     o     x     o     o     x     x     x     x     o
Hyper Mode    x     x     x     x     x     x     x     x     x     x
Interlace     x     x     x     x     o     x     x     x     x     x
VUI info      o     o     x     o     o     x     x     x     x     o
Trellis       x     x     x     x     x     x     x     x     x     x
BFrame/GopRef o     o     x     o     o     x     x     x     x     o
Adaptive_I    o     o     x     o     o     x     x     x     x     o
Adaptive_B    o     o     x     o     o     x     x     x     x     o
WeightP       o     o     x     o     o     x     x     x     x     o
WeightB       o     o     x     o     o     x     x     x     x     o
FadeDetect    o     o     x     o     o     x     x     x     x     o
B_Pyramid     o     o     x     o     o     x     x     x     x     o
 +ManyBframes o     o     x     o     o     x     x     x     x     o
PyramQPOffset x     x     x     x     o     x     x     x     x     x
MBBRC         o     o     x     o     x     x     x     x     x     o
ExtBRC        o     o     x     x     x     x     x     x     x     x
AdaptiveRef   x     x     x     x     x     x     x     x     x     x
AdaptiveLTR   o     o     x     o     o     x     x     x     x     o
AdaptiveCQM   o     o     x     o     o     x     x     x     x     o
LA Quality    x     x     x     x     x     x     x     x     x     x
QP Min/Max    o     o     x     o     x     x     x     x     x     o
IntraRefresh  o     o     x     o     o     x     x     x     x     o
No Deblock    o     o     x     o     o     x     x     x     x     o
No GPB        o     o     x     o     o     x     x     x     x     o
Windowed BRC  x     x     x     x     x     x     x     x     x     x
PerMBQP(CQP)  o     o     x     o     o     x     x     x     x     o
DirectBiasAdj x     x     x     x     x     x     x     x     x     x
MVCostScaling x     x     x     x     x     x     x     x     x     x
SAO           o     o     x     o     o     x     x     x     x     o
Max CTU Size  x     x     x     x     x     x     x     x     x     x
TSkip         o     o     x     o     o     x     x     x     x     o



Codec: VP9 FF
             CBR   VBR   AVBR  QVBR  CQP   LA    LAHRD ICQ   LAICQ VCM
RC mode       o     o     x     x     o     x     x     o     x     x
10bit depth   o     o     x     x     o     x     x     o     x     x
Hyper Mode    x     x     x     x     x     x     x     x     x     x
Interlace     x     x     x     x     x     x     x     x     x     x
VUI info      x     x     x     x     x     x     x     x     x     x
Trellis       x     x     x     x     x     x     x     x     x     x
BFrame/GopRef x     x     x     x     x     x     x     x     x     x
Adaptive_I    x     x     x     x     x     x     x     x     x     x
Adaptive_B    x     x     x     x     x     x     x     x     x     x
WeightP       x     x     x     x     x     x     x     x     x     x
WeightB       x     x     x     x     x     x     x     x     x     x
FadeDetect    x     x     x     x     x     x     x     x     x     x
B_Pyramid     x     x     x     x     x     x     x     x     x     x
 +ManyBframes x     x     x     x     x     x     x     x     x     x
PyramQPOffset x     x     x     x     x     x     x     x     x     x
MBBRC         o     o     x     x     x     x     x     o     x     x
ExtBRC        x     x     x     x     x     x     x     x     x     x
AdaptiveRef   x     x     x     x     x     x     x     x     x     x
AdaptiveLTR   x     x     x     x     x     x     x     x     x     x
AdaptiveCQM   x     x     x     x     x     x     x     x     x     x
LA Quality    x     x     x     x     x     x     x     x     x     x
QP Min/Max    x     x     x     x     x     x     x     x     x     x
IntraRefresh  x     x     x     x     x     x     x     x     x     x
No Deblock    x     x     x     x     x     x     x     x     x     x
No GPB        x     x     x     x     x     x     x     x     x     x
Windowed BRC  x     x     x     x     x     x     x     x     x     x
PerMBQP(CQP)  x     x     x     x     x     x     x     x     x     x
DirectBiasAdj x     x     x     x     x     x     x     x     x     x
MVCostScaling x     x     x     x     x     x     x     x     x     x
SAO           x     x     x     x     x     x     x     x     x     x
Max CTU Size  x     x     x     x     x     x     x     x     x     x
TSkip         x     x     x     x     x     x     x     x     x     x



Codec: AV1 FF
             CBR   VBR   AVBR  QVBR  CQP   LA    LAHRD ICQ   LAICQ VCM
RC mode       o     o     x     x     o     x     x     o     x     x
10bit depth   o     o     x     x     o     x     x     o     x     x
Hyper Mode    x     x     x     x     x     x     x     x     x     x
Interlace     x     x     x     x     x     x     x     x     x     x
VUI info      o     o     x     x     o     x     x     o     x     x
Trellis       x     x     x     x     x     x     x     x     x     x
BFrame/GopRef o     o     x     x     o     x     x     o     x     x
Adaptive_I    x     x     x     x     x     x     x     x     x     x
Adaptive_B    x     x     x     x     x     x     x     x     x     x
WeightP       x     x     x     x     x     x     x     x     x     x
WeightB       x     x     x     x     x     x     x     x     x     x
FadeDetect    x     x     x     x     x     x     x     x     x     x
B_Pyramid     o     o     x     x     o     x     x     o     x     x
 +ManyBframes o     o     x     x     o     x     x     o     x     x
PyramQPOffset x     x     x     x     x     x     x     x     x     x
MBBRC         x     x     x     x     x     x     x     x     x     x
ExtBRC        x     x     x     x     x     x     x     x     x     x
AdaptiveRef   x     x     x     x     x     x     x     x     x     x
AdaptiveLTR   x     x     x     x     x     x     x     x     x     x
AdaptiveCQM   x     x     x     x     x     x     x     x     x     x
LA Quality    x     x     x     x     x     x     x     x     x     x
QP Min/Max    x     x     x     x     x     x     x     x     x     x
IntraRefresh  x     x     x     x     x     x     x     x     x     x
No Deblock    x     x     x     x     x     x     x     x     x     x
No GPB        x     x     x     x     x     x     x     x     x     x
Windowed BRC  x     x     x     x     x     x     x     x     x     x
PerMBQP(CQP)  x     x     x     x     x     x     x     x     x     x
DirectBiasAdj x     x     x     x     x     x     x     x     x     x
MVCostScaling x     x     x     x     x     x     x     x     x     x
SAO           x     x     x     x     x     x     x     x     x     x
Max CTU Size  x     x     x     x     x     x     x     x     x     x
TSkip         x     x     x     x     x     x     x     x     x     x



libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
Supported Vpp features:

Resize                o
Deinterlace           o
Scaling Quality       o
Denoise               o
Denoise2              o
Mctf                  x
Rotate                x
Mirror                o
Detail Enhancement    o
Proc Amp.             o
Image Stabilization   x
Video Signal Info     o
FPS Conversion        o
FPS Conversion (Adv.) o


libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
Supported Decode features:

        H.264  HEVC   MPEG2  VP8    VP9    AV1
yuv420  8bit  10bit   8bit         10bit  10bit
yuv422        10bit
yuv444        12bit                12bit


alexdns1 avatar Dec 06 '22 08:12 alexdns1

Here is also a trace log


QSVEncC --avhw -i  source.mp4 -c av1 --icq 20 --log-level trace -o test.mp4
--------------------------------------------------------------------------------
test.mp4
--------------------------------------------------------------------------------
QSVEncC    7.24 (x64)
OS        Ubuntu 22.04.1 LTS (5.17.0-1019-oem) x64
CPU Info  Intel Core i7-4790K @ 4.00GHz (4C/8T)
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
GPU Info  Intel Graphics / Driver : Intel iHD driver for Intel(R) Gen Graphics - 22.5.1 (a12fef1)
QSVDevice::init: Start initializing device 1... memType: va
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
Impl #0: 2 mfx-gen, acc 1024, accdesc 256, adapter id 1840278016
MFXVideoSession2::init: try init by MFXCreateSession.
InitSession(va): no error..
InitSession: mfx lib version: 2.07, impl hw,via_va
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
vadrm: VAAPIDeviceDRM: hWindow (nil), Init nViews 0, nAdapterNum 0...
HWDevice: init device success.
QSVDevice::init: initialized session with memType va.
CreateAllocator: MemType: va
CreateAllocator: HW device GetHandle success.
CreateAllocator: set HW device handle to main session.
CreateAllocator: HW device GetHandle success. : 0x6daed6d0
CreateAllocator: frame allocator set to session.
CreateAllocator: frame allocator initialized.
QSVDevice::init: initialized allocator.
loaded OpenCL.
OpenCL platform count: 1
OpenCL platform #0[0x557b6de4acc0]: Intel(R) OpenCL HD Graphics Intel(R) Corporation OpenCL 3.0 [FULL_PROFILE]
  extensions:cl_khr_byte_addressable_store cl_khr_device_uuid cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_command_queue_families cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_driver_diagnostics cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_intel_subgroups_char cl_intel_subgroups_long cl_khr_il_program cl_intel_mem_force_host_memory cl_khr_subgroup_extended_types cl_khr_subgroup_non_uniform_vote cl_khr_subgroup_ballot cl_khr_subgroup_non_uniform_arithmetic cl_khr_subgroup_shuffle cl_khr_subgroup_shuffle_relative cl_khr_subgroup_clustered_reduce cl_intel_device_attribute_query cl_khr_suggested_local_work_size cl_intel_split_work_group_barrier cl_intel_spirv_media_block_io cl_intel_spirv_subgroups cl_khr_spirv_no_integer_wrap_decoration cl_intel_unified_shared_memory cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_3d_image_writes cl_intel_media_block_io cl_intel_bfloat16_conversions cl_intel_va_api_media_sharing cl_intel_sharing_format_query cl_khr_pci_bus_info cl_intel_create_buffer_with_properties cl_intel_dot_accumulate cl_intel_subgroup_local_block_io cl_intel_subgroup_matrix_multiply_accumulate cl_intel_subgroup_split_matrix_multiply_accumulate
Add platform #0[0x557b6de4acc0] to list.
Created OpenCL platform list: 1
f_clGetDeviceIDsFromVA_APIMediaAdapterINTEL(vadev = 0x557b6daed6d0)
VA device count = 1
clGetDeviceIDsFromVA_APIMediaAdapterINTEL: Success
QSVDevice::init: Start initializing device 2... memType: va
Impl #0: 2 mfx-gen, acc 1024, accdesc 256, adapter id 1840278016
InitSession(va): the specified object is not found..
Failed to init session: the specified object is not found..
QSVDevice::init: failed to initialize session: the specified object is not found..
Close device 2...
Closing session...
Closing device...
Closing allocator...
Device 2 closed.
Set csp thread param: all (0x0xffffffffffffffff), priority=normal, throttling=auto.
avhw reader selected.
InitInput: input selected : 7.
avqsv: opened file "source.mp4".
avqsv: got stream information.
avqsv: found video stream, stream idx 0
avqsv: use video stream #0 for input, codec h264, stream time_base 1/25000, codec_timebase 1/50.
avqsv: hdr10plusMetadataCopy: off
avqsv: can be decoded by qsv.
avqsv: initialized h264_mp4toannexb filter.
avqsv: start predecode.
avqsv: GetHeader extradata(46): 01 64 00 2a ff e1 00 1a 67 64 00 2a ac 2c a5 01 e0 19 e9 a8 08 08 0a 00 00 03 00 02 00 00 03 00 65 08 01 00 05 68 e9 09 35 25 fd f8 f8 00
avqsv: GetHeader: changed 46 bytes -> 39 bytes by h264_mp4toannexb.
avqsv: GetHeader: 39 bytes.
avqsv: GetHeader(39): 00 00 00 01 67 64 00 2a ac 2c a5 01 e0 19 e9 a8 08 08 0a 00 00 03 00 02 00 00 03 00 65 08 00 00 00 01 68 e9 09 35 25
avqsv: initialized h264 codec context for parser: time_base: 1/50, pkt_timebase: 1/25000.
avqsv: fps decoder 25/1, invalid: false
avqsv: maxCheckFrames 128, maxCheckSec: 1.000e+99
avqsv: found first key frame: timestamp 0 (0), offset 0
avqsv: read 128 packets.
avqsv: checking 111 frame samples.
avqsv: stream timebase 1/50
avqsv: decoder fps     25/1
avqsv: duration histgram of 1 frames
avqsv: 1000 [111 frames]
avqsv: using popular duration...
avqsv: fps mul:         1001
avqsv: raw avgDuration: 1000.000000
avqsv: estimatedAvgFps: 25025/1001
avqsv: use decoder fps...
avqsv: final AvgFps (raw64): 25025/1001
avqsv: final AvgFps (gcd): 25/1
avqsv: final AvgFps (round): 25/1
avqsv: avqsv: H.264/AVC, 1920x816, 25/1 fps
avqsv: streamFirstKeyPts: 0
avqsv: matrix:bt709,colorprim:bt709,transfer:bt709,range:limited,chromaloc:left
avqsv: sar 0:0, bitdepth 8
initReaders: Success.
vfr mode automatically enabled with timebase 1/100
InitInput: Success.
InitSession: mfx lib version: 2.07, impl hw,via_va
InitSession: Success.
Got HW device handle: 0x557b6daed6d0.
loaded OpenCL.
OpenCL platform count: 1
OpenCL platform #0[0x557b6de4acc0]: Intel(R) OpenCL HD Graphics Intel(R) Corporation OpenCL 3.0 [FULL_PROFILE]
  extensions:cl_khr_byte_addressable_store cl_khr_device_uuid cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_command_queue_families cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_driver_diagnostics cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_intel_subgroups_char cl_intel_subgroups_long cl_khr_il_program cl_intel_mem_force_host_memory cl_khr_subgroup_extended_types cl_khr_subgroup_non_uniform_vote cl_khr_subgroup_ballot cl_khr_subgroup_non_uniform_arithmetic cl_khr_subgroup_shuffle cl_khr_subgroup_shuffle_relative cl_khr_subgroup_clustered_reduce cl_intel_device_attribute_query cl_khr_suggested_local_work_size cl_intel_split_work_group_barrier cl_intel_spirv_media_block_io cl_intel_spirv_subgroups cl_khr_spirv_no_integer_wrap_decoration cl_intel_unified_shared_memory cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_3d_image_writes cl_intel_media_block_io cl_intel_bfloat16_conversions cl_intel_va_api_media_sharing cl_intel_sharing_format_query cl_khr_pci_bus_info cl_intel_create_buffer_with_properties cl_intel_dot_accumulate cl_intel_subgroup_local_block_io cl_intel_subgroup_matrix_multiply_accumulate cl_intel_subgroup_split_matrix_multiply_accumulate
Add platform #0[0x557b6de4acc0] to list.
Created OpenCL platform list: 1
Created Intel OpenCL platform.
f_clGetDeviceIDsFromVA_APIMediaAdapterINTEL(vadev = 0x557b6daed6d0)
VA device count = 1
clGetDeviceIDsFromVA_APIMediaAdapterINTEL: Success
create OpenCL Context for [0x557b6de92260]
Enable va interop for (nil)
createQueue for device : 0x557b6de92260
CheckParam: Success.
avqsv: GetHeader(39): 00 00 00 01 67 64 00 2a ac 2c a5 01 e0 19 e9 a8 08 08 0a 00 00 03 00 02 00 00 03 00 65 08 00 00 00 01 68 e9 09 35 25
Impl #0: 2 mfx-gen, acc 1024, accdesc 256, adapter id 1840278016
MFXVideoSession2::init: try init by MFXCreateSession.
InitSession(va): no error..
MFXDEC: InitSession: mfx lib version: 2.07, impl hw,via_va
MFXDEC: Got HW device handle: 0x557b6daed6d0.
MFXDEC: set HW device handle 0x557b6daed6d0 to encode session.
MFXDEC: Set allocator for decode.
MFXDEC: InitMfxDecParams: QSVDec prm: H.264/AVC, Level 42, Profile 100
InitMfxDecParams: Frame: nv12, 1920x816p [0,0,1920,816] 0:0
InitMfxDecParams: color format nv12, chroma yuv420, bitdepth 0, shift 0, picstruct prog
No filters required.
encodeBitDepth: 8, codecMaxQP: 255.
PG is not supported on this platform, switched to FF mode.
Detected avaliable features for hw API v2.07, AV1, ICQ (Intelligent Const. Quality)
RC mode       o
10bit depth   o
Hyper Mode    x
Interlace     x
VUI info      o
Trellis       x
BFrame/GopRef o
Adaptive_I    x
Adaptive_B    x
WeightP       x
WeightB       x
FadeDetect    x
B_Pyramid     o
 +ManyBframes o
PyramQPOffset x
MBBRC         x
ExtBRC        x
AdaptiveRef   x
AdaptiveLTR   x
AdaptiveCQM   x
LA Quality    x
QP Min/Max    x
IntraRefresh  x
No Deblock    x
No GPB        x
Windowed BRC  x
PerMBQP(CQP)  x
DirectBiasAdj x
MVCostScaling x
SAO           x
Max CTU Size  x
TSkip         x


InitMfxEncParams: Output FPS 25/1
InitMfxEncParams: Auto GOP Length: 250
InitMfxEncParams: set ext param CDO2.
InitMfxEncParams: set ext param CDO3.
InitMfxEncParams: set ext param A1BS.
InitMfxEncParams: enc input frame 1920x816 (0,0,1920,816)
InitMfxEncParams: enc input color format nv12, chroma yuv420, bitdepth 8, shift 0, picstruct prog
InitMfxEncParams: set all enc params.
selected mode on : score 4: codec 0, resolution 2, tu 2, filter 0, speed limit off.
perf monitor: Performace Monitor: none
perf monitor: Performace Plot   : none
Output: Using avformat writer.
avout: output filename: "test.mp4"
avout: allocated internal buffer 8 MB.
avout: set external output buffer 8 MB.
avout: output video stream fps: 25/1
avout: opened video avcodec
avout: Set Video language: key language, value eng
avout: output video stream timebase: 1/100
avout: bDtsUnavailable: off
avout: Initialized video output.
avout: Copy Container Metadata: key major_brand, value mp42
avout: Copy Container Metadata: key minor_version, value 0
avout: Copy Container Metadata: key compatible_brands, value mp42mp41
avout: Copy Container Metadata: key creation_time, value 2021-07-24T18:17:54.000000Z
avout: avwriter: av1 => mp4
avout: starting output thread...
perf monitor: Set perf monitor thread param all (0x0xffffffffffffffff), priority=background, throttling=on.
avout: Set output thread param: all (0x0xffffffffffffffff), priority=normal, throttling=on.
Output: Initialized avformat writer.
async depth automatically set to 3
pipeline element count: 2
ResetMFXComponents: Start...
ResetMFXComponents: Enc closed.
MFXDEC: Dec Closed.
ResetMFXComponents: Dec closed.
avqsv: GetHeader(39): 00 00 00 01 67 64 00 2a ac 2c a5 01 e0 19 e9 a8 08 08 0a 00 00 03 00 02 00 00 03 00 65 08 00 00 00 01 68 e9 09 35 25
Created pipeline.
  MFXDEC
  CHECKPTS
  MFXENCODE

allocFrames: m_nAsyncDepth - 3 frames
AllocFrames: MFXDEC-MFXENCODE
MFXDEC:   MFXDEC required buffer: 11 [external,dxvadec,dec]
MFXENCODE:   MFXENCODE required buffer: 13 [external,dxvadec,enc]
AllocFrames: Id: 0, MFXDEC-MFXENCODE, type: external,dxvadec,enc,dec, nv12 1920x816 [0,0,1920,816], request 28 frames
MFXDEC: allocWorkSurfaces:   cleared old surfaces: no error..
allocVA: QSVAllocator: FrameAlloc: external,dxvadec,enc,dec, 28 frames.
allocVA: QSVAllocator: Allocate type external.
allocVA: QSVAllocator: FrameAlloc success.
MFXDEC: allocWorkSurfaces:   allocated 28 frames.
ResetMFXComponents: there might be error below, but it might be internal error which could be ignored.
Failed to initialize encoder. : device operation failure.
Clear vpp filters...
Closing m_pmfxDEC/ENC/VPP...
Clear pipeline tasks and allocated frames...
allocVA: QSVAllocator: FrameFree...
Closing enc status...
Closing device...
Close device 1...
Closing session...
Closing device...
Closing allocator...
allocVA: QSVAllocator: Closed.
Device 1 closed.
Closing CL Context...
Closed CL m_copy program.
Closed CL Queue.
Closed CL Context.
Closed CL Platform.
Closing audio readers (if used)...
Closing writer...
avout: Closing...
avout: set format brand "mp42".
avout: set faststart.
avout: calc dts, first dts 0 x (timebase).
avout: closed output thread...
avout: closed queues...
avout: Closed avformat context.
avout: Closed File Pointer.
avout: Closed format.
avout: Closed video context.
avout: Closed video.
avout: Closed.
avout: Closing...
avout: closed queues...
avout: Closed format.
avout: Closed video.
avout: Closed.
Closing reader...
avqsv: Closing...
avqsv: Closed Stream Packet Buffer.
avqsv: Closed caption handler.
avqsv: Closing avformat context...
avqsv: Closed avformat context.
avqsv: Free formatOptions...
avqsv: Freed formatOptions.
avqsv: Closed format.
avqsv: Close parser...
avqsv: Closed parser.
avqsv: Close codecCtx for parser...
avqsv: Closed codecCtx for parser.
avqsv: Free bsf...
avqsv: Freed bsf.
avqsv: Free first video packet...
avqsv: Freed first video packet.
avqsv: Free extra data...
avqsv: Freed extra data.
avqsv: Closed video.
Closing EncodeStatus...
avqsv: Cleared frame pos list.
avqsv: Closed.
avqsv: Closing...
avqsv: Closed Stream Packet Buffer.
avqsv: Closed caption handler.
avqsv: Closed format.
avqsv: Closed video.
avqsv: Cleared frame pos list.
avqsv: Closed.
avqsv: Closing...
avqsv: Close...
Closing perf monitor...
perf monitor: Closing thread...
perf monitor: Closed thread.
Closed pipeline.


QSVEncC.exe finished with error!


alexdns1 avatar Dec 06 '22 08:12 alexdns1

Is ICQ already supported with the current linux media-driver and vpl stack? last time I checked (some weeks ago) it was only CBR/VBR/CQP - you get a clear error message when using current ffmpeg-cartwheel - it says ICQ not supported by driver yet, and that comes from Intel devs...

kind regards

bavdevc avatar Dec 14 '22 05:12 bavdevc

No clue im just getting a o on ICQ thats why im asking ? :)

alexdns1 avatar Dec 14 '22 10:12 alexdns1

no problem @alexdns1 in the meantime you could try latest https://github.com/intel-media-ci/cartwheel-ffmpeg with all the patches and see for yourself if the intel driver can do ICQ encoding - I would love to see a positive signal there, then I can switch back from Win10 to linux .... finally - I'm trying every 4 weeks or so

bavdevc avatar Dec 17 '22 01:12 bavdevc

@bavdevc trying to make it work on Fedora now which is my prefered distro so ill get back to ubuntu if i cant and ill tell you if ffmpeg works

alexdns1 avatar Dec 18 '22 08:12 alexdns1

@alexdns1 btw. I re-run my tests with linux today. ICQ with H264 is working fine, HEVC and AV1 is still broken - see also https://github.com/intel/media-driver/issues/1597 for some updates

bavdevc avatar Jan 23 '23 22:01 bavdevc

update 2023/February: with the latest intel media-driver 23.1 from git - ICQ mode for AV1 and HEVC still not working, I start wondering if Intel will provide some linux support before they're saying that product is too old, we don't support that anymore....

bavdevc avatar Feb 14 '23 20:02 bavdevc

little update - Intel agreed to fix it for AV1/linux as you can see in the referenced issue:

We will enable ICQ mode, the patch will be ready in few weeks

bavdevc avatar May 23 '23 18:05 bavdevc

ICQ is based on various CQP parameters for each codecs, you can convert to CQP encoding mode and then adjust the CQP values, such as 0-255 for AV1, 0-61 for HEVC, etc... and it allows you to fine tune desired quality, as you can enter CQP for B-frames and I-Frames etc too.

Feierkuula avatar Sep 21 '23 04:09 Feierkuula

With the very recent media-driver libs, --icq is working for me under Ubuntu 22.10.

Feierkuula avatar Sep 25 '23 12:09 Feierkuula

yes, tested ok - you just have to find a way to get the latest changes from intel, because all the repositories have some kind of outdated packages - media-driver or onevpl gpu runtime...nothing works out of the box

just run something like the following commands to update all intel stuff needed

mkdir ~/intel

cd ~/intel
git clone https://github.com/intel/libva.git
cd libva
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
make -j"$(nproc)"
sudo make install

cd ~/intel
git clone https://github.com/intel/gmmlib.git
cd gmmlib
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib/x86_64-linux-gnu -DCMAKE_BUILD_TYPE=Release ..
make -j"$(nproc)"
sudo make install

cd ~/intel
git clone https://github.com/intel/media-driver.git
mkdir build_media
cd build_media
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib/x86_64-linux-gnu ../media-driver
make -j"$(nproc)"
sudo make install
    
cd ~/intel
git clone https://github.com/oneapi-src/oneVPL-intel-gpu onevpl-gpu
cd onevpl-gpu
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib/x86_64-linux-gnu ..
make -j"$(nproc)"
sudo make install

you need those: https://github.com/intel/media-driver/issues/1597#issuecomment-1720693041

bavdevc avatar Dec 22 '23 19:12 bavdevc

ICQ is based on various CQP parameters for each codecs, you can convert to CQP encoding mode and then adjust the CQP values, such as 0-255 for AV1, 0-61 for HEVC, etc... and it allows you to fine tune desired quality, as you can enter CQP for B-frames and I-Frames etc too.

really? I noticed some other differences between CQP and ICQ - you cannot have ICQ features with CQP mode

bavdevc avatar Dec 22 '23 19:12 bavdevc

I'll close this issue, as the latest driver at Ubuntu 22.04 will make ICQ AV1 encoding work out fine.

qsvencc_ubuntu2204_av1_icq

rigaya avatar Jul 31 '24 09:07 rigaya