#10856: Regression: VA-API + QSV transcoding fail, with large number of errors
-------------------------------------+-------------------------------------
             Reporter:  eero-t       |                    Owner:  (none)
                 Type:  defect       |                   Status:  new
             Priority:  important    |                Component:
                                     |  undetermined
              Version:  git-master   |               Resolution:
             Keywords:  regression   |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by eero-t):

 With QSV, warnings are about allocation failures:
 {{{
 ffmpeg version N-113614-g4f80441455 Copyright (c) 2000-2024 the FFmpeg
 developers
   built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
   configuration: --prefix=/opt/install/Nightly_3486 --enable-libmfx
 --enable-vaapi --enable-sdl2 --disable-libx265 --disable-libx264
 --disable-libvpx --enable-libvorbis --enable-libopus --disable-libmp3lame
 --disable-libass --disable-sndio --enable-libfreetype --enable-gpl
 --disable-doc
   libavutil      58. 36.101 / 58. 36.101
   libavcodec     60. 39.100 / 60. 39.100
   libavformat    60. 20.100 / 60. 20.100
   libavdevice    60.  4.100 / 60.  4.100
   libavfilter     9. 17.100 /  9. 17.100
   libswscale      7.  6.100 /  7.  6.100
   libswresample   4. 13.100 /  4. 13.100
   libpostproc    57.  4.100 / 57.  4.100
 -vsync is deprecated. Use -fps_mode
 [AVHWDeviceContext @ 0x56221bed3dc0] libva: VA-API version 1.21.0
 [AVHWDeviceContext @ 0x56221bed3dc0] libva: User requested driver 'iHD'
 [AVHWDeviceContext @ 0x56221bed3dc0] libva: Trying to open
 /opt/install/Nightly_3486/lib/dri/iHD_drv_video.so
 [AVHWDeviceContext @ 0x56221bed3dc0] libva: Found init function
 __vaDriverInit_1_21
 [AVHWDeviceContext @ 0x56221bed3dc0] libva: va_openDriver() returns 0
 [AVHWDeviceContext @ 0x56221bed3dc0] Initialised VAAPI connection: version
 1.21
 [AVHWDeviceContext @ 0x56221bed3dc0] VAAPI driver: Intel iHD driver for
 Intel(R) Gen Graphics - 24.1.4 (35b955d7a).
 [AVHWDeviceContext @ 0x56221bed3dc0] Driver not found in known nonstandard
 list, using standard behaviour.
 [AVHWDeviceContext @ 0x56221bed38c0] Use Intel(R) Media SDK to create MFX
 session, API version is 1.35, the required implementation version is 1.3
 [AVHWDeviceContext @ 0x56221bed38c0] Initialize MFX session:
 implementation version is 1.35
 [h264 @ 0x56221bfbb980] Reinit context to 1280x720, pix_fmt: yuv420p
 [h264 @ 0x56221bfba340] max_analyze_duration 500000 reached at 520000
 microseconds st:0
 Input #0, h264, from 'input/1280x720p_29.97_10mb_h264_cabac.264':
   Duration: N/A, bitrate: N/A
   Stream #0:0: Video: h264 (High), 1 reference frame, yuv420p(tv, bt709,
 progressive, left), 1280x720 (0x0) [SAR 1:1 DAR 16:9], 25 fps, 59.94 tbr,
 1200k tbn
 [out#0/h264 @ 0x56221bfbfc00] No explicit maps, mapping streams
 automatically...
 [vost#0:0/h264_qsv @ 0x56221bfc0280] Created video stream from input
 stream 0:0
 [h264_mp4toannexb @ 0x56221bfdac40] The input looks like it is Annex B
 already
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 (h264_qsv) -> h264 (h264_qsv))
 [vost#0:0/h264_qsv @ 0x56221bfc0280] Starting thread...
 [vf#0:0 @ 0x56221bfd4440] Starting thread...
 [vist#0:0/h264 @ 0x56221bfc0cc0] [dec:h264_qsv @ 0x56221bfc2bc0] Starting
 thread...
 [in#0/h264 @ 0x56221bfba180] Starting thread...
 Press [q] to stop, [?] for help
 [AVHWDeviceContext @ 0x7f693c002840] VAAPI driver: Intel iHD driver for
 Intel(R) Gen Graphics - 24.1.4 (35b955d7a).
 [AVHWDeviceContext @ 0x7f693c002840] Driver not found in known nonstandard
 list, using standard behaviour.
 [h264_qsv @ 0x56221bfda040] Decoder: output is video memory surface
 [h264_qsv @ 0x56221bfda040] Use Intel(R) Media SDK to create MFX session,
 the required implementation version is 1.35
 [AVHWDeviceContext @ 0x7f693c007440] VAAPI driver: Intel iHD driver for
 Intel(R) Gen Graphics - 24.1.4 (35b955d7a).
 [AVHWDeviceContext @ 0x7f693c007440] Driver not found in known nonstandard
 list, using standard behaviour.
 [h264_qsv @ 0x56221bfda040] Decoder: output is video memory surface
 [h264_qsv @ 0x56221bfda040] Use Intel(R) Media SDK to create MFX session,
 the required implementation version is 1.35
 [graph 0 input from stream 0:0 @ 0x7f6934003340] w:1280 h:720 pixfmt:qsv
 tb:1/1200000 fr:30000/1001 sar:1/1 csp:bt709 range:tv
 [graph 0 input from stream 0:0 @ 0x7f6934003340] video frame properties
 congruent with link at pts_time: 0
 [h264_qsv @ 0x56221bfc1d80] Using input frames context (format qsv) with
 h264_qsv encoder.
 [h264_qsv @ 0x56221bfc1d80] Encoder: input is video memory surface
 [h264_qsv @ 0x56221bfc1d80] Use Intel(R) Media SDK to create MFX session,
 the required implementation version is 1.35
 [h264_qsv @ 0x56221bfc1d80] Using the variable bitrate (VBR) ratecontrol
 method
 [h264_qsv @ 0x56221bfc1d80] MFMode:2
 [h264_qsv @ 0x56221bfc1d80] profile: avc high; level: 32
 [h264_qsv @ 0x56221bfc1d80] GopPicSize: 256; GopRefDist: 3; GopOptFlag:
 closed; IdrInterval: 0
 [h264_qsv @ 0x56221bfc1d80] TargetUsage: 4; RateControlMethod: VBR
 [h264_qsv @ 0x56221bfc1d80] BufferSizeInKB: 750; InitialDelayInKB: 375;
 TargetKbps: 2000; MaxKbps: 3000; BRCParamMultiplier: 1
 [h264_qsv @ 0x56221bfc1d80] NumSlice: 1; NumRefFrame: 2
 [h264_qsv @ 0x56221bfc1d80] RateDistortionOpt: OFF
 [h264_qsv @ 0x56221bfc1d80] RecoveryPointSEI: OFF
 [h264_qsv @ 0x56221bfc1d80] VDENC: OFF
 [h264_qsv @ 0x56221bfc1d80] Entropy coding: CABAC; MaxDecFrameBuffering: 2
 [h264_qsv @ 0x56221bfc1d80] NalHrdConformance: ON; SingleSeiNalUnit: ON;
 VuiVclHrdParameters: OFF VuiNalHrdParameters: ON
 [h264_qsv @ 0x56221bfc1d80] FrameRateExtD: 1001; FrameRateExtN: 30000
 [h264_qsv @ 0x56221bfc1d80] IntRefType: 0; IntRefCycleSize: 0;
 IntRefQPDelta: 0
 [h264_qsv @ 0x56221bfc1d80] MaxFrameSize: 353280; MaxSliceSize: 0
 [h264_qsv @ 0x56221bfc1d80] BitrateLimit: ON; MBBRC: OFF; ExtBRC: OFF
 [h264_qsv @ 0x56221bfc1d80] Trellis: auto
 [h264_qsv @ 0x56221bfc1d80] RepeatPPS: OFF; NumMbPerSlice: 0; LookAheadDS:
 2x
 [h264_qsv @ 0x56221bfc1d80] AdaptiveI: OFF; AdaptiveB: OFF; BRefType:off
 [h264_qsv @ 0x56221bfc1d80] MinQPI: 0; MaxQPI: 0; MinQPP: 0; MaxQPP: 0;
 MinQPB: 0; MaxQPB: 0
 [h264_qsv @ 0x56221bfc1d80] DisableDeblockingIdc: 0
 [h264_qsv @ 0x56221bfc1d80] SkipFrame: no_skip
 [h264_qsv @ 0x56221bfc1d80] PRefType: default
 [h264_qsv @ 0x56221bfc1d80] TransformSkip: unknown
 [h264_qsv @ 0x56221bfc1d80] IntRefCycleDist: 0
 [h264_qsv @ 0x56221bfc1d80] LowDelayBRC: OFF
 [h264_qsv @ 0x56221bfc1d80] MaxFrameSizeI: 0; MaxFrameSizeP: 0
 [h264_qsv @ 0x56221bfc1d80] ScenarioInfo: 0
 Output #0, h264, to 'output/0027_HD20_1.0.h264':
   Metadata:
     encoder         : Lavf60.20.100
   Stream #0:0: Video: h264, 1 reference frame, qsv(tv, bt709, progressive,
 left), 1280x720 (0x0) [SAR 1:1 DAR 16:9], q=2-31, 2000 kb/s, 29.97 fps,
 29.97 tbn
       Metadata:
         encoder         : Lavc60.39.100 h264_qsv
       Side data:
         cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 0 vbv_delay:
 N/A
 [out#0/h264 @ 0x56221bfbfc00] Starting thread...
 [h264_qsv @ 0x56221bfda040] get_buffer() failed
 [vist#0:0/h264 @ 0x56221bfc0cc0] [dec:h264_qsv @ 0x56221bfc2bc0] Error
 submitting packet to decoder: Cannot allocate memory
 [h264_qsv @ 0x56221bfda040] get_buffer() failed
 [vist#0:0/h264 @ 0x56221bfc0cc0] [dec:h264_qsv @ 0x56221bfc2bc0] Error
 submitting packet to decoder: Cannot allocate memory
 [h264_qsv @ 0x56221bfda040] get_buffer() failed
 [vist#0:0/h264 @ 0x56221bfc0cc0] [dec:h264_qsv @ 0x56221bfc2bc0] Error
 submitting packet to decoder: Cannot allocate memory
 ... <lot of similar warnings> ...
 [vist#0:0/h264 @ 0x56221bfc0cc0] [dec:h264_qsv @ 0x56221bfc2bc0] Decoding
 error: Cannot allocate memory
 [h264_qsv @ 0x56221bfda040] get_buffer() failed
 [vist#0:0/h264 @ 0x56221bfc0cc0] [dec:h264_qsv @ 0x56221bfc2bc0] Decoding
 error: Cannot allocate memory
 [h264_qsv @ 0x56221bfda040] get_buffer() failed
 [h264_qsv @ 0x56221bfda040] Too many errors when draining, this is a bug.
 Stop draining and force EOF.
 [vist#0:0/h264 @ 0x56221bfc0cc0] [dec:h264_qsv @ 0x56221bfc2bc0] Decoding
 error: Internal bug, should not have happened
 [vist#0:0/h264 @ 0x56221bfc0cc0] [dec:h264_qsv @ 0x56221bfc2bc0] Decoder
 returned EOF, finishing
 [vist#0:0/h264 @ 0x56221bfc0cc0] [dec:h264_qsv @ 0x56221bfc2bc0]
 Terminating thread with return code 0 (success)
 [vf#0:0 @ 0x56221bfd4440] Filtergraph returned EOF, finishing
 [vf#0:0 @ 0x56221bfd4440] All consumers returned EOF
 [vf#0:0 @ 0x56221bfd4440] Terminating thread with return code 0 (success)
 [vost#0:0/h264_qsv @ 0x56221bfc0280] Encoder thread received EOF
 [vost#0:0/h264_qsv @ 0x56221bfc0280] Terminating thread with return code 0
 (success)
 [out#0/h264 @ 0x56221bfbfc00] All streams finished
 [out#0/h264 @ 0x56221bfbfc00] Terminating thread with return code 0
 (success)
 [AVIOContext @ 0x56221bfda400] Statistics: 501868 bytes written, 0 seeks,
 2 writeouts
 [out#0/h264 @ 0x56221bfbfc00] Output file #0 (output/0027_HD20_1.0.h264):
 [out#0/h264 @ 0x56221bfbfc00]   Output stream #0:0 (video): 49 frames
 encoded; 49 packets muxed (501868 bytes);
 [out#0/h264 @ 0x56221bfbfc00]   Total: 49 packets (501868 bytes) muxed
 [out#0/h264 @ 0x56221bfbfc00] video:490KiB audio:0KiB subtitle:0KiB other
 streams:0KiB global headers:0KiB muxing overhead: 0.000000%
 frame=   49 fps=0.0 q=39.0 Lsize=     490KiB time=00:00:01.56
 bitrate=2560.2kbits/s speed=12.4x
 [in#0/h264 @ 0x56221bfba180] Input file #0
 (input/1280x720p_29.97_10mb_h264_cabac.264):
 [in#0/h264 @ 0x56221bfba180]   Input stream #0:0 (video): 3596 packets
 read (90045687 bytes); 49 frames decoded; 3563 decode errors;
 [in#0/h264 @ 0x56221bfba180]   Total: 3596 packets (90045687 bytes)
 demuxed
 [AVIOContext @ 0x56221bfc3100] Statistics: 90045687 bytes read, 0 seeks
 }}}
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10856#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to