h264dsp: Factorize code into a new function, h264_find_start_code_candidate
authorBen Avison <bavison@riscosopen.org>
Mon, 5 Aug 2013 12:12:47 +0000 (13:12 +0100)
committerMartin Storsjö <martin@martin.st>
Thu, 8 Aug 2013 09:08:30 +0000 (12:08 +0300)
commit218d6844b37d339ffbf2044ad07d8be7767e2734
treebc01481714ca5d7550ecb00d454a4c220cf1e959
parent7a82022ee2f9b1fad991ace0936901e7419444be
h264dsp: Factorize code into a new function, h264_find_start_code_candidate

This performs the start code search which was previously part of
h264_find_frame_end() - the most CPU intensive part of the function.

By itself, this results in a performance regression:
              Before          After
              Mean   StdDev   Mean   StdDev  Change
Overall time  2925.6 26.2     3068.5 31.7    -4.7%

but this can more than be made up for by platform-optimised
implementations of the function.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/h264_parser.c
libavcodec/h264dsp.c
libavcodec/h264dsp.h