cbs_mpeg2: Improve performance of writing slices
authorAndreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Sun, 4 Nov 2018 04:48:40 +0000 (05:48 +0100)
committerMark Thompson <sw@jkqxz.net>
Sun, 11 Nov 2018 19:22:52 +0000 (19:22 +0000)
commit6df9020f45eaff66ba2c2bac98cda9ddaacb03f3
tree9eff811332dcc440242cdb5e66d28b0ab8710b67
parent252e79663de802d8d0b38fbfdfeeda2d86b4e611
cbs_mpeg2: Improve performance of writing slices

Instead of using a combination of bitreader and -writer for copying data,
one can byte-align the (obsolete and removed) bitreader to improve performance.
One can even use memcpy in the normal case.
This improved the time needed for writing the slicedata from 33618 to
2370 decicycles when tested on a video originating from a DVD (4194394
runs).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
libavcodec/cbs_mpeg2.c