h264: use templates to avoid excessive inlining
authorMans Rullgard <mans@mansr.com>
Tue, 3 Jul 2012 22:16:11 +0000 (23:16 +0100)
committerMans Rullgard <mans@mansr.com>
Thu, 5 Jul 2012 10:50:18 +0000 (11:50 +0100)
commit28fff0d9740e00c2ee82f72a4be55bdbb5e0c8c6
tree9097035020bc4443e85b9f71f3579d3116dc2c6e
parent983db9b2b4c753507d1cf8427675fca80d598b4c
h264: use templates to avoid excessive inlining

Instead of inlining everything into ff_h264_hl_decode_mb(), use
explicit templating to create versions of the called functions
with constant parameters filled in.  This greatly speeds up
compilation of h264.c and reduces the code size without any
measurable impact on performance.

Compilation time for h264.c on an i7 goes from 30s to 5.5s.
Code size is reduced by 430kB.

Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/h264.c
libavcodec/h264_mb_template.c [new file with mode: 0644]
libavcodec/h264_mc_template.c [new file with mode: 0644]