Opened 6 years ago
Closed 6 years ago
#7261 closed defect (fixed)
qsv transcoding doesn't work with a large look_ahead_depth
Reported by: | Zhong,Li | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | git-master | Keywords: | qsv |
Cc: | zhong.li@intel.com | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
qsv transcoding doesn't work with a large look_ahead_depth (look_ahead_depth > 47 doses't work in the example as below).
Report an error "Cannot allocate memory".
How to reproduce:
./ffmpeg -hwaccel qsv -c:v h264_qsv -i ./fate-suite/h264-conformance/BA_MW_D.264 -c:v h264_qsv -look_ahead 1 -look_ahead_depth 47 test.h264 ffmpeg started on 2018-06-15 at 17:00:55 Report written to "ffmpeg-20180615-170055.log" ffmpeg version N-91267-g238a8ae Copyright (c) 2000-2018 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609 configuration: --enable-libmfx --enable-libx264 --enable-gpl --disable-optimizations --enable-debug=3 libavutil 56. 18.102 / 56. 18.102 libavcodec 58. 20.101 / 58. 20.101 libavformat 58. 17.100 / 58. 17.100 libavdevice 58. 4.100 / 58. 4.100 libavfilter 7. 25.100 / 7. 25.100 libswscale 5. 2.100 / 5. 2.100 libswresample 3. 2.100 / 3. 2.100 libpostproc 55. 2.100 / 55. 2.100 Input #0, h264, from '/root/ffmpeg_fate_suite_lastest/fate-suite/h264-conformance/BA_MW_D.264': Duration: N/A, bitrate: N/A Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(progressive), 176x144, 25 fps, 25 tbr, 1200k tbn, 50 tbc Stream mapping: Stream #0:0 -> #0:0 (h264 (h264_qsv) -> h264 (h264_qsv)) Press [q] to stop, [?] for help Output #0, h264, to 'test.h264': Metadata: encoder : Lavf58.17.100 Stream #0:0: Video: h264 (h264_qsv), qsv, 176x144, q=2-31, 1000 kb/s, 25 fps, 25 tbn, 25 tbc Metadata: encoder : Lavc58.20.101 h264_qsv Side data: cpb: bitrate max/min/avg: 0/0/1000000 buffer size: 0 vbv_delay: -1 [h264_qsv @ 0x42adf80] get_buffer() failed Error while decoding stream #0:0: Cannot allocate memory [h264_qsv @ 0x42adf80] get_buffer() failed Error while decoding stream #0:0: Cannot allocate memory [h264_qsv @ 0x42adf80] get_buffer() failed Error while decoding stream #0:0: Cannot allocate memory [h264_qsv @ 0x42adf80] get_buffer() failed Error while decoding stream #0:0: Cannot allocate memory [h264_qsv @ 0x42adf80] get_buffer() failed Error while decoding stream #0:0: Cannot allocate memory [h264_qsv @ 0x42adf80] get_buffer() failed Error while decoding stream #0:0: Cannot allocate memory [h264_qsv @ 0x42adf80] get_buffer() failed Error while decoding stream #0:0: Cannot allocate memory [h264_qsv @ 0x42adf80] get_buffer() failed Error while decoding stream #0:0: Cannot allocate memory [h264_qsv @ 0x42adf80] get_buffer() failed Error while decoding stream #0:0: Cannot allocate memory [h264_qsv @ 0x42adf80] get_buffer() failed Error while decoding stream #0:0: Cannot allocate memory [h264_qsv @ 0x42adf80] get_buffer() failed Error while decoding stream #0:0: Cannot allocate memory [h264_qsv @ 0x42adf80] get_buffer() failed Error while decoding stream #0:0: Cannot allocate memory [h264_qsv @ 0x42adf80] get_buffer() failed [h264_qsv @ 0x42adf80] get_buffer() failed Error while decoding stream #0:0: Cannot allocate memory [h264_qsv @ 0x42adf80] get_buffer() failed Error while decoding stream #0:0: Cannot allocate memory [h264_qsv @ 0x42adf80] get_buffer() failed [h264_qsv @ 0x42adf80] Too many errors when draining, this is a bug. Stop draining and force EOF. Error while decoding stream #0:0: Internal bug, should not have happened frame= 56 fps=0.0 q=-0.0 Lsize= 240kB time=00:00:02.52 bitrate= 780.0kbits/s speed=22.7x video:240kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
Change History (2)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Provide a patch 6434b84460bb8b996bc52b33b2012e6b05d3a459. Now can use the option extra_hw_frames to add the pool size just like other HWACCEL codecs such as vaapi/nvdec, though this is not a prefect solution.