diff options
author | Jason Garrett-Glaser <darkshikari@gmail.com> | 2010-07-22 23:11:40 +0000 |
---|---|---|
committer | Jason Garrett-Glaser <darkshikari@gmail.com> | 2010-07-22 23:11:40 +0000 |
commit | 145d31865de9ae6eeaca5153f1173d1504f23fb4 (patch) | |
tree | fcdef1d43b3ea44a8532341bf513137205d6ce69 /libavcodec/vp8.c | |
parent | 867215336debce9fe38f728ad5c74776a1965785 (diff) | |
download | ffmpeg-145d31865de9ae6eeaca5153f1173d1504f23fb4.tar.gz |
Get rid of more unnecessary dereferences in VP8 deblocking
Originally committed as revision 24446 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r-- | libavcodec/vp8.c | 69 |
1 files changed, 36 insertions, 33 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 9ab596fa6d..e21e810caa 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -1273,6 +1273,8 @@ static void filter_mb(VP8Context *s, uint8_t *dst[3], VP8FilterStrength *f, int int filter_level = f->filter_level; int inner_limit = f->inner_limit; int inner_filter = f->inner_filter; + int linesize = s->linesize; + int uvlinesize = s->uvlinesize; if (!filter_level) return; @@ -1292,45 +1294,45 @@ static void filter_mb(VP8Context *s, uint8_t *dst[3], VP8FilterStrength *f, int } if (mb_x) { - s->vp8dsp.vp8_h_loop_filter16y(dst[0], s->linesize, + s->vp8dsp.vp8_h_loop_filter16y(dst[0], linesize, mbedge_lim, inner_limit, hev_thresh); - s->vp8dsp.vp8_h_loop_filter8uv(dst[1], dst[2], s->uvlinesize, + s->vp8dsp.vp8_h_loop_filter8uv(dst[1], dst[2], uvlinesize, mbedge_lim, inner_limit, hev_thresh); } if (inner_filter) { - s->vp8dsp.vp8_h_loop_filter16y_inner(dst[0]+ 4, s->linesize, bedge_lim, - inner_limit, hev_thresh); - s->vp8dsp.vp8_h_loop_filter16y_inner(dst[0]+ 8, s->linesize, bedge_lim, - inner_limit, hev_thresh); - s->vp8dsp.vp8_h_loop_filter16y_inner(dst[0]+12, s->linesize, bedge_lim, - inner_limit, hev_thresh); - s->vp8dsp.vp8_h_loop_filter8uv_inner(dst[1] + 4, dst[2] + 4, - s->uvlinesize, bedge_lim, - inner_limit, hev_thresh); + s->vp8dsp.vp8_h_loop_filter16y_inner(dst[0]+ 4, linesize, bedge_lim, + inner_limit, hev_thresh); + s->vp8dsp.vp8_h_loop_filter16y_inner(dst[0]+ 8, linesize, bedge_lim, + inner_limit, hev_thresh); + s->vp8dsp.vp8_h_loop_filter16y_inner(dst[0]+12, linesize, bedge_lim, + inner_limit, hev_thresh); + s->vp8dsp.vp8_h_loop_filter8uv_inner(dst[1] + 4, dst[2] + 4, + uvlinesize, bedge_lim, + inner_limit, hev_thresh); } if (mb_y) { - s->vp8dsp.vp8_v_loop_filter16y(dst[0], s->linesize, + s->vp8dsp.vp8_v_loop_filter16y(dst[0], linesize, mbedge_lim, inner_limit, hev_thresh); - s->vp8dsp.vp8_v_loop_filter8uv(dst[1], dst[2], s->uvlinesize, + s->vp8dsp.vp8_v_loop_filter8uv(dst[1], dst[2], uvlinesize, mbedge_lim, inner_limit, hev_thresh); } if (inner_filter) { - s->vp8dsp.vp8_v_loop_filter16y_inner(dst[0]+ 4*s->linesize, - s->linesize, bedge_lim, - inner_limit, hev_thresh); - s->vp8dsp.vp8_v_loop_filter16y_inner(dst[0]+ 8*s->linesize, - s->linesize, bedge_lim, - inner_limit, hev_thresh); - s->vp8dsp.vp8_v_loop_filter16y_inner(dst[0]+12*s->linesize, - s->linesize, bedge_lim, + s->vp8dsp.vp8_v_loop_filter16y_inner(dst[0]+ 4*linesize, + linesize, bedge_lim, + inner_limit, hev_thresh); + s->vp8dsp.vp8_v_loop_filter16y_inner(dst[0]+ 8*linesize, + linesize, bedge_lim, + inner_limit, hev_thresh); + s->vp8dsp.vp8_v_loop_filter16y_inner(dst[0]+12*linesize, + linesize, bedge_lim, + inner_limit, hev_thresh); + s->vp8dsp.vp8_v_loop_filter8uv_inner(dst[1] + 4 * uvlinesize, + dst[2] + 4 * uvlinesize, + uvlinesize, bedge_lim, inner_limit, hev_thresh); - s->vp8dsp.vp8_v_loop_filter8uv_inner(dst[1] + 4 * s->uvlinesize, - dst[2] + 4 * s->uvlinesize, - s->uvlinesize, bedge_lim, - inner_limit, hev_thresh); } } @@ -1340,6 +1342,7 @@ static void filter_mb_simple(VP8Context *s, uint8_t *dst, VP8FilterStrength *f, int filter_level = f->filter_level; int inner_limit = f->inner_limit; int inner_filter = f->inner_filter; + int linesize = s->linesize; if (!filter_level) return; @@ -1348,19 +1351,19 @@ static void filter_mb_simple(VP8Context *s, uint8_t *dst, VP8FilterStrength *f, bedge_lim = 2* filter_level + inner_limit; if (mb_x) - s->vp8dsp.vp8_h_loop_filter_simple(dst, s->linesize, mbedge_lim); + s->vp8dsp.vp8_h_loop_filter_simple(dst, linesize, mbedge_lim); if (inner_filter) { - s->vp8dsp.vp8_h_loop_filter_simple(dst+ 4, s->linesize, bedge_lim); - s->vp8dsp.vp8_h_loop_filter_simple(dst+ 8, s->linesize, bedge_lim); - s->vp8dsp.vp8_h_loop_filter_simple(dst+12, s->linesize, bedge_lim); + s->vp8dsp.vp8_h_loop_filter_simple(dst+ 4, linesize, bedge_lim); + s->vp8dsp.vp8_h_loop_filter_simple(dst+ 8, linesize, bedge_lim); + s->vp8dsp.vp8_h_loop_filter_simple(dst+12, linesize, bedge_lim); } if (mb_y) - s->vp8dsp.vp8_v_loop_filter_simple(dst, s->linesize, mbedge_lim); + s->vp8dsp.vp8_v_loop_filter_simple(dst, linesize, mbedge_lim); if (inner_filter) { - s->vp8dsp.vp8_v_loop_filter_simple(dst+ 4*s->linesize, s->linesize, bedge_lim); - s->vp8dsp.vp8_v_loop_filter_simple(dst+ 8*s->linesize, s->linesize, bedge_lim); - s->vp8dsp.vp8_v_loop_filter_simple(dst+12*s->linesize, s->linesize, bedge_lim); + s->vp8dsp.vp8_v_loop_filter_simple(dst+ 4*linesize, linesize, bedge_lim); + s->vp8dsp.vp8_v_loop_filter_simple(dst+ 8*linesize, linesize, bedge_lim); + s->vp8dsp.vp8_v_loop_filter_simple(dst+12*linesize, linesize, bedge_lim); } } |