hdr10plus_tool: Malloc error
First off, this is a fantastic script. Been doing some HDR10+ metadata retention with it. Thank you!
Now on to the issue at hand.
The script works well for most titles with HDR10+ metadata but then throws malloc errors on others. I’m not sure if anyone else is having the same experience.
I encode on a headless Ubuntu 18.04. This is the error that I just recently got:
x265 [info]: Main 10 profile, Level-5.1 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: Slices : 1
x265 [info]: frame threads / pool features : 3 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 3
x265 [info]: Keyframe min / max / scenecut / bias : 23 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0
x265 [info]: References / ref-limit cu / depth : 3 / off / on
x265 [info]: AQ: mode / str / qg-size / cu-tree : 3 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress : CRF-16.0 / 0.60
x265 [info]: VBV/HRD buffer / max-rate / init : 36000 / 18000 / 0.900
x265 [info]: tools: rd=3 psy-rd=1.00 rdoq=1 psy-rdoq=3.00 early-skip
x265 [info]: tools: rskip mode=1 signhide tmvp b-intra strong-intra-smoothing
x265 [info]: tools: lslices=6 deblock(tC=-3:B=-3) dhdr10-info
ffmpeg: malloc.c:3830: _int_malloc: Assertion `chunk_main_arena (bck->bk)' failed.speed=0.367x
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (10 by maintainers)
Commits related to this issue
- Add regression test for #20 — committed to quietvoid/hdr10plus_tool by quietvoid 4 years ago
It turns out there was actually an incorrect parsing, at least for Back to the Future. However it only seems to have affected around ~100 frames. So this title doesn’t require the new
--force-single-profileflag. This has been fixed in 0.3.0.I’ve created an issue at x265: https://bitbucket.org/multicoreware/x265_git/issues/574/x265-segmentation-fault-when-using-hdr10 So for now I will just add a warning when this situation happens, with an optional flag that will “fix” it.
All the tests pass, so it shouldn’t affect parsing. It’s just changing the output JSON to avoid mixing the different profiles, as that’s what seems to cause problems with x265. I don’t really know if it will affect playback tonemapping either.
@theweasley I’ve pushed a possible fix, can you test a build from master? Here’s some builds (hopefully they work): 20_fix.zip
I’ll keep the issue open until I can have a look at the new discs.