avcodec/cbs_mpeg2: use memcpy when assembling fragments
authorJames Almer <jamrial@gmail.com>
Tue, 24 Apr 2018 02:39:54 +0000 (23:39 -0300)
committerJames Almer <jamrial@gmail.com>
Wed, 25 Apr 2018 19:45:43 +0000 (16:45 -0300)
commit0161d91db01ae0b5d516232d92764f5a898cedc6
tree16bbb4404d124810e8d006ef1135920052cc598e
parentbd90a2ec04d7b3fc370501731f8978681e254645
avcodec/cbs_mpeg2: use memcpy when assembling fragments

before:
419022 decicycles in assemble_fragment,    2047 runs,      1 skips

after:
104621 decicycles in assemble_fragment,    2045 runs,      3 skips

Benched with a 2 minutes long 720x480 DVD mpeg2 sample.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/cbs_mpeg2.c