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/mpegvideo_enc.c | |
parent | 8d686ca59db14900ad5c12b547fb8a7afc8b0b94 (diff) | |
download | ffmpeg-c166148409fe8f0dbccef2fe684286a40ba1e37d.tar.gz |
dsputil: Move pix_sum, pix_norm1, shrink function pointers to mpegvideoenc
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index f95a76b837..12440bb67a 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -895,7 +895,7 @@ static int get_intra_count(MpegEncContext *s, uint8_t *src, int offset = x + y * stride; int sad = s->dsp.sad[0](NULL, src + offset, ref + offset, stride, 16); - int mean = (s->dsp.pix_sum(src + offset, stride) + 128) >> 8; + int mean = (s->mpvencdsp.pix_sum(src + offset, stride) + 128) >> 8; int sae = get_sae(src + offset, mean, stride); acc += sae + 500 < sad; @@ -1138,15 +1138,21 @@ static int estimate_best_b_count(MpegEncContext *s) pre_input.f->data[2] += INPLACE_OFFSET; } - s->dsp.shrink[scale](s->tmp_frames[i]->data[0], s->tmp_frames[i]->linesize[0], - pre_input.f->data[0], pre_input.f->linesize[0], - c->width, c->height); - s->dsp.shrink[scale](s->tmp_frames[i]->data[1], s->tmp_frames[i]->linesize[1], - pre_input.f->data[1], pre_input.f->linesize[1], - c->width >> 1, c->height >> 1); - s->dsp.shrink[scale](s->tmp_frames[i]->data[2], s->tmp_frames[i]->linesize[2], - pre_input.f->data[2], pre_input.f->linesize[2], - c->width >> 1, c->height >> 1); + s->mpvencdsp.shrink[scale](s->tmp_frames[i]->data[0], + s->tmp_frames[i]->linesize[0], + pre_input.f->data[0], + pre_input.f->linesize[0], + c->width, c->height); + s->mpvencdsp.shrink[scale](s->tmp_frames[i]->data[1], + s->tmp_frames[i]->linesize[1], + pre_input.f->data[1], + pre_input.f->linesize[1], + c->width >> 1, c->height >> 1); + s->mpvencdsp.shrink[scale](s->tmp_frames[i]->data[2], + s->tmp_frames[i]->linesize[2], + pre_input.f->data[2], + pre_input.f->linesize[2], + c->width >> 1, c->height >> 1); } } @@ -2420,9 +2426,10 @@ static int mb_var_thread(AVCodecContext *c, void *arg){ int yy = mb_y * 16; uint8_t *pix = s->new_picture.f->data[0] + (yy * s->linesize) + xx; int varc; - int sum = s->dsp.pix_sum(pix, s->linesize); + int sum = s->mpvencdsp.pix_sum(pix, s->linesize); - varc = (s->dsp.pix_norm1(pix, s->linesize) - (((unsigned)sum*sum)>>8) + 500 + 128)>>8; + varc = (s->mpvencdsp.pix_norm1(pix, s->linesize) - + (((unsigned) sum * sum) >> 8) + 500 + 128) >> 8; s->current_picture.mb_var [s->mb_stride * mb_y + mb_x] = varc; s->current_picture.mb_mean[s->mb_stride * mb_y + mb_x] = (sum+128)>>8; |