Commit 5055a161 authored by John Koleszar's avatar John Koleszar
Browse files

remove rotation experiment

This is being reimplemented more generically in terms of affine
transforms.

Change-Id: I9300bfde5f8b93c708c64f59427087720f8ed782
Showing with 0 additions and 5788 deletions
......@@ -226,7 +226,6 @@ EXPERIMENT_LIST="
switchable_interp
tx16x16
newbestrefmv
rotation
"
CONFIG_LIST="
external_build
......
/*
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "vpx_config.h"
#if CONFIG_ROTATION
typedef struct {
int y;
int x;
unsigned long t;
} tap;
typedef struct {
tap pt[4];
} point_taps;
typedef struct {
point_taps pt[256];
} mb_taps;
mb_taps mt_8x8[] = {
#include "rotate2.h"
};
mb_taps mt[] = {
#include "rotate.h"
};
void predict_rotated_16x16(int rotation_index, unsigned char *src, int sp,
unsigned char *dst, int dp) {
int i, j, k, p = 0;
for (i = 0; i < 16; i++, dst += dp) {
for (j = 0; j < 16; j++, p++) {
unsigned int sum = 32768;
for (k = 0; k < 4; k++) {
tap *tp = &mt[rotation_index].pt[p].pt[k];
sum += src[tp->y * sp + tp->x] * tp->t;
}
sum >>= 16;
dst[j] = sum;
}
}
}
void predict_rotated_8x8(int rotation_index, unsigned char *src, int sp,
unsigned char *dst, int dp) {
int i, j, k, p = 0;
for (i = 0; i < 8; i++, dst += dp) {
for (j = 0; j < 8; j++, p++) {
unsigned int sum = 32768;
for (k = 0; k < 4; k++) {
tap *tp = &mt_8x8[rotation_index].pt[p].pt[k];
sum += src[tp->y * sp + tp->x] * tp->t;
}
sum >>= 16;
dst[j] = sum;
}
}
}
#endif
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "block.h"
#include "variance.h"
#if CONFIG_ROTATION
int vp8_find_best_rotation(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *bestmv,
int_mv *ref_mv, int *bri, int error_per_bit,
const vp8_variance_fn_ptr_t *vfp, int *mvcost[2],
int *distortion, unsigned int *sse1) {
unsigned char *z = (*(b->base_src) + b->src);
int ri;
int y_stride;
unsigned int besterr;
int br = bestmv->as_mv.row;
int bc = bestmv->as_mv.col;
unsigned char *y = *(d->base_pre) + d->pre + br * d->pre_stride + bc;
y_stride = d->pre_stride;
// calculate central point error
besterr = vfp->vf(y, y_stride, z, b->src_stride, sse1);
*distortion = besterr;
// find the best matching rotation
*bri = 5;
for (ri = 0; ri < ROTATIONS; ri++) {
unsigned int this_err;
unsigned char pb[256];
predict_rotated_16x16(ri, y, y_stride, pb, 16);
this_err = vfp->vf(pb, 16, z, b->src_stride, sse1);
if (this_err < besterr) {
*bri = ri;
besterr = this_err;
}
}
*sse1 = besterr;
*distortion = besterr;
return 0;
}
#endif
......@@ -77,9 +77,6 @@ VP8_COMMON_SRCS-yes += common/swapyv12buffer.c
VP8_COMMON_SRCS-$(CONFIG_POSTPROC_VISUALIZER) += common/textblit.c
VP8_COMMON_SRCS-yes += common/treecoder.c
VP8_COMMON_SRCS-yes += common/implicit_segmentation.c
VP8_COMMON_SRCS-yes += common/predict_rotated.c
VP8_COMMON_SRCS-yes += common/rotate.h
VP8_COMMON_SRCS-yes += common/rotate2.h
VP8_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/idct_x86.h
VP8_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/subpixel_x86.h
......
......@@ -83,7 +83,6 @@ VP8_CX_SRCS-$(CONFIG_INTERNAL_STATS) += common/postproc.h
VP8_CX_SRCS-$(CONFIG_INTERNAL_STATS) += common/postproc.c
VP8_CX_SRCS-yes += encoder/temporal_filter.c
VP8_CX_SRCS-yes += encoder/temporal_filter.h
VP8_CX_SRCS-yes += encoder/find_rotation.c
VP8_CX_SRCS-yes += encoder/mbgraph.c
VP8_CX_SRCS-yes += encoder/mbgraph.h
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment