1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-20 07:48:15 +02:00
FFmpeg/libavcodec
Andreas Rheinhardt b8c45bbcbc libavcodec/cbs: Stop needlessly reallocating the units array
Currently, a fragment's unit array is constantly reallocated during
splitting of a packet. This commit changes this: One can keep the units
array by distinguishing between the number of allocated and the number
of valid units in the units array.

The more units a packet is split into, the bigger the benefit.
So MPEG-2 benefits the most; for a video coming from an NTSC-DVD
(usually 32 units per frame) the average cost of cbs_insert_unit (for a
single unit) went down from 6717 decicycles to 450 decicycles (based
upon 10 runs with 4194304 runs each); if each packet consists of only
one unit, it went down from 2425 to 448; for a H.264 video where most
packets contain nine units, it went from 4431 to 450.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
2019-02-25 21:40:13 +00:00
..
2019-01-01 21:11:47 +01:00
2018-12-23 15:30:13 +01:00
2018-12-10 11:19:36 +01:00
2018-12-13 19:30:39 +01:00
2018-11-10 23:48:27 +01:00
2018-12-23 20:24:47 +01:00
2018-12-20 18:40:41 +08:00
2019-01-16 01:29:18 +01:00
2019-02-23 22:48:35 +01:00
2018-12-23 15:30:13 +01:00
2018-12-01 19:41:48 +01:00
2019-01-12 17:16:47 +01:00
2019-01-25 16:53:27 +08:00
2019-01-25 16:53:27 +08:00
2018-12-03 23:34:05 +01:00
2018-11-18 22:59:29 +01:00
2018-11-18 22:59:29 +01:00
2018-11-18 22:59:29 +01:00
2019-01-20 21:42:20 +01:00
2018-12-23 15:30:13 +01:00
2018-12-31 02:37:08 +01:00
2018-12-10 21:38:08 +01:00
2019-02-23 22:48:35 +01:00