diff options
author | Diego Biurrun <diego@biurrun.de> | 2014-01-09 12:09:35 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-03-26 04:31:27 -0700 |
commit | 2c01ad8b206d326700974438f7193f22be416eb1 (patch) | |
tree | c420ca028bca2763299cad0d35beb5d979b3beaf /libavcodec/dsputil.c | |
parent | aba70bb5387f12dfa5e6cd8cb861c9c7e668151f (diff) | |
download | ffmpeg-2c01ad8b206d326700974438f7193f22be416eb1.tar.gz |
dsputil_template: Detemplatize the code
The indirection makes no sense without multiple instantiation.
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 5bb9441586..4a2011a5ef 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -2602,26 +2602,18 @@ av_cold void ff_dsputil_init(DSPContext *c, AVCodecContext *avctx) c->add_pixels8 = add_pixels8_c; -#undef FUNC -#undef FUNCC -#define FUNC(f, depth) f ## _ ## depth -#define FUNCC(f, depth) f ## _ ## depth ## _c + c->draw_edges = draw_edges_8_c; - c->draw_edges = FUNCC(draw_edges, 8); - - c->clear_block = FUNCC(clear_block, 8); - c->clear_blocks = FUNCC(clear_blocks, 8); - -#define BIT_DEPTH_FUNCS(depth) \ - c->get_pixels = FUNCC(get_pixels, depth); + c->clear_block = clear_block_8_c; + c->clear_blocks = clear_blocks_8_c; switch (avctx->bits_per_raw_sample) { case 9: case 10: - BIT_DEPTH_FUNCS(16); + c->get_pixels = get_pixels_16_c; break; default: - BIT_DEPTH_FUNCS(8); + c->get_pixels = get_pixels_8_c; break; } |