diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-12-30 19:56:07 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-07-06 14:26:53 -0700 |
commit | c166148409fe8f0dbccef2fe684286a40ba1e37d (patch) | |
tree | 64db33e2555b5e96635f684c2a6e3959bf0d7de7 /libavcodec/dsputil.c | |
parent | 8d686ca59db14900ad5c12b547fb8a7afc8b0b94 (diff) | |
download | ffmpeg-c166148409fe8f0dbccef2fe684286a40ba1e37d.tar.gz |
dsputil: Move pix_sum, pix_norm1, shrink function pointers to mpegvideoenc
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 68f5120c41..8c4c670630 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -26,15 +26,12 @@ */ #include "libavutil/attributes.h" -#include "libavutil/imgutils.h" #include "avcodec.h" #include "copy_block.h" #include "dct.h" #include "dsputil.h" #include "simple_idct.h" #include "faandct.h" -#include "imgconvert.h" -#include "mathops.h" #include "mpegvideo.h" #include "config.h" @@ -47,74 +44,6 @@ uint32_t ff_square_tab[512] = { 0, }; #define BIT_DEPTH 8 #include "dsputilenc_template.c" -static int pix_sum_c(uint8_t *pix, int line_size) -{ - int s = 0, i, j; - - for (i = 0; i < 16; i++) { - for (j = 0; j < 16; j += 8) { - s += pix[0]; - s += pix[1]; - s += pix[2]; - s += pix[3]; - s += pix[4]; - s += pix[5]; - s += pix[6]; - s += pix[7]; - pix += 8; - } - pix += line_size - 16; - } - return s; -} - -static int pix_norm1_c(uint8_t *pix, int line_size) -{ - int s = 0, i, j; - uint32_t *sq = ff_square_tab + 256; - - for (i = 0; i < 16; i++) { - for (j = 0; j < 16; j += 8) { -#if 0 - s += sq[pix[0]]; - s += sq[pix[1]]; - s += sq[pix[2]]; - s += sq[pix[3]]; - s += sq[pix[4]]; - s += sq[pix[5]]; - s += sq[pix[6]]; - s += sq[pix[7]]; -#else -#if HAVE_FAST_64BIT - register uint64_t x = *(uint64_t *) pix; - s += sq[x & 0xff]; - s += sq[(x >> 8) & 0xff]; - s += sq[(x >> 16) & 0xff]; - s += sq[(x >> 24) & 0xff]; - s += sq[(x >> 32) & 0xff]; - s += sq[(x >> 40) & 0xff]; - s += sq[(x >> 48) & 0xff]; - s += sq[(x >> 56) & 0xff]; -#else - register uint32_t x = *(uint32_t *) pix; - s += sq[x & 0xff]; - s += sq[(x >> 8) & 0xff]; - s += sq[(x >> 16) & 0xff]; - s += sq[(x >> 24) & 0xff]; - x = *(uint32_t *) (pix + 4); - s += sq[x & 0xff]; - s += sq[(x >> 8) & 0xff]; - s += sq[(x >> 16) & 0xff]; - s += sq[(x >> 24) & 0xff]; -#endif -#endif - pix += 8; - } - pix += line_size - 16; - } - return s; -} - static int sse4_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { @@ -1055,9 +984,6 @@ av_cold void ff_dsputil_init(DSPContext *c, AVCodecContext *avctx) c->sum_abs_dctelem = sum_abs_dctelem_c; - c->pix_sum = pix_sum_c; - c->pix_norm1 = pix_norm1_c; - /* TODO [0] 16 [1] 8 */ c->pix_abs[0][0] = pix_abs16_c; c->pix_abs[0][1] = pix_abs16_x2_c; @@ -1097,11 +1023,6 @@ av_cold void ff_dsputil_init(DSPContext *c, AVCodecContext *avctx) c->nsse[0] = nsse16_c; c->nsse[1] = nsse8_c; - c->shrink[0] = av_image_copy_plane; - c->shrink[1] = ff_shrink22; - c->shrink[2] = ff_shrink44; - c->shrink[3] = ff_shrink88; - c->draw_edges = draw_edges_8_c; switch (avctx->bits_per_raw_sample) { |