summaryrefslogtreecommitdiffstats
path: root/libvpx/vp9/common/vp9_reconinter.h
diff options
context:
space:
mode:
authorhkuang <hkuang@google.com>2013-07-25 11:11:39 -0700
committerhkuang <hkuang@google.com>2013-07-25 12:03:12 -0700
commit91037db265ecdd914a26e056cf69207b4f50924e (patch)
treec78c618cf6d0ffb187e2734d524bca19698b3c0d /libvpx/vp9/common/vp9_reconinter.h
parentba164dffc5a6795bce97fae02b51ccf3330e15e4 (diff)
downloadandroid_external_libvpx-91037db265ecdd914a26e056cf69207b4f50924e.tar.gz
android_external_libvpx-91037db265ecdd914a26e056cf69207b4f50924e.tar.bz2
android_external_libvpx-91037db265ecdd914a26e056cf69207b4f50924e.zip
Roll latest libvpx into Android.
Make the VP9 decoding 2X faster than the old one. Checkout is from master branch(hash:242157c756314827ad9244952c7253e8900b9626). Change-Id: Ibe67b3ee19f82b87df2416826b63a67f7f79b63a
Diffstat (limited to 'libvpx/vp9/common/vp9_reconinter.h')
-rw-r--r--libvpx/vp9/common/vp9_reconinter.h60
1 files changed, 20 insertions, 40 deletions
diff --git a/libvpx/vp9/common/vp9_reconinter.h b/libvpx/vp9/common/vp9_reconinter.h
index 4e52185..e37750d 100644
--- a/libvpx/vp9/common/vp9_reconinter.h
+++ b/libvpx/vp9/common/vp9_reconinter.h
@@ -42,14 +42,8 @@ void vp9_build_inter_predictor(const uint8_t *src, int src_stride,
const int_mv *mv_q3,
const struct scale_factors *scale,
int w, int h, int do_avg,
- const struct subpix_fn_table *subpix);
-
-void vp9_build_inter_predictor_q4(const uint8_t *src, int src_stride,
- uint8_t *dst, int dst_stride,
- const int_mv *mv_q4,
- const struct scale_factors *scale,
- int w, int h, int do_avg,
- const struct subpix_fn_table *subpix);
+ const struct subpix_fn_table *subpix,
+ enum mv_precision precision);
static int scaled_buffer_offset(int x_offset, int y_offset, int stride,
const struct scale_factors *scale) {
@@ -86,43 +80,29 @@ static void setup_dst_planes(MACROBLOCKD *xd,
}
}
-static void setup_pre_planes(MACROBLOCKD *xd,
- const YV12_BUFFER_CONFIG *src0,
- const YV12_BUFFER_CONFIG *src1,
+static void setup_pre_planes(MACROBLOCKD *xd, int i,
+ const YV12_BUFFER_CONFIG *src,
int mi_row, int mi_col,
- const struct scale_factors *scale,
- const struct scale_factors *scale_uv) {
- const YV12_BUFFER_CONFIG *srcs[2] = {src0, src1};
- int i, j;
-
- for (i = 0; i < 2; ++i) {
- const YV12_BUFFER_CONFIG *src = srcs[i];
- if (src) {
- uint8_t* buffers[4] = {src->y_buffer, src->u_buffer, src->v_buffer,
- src->alpha_buffer};
- int strides[4] = {src->y_stride, src->uv_stride, src->uv_stride,
- src->alpha_stride};
-
- for (j = 0; j < MAX_MB_PLANE; ++j) {
- struct macroblockd_plane *pd = &xd->plane[j];
- const struct scale_factors *sf = j ? scale_uv : scale;
- setup_pred_plane(&pd->pre[i],
- buffers[j], strides[j],
- mi_row, mi_col, sf ? &sf[i] : NULL,
- pd->subsampling_x, pd->subsampling_y);
- }
+ const struct scale_factors *sf) {
+ if (src) {
+ int j;
+ uint8_t* buffers[4] = {src->y_buffer, src->u_buffer, src->v_buffer,
+ src->alpha_buffer};
+ int strides[4] = {src->y_stride, src->uv_stride, src->uv_stride,
+ src->alpha_stride};
+
+ for (j = 0; j < MAX_MB_PLANE; ++j) {
+ struct macroblockd_plane *pd = &xd->plane[j];
+ setup_pred_plane(&pd->pre[i], buffers[j], strides[j],
+ mi_row, mi_col, sf, pd->subsampling_x, pd->subsampling_y);
}
}
}
-static void set_scale_factors(MACROBLOCKD *xd,
- int ref0, int ref1,
- struct scale_factors scale_factor[MAX_REF_FRAMES]) {
-
- xd->scale_factor[0] = scale_factor[ref0 >= 0 ? ref0 : 0];
- xd->scale_factor[1] = scale_factor[ref1 >= 0 ? ref1 : 0];
- xd->scale_factor_uv[0] = xd->scale_factor[0];
- xd->scale_factor_uv[1] = xd->scale_factor[1];
+static void set_scale_factors(MACROBLOCKD *xd, int ref0, int ref1,
+ struct scale_factors sf[MAX_REF_FRAMES]) {
+ xd->scale_factor[0] = sf[ref0 >= 0 ? ref0 : 0];
+ xd->scale_factor[1] = sf[ref1 >= 0 ? ref1 : 0];
}
void vp9_setup_scale_factors(VP9_COMMON *cm, int i);