diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-26 17:59:50 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-26 17:59:50 +0400 |
commit | e9c6b93bdaa600cd31f689218600baa999f8365e (patch) | |
tree | 9b8b05c015e2b609481c35beb8729a053776ba6a /libavcodec/dsputil.c | |
parent | 0371eaebcd1bdcd94e4c9fccf23969c5f49bb5d0 (diff) | |
parent | 2c01ad8b206d326700974438f7193f22be416eb1 (diff) |
Merge commit '2c01ad8b206d326700974438f7193f22be416eb1'
* commit '2c01ad8b206d326700974438f7193f22be416eb1':
dsputil_template: Detemplatize the code
Conflicts:
libavcodec/dsputil.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 edd7b04ae6..aba82f3233 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -2798,29 +2798,21 @@ 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: case 12: case 14: - BIT_DEPTH_FUNCS(16); + c->get_pixels = get_pixels_16_c; break; default: if (avctx->bits_per_raw_sample<=8 || avctx->codec_type != AVMEDIA_TYPE_VIDEO) { - BIT_DEPTH_FUNCS(8); + c->get_pixels = get_pixels_8_c; } break; } |