summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2015-06-19 03:31:37 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-06-19 03:31:38 +0000
commitc5d779d266ba254d60b56afe813b681684613b24 (patch)
tree7d21490c2330d9b113561e59aa8f8b39362bc7e7
parenta2c69af50ed31a3f56c46ef825098f9acb740a9b (diff)
parentaaa49f04854737a5f7c18ea844da1ca89694e5de (diff)
downloadlibvpx-c5d779d266ba254d60b56afe813b681684613b24.tar
libvpx-c5d779d266ba254d60b56afe813b681684613b24.tar.gz
libvpx-c5d779d266ba254d60b56afe813b681684613b24.tar.bz2
libvpx-c5d779d266ba254d60b56afe813b681684613b24.zip
Merge changes I2552d810,I51952c0a,Ib82e4247,I9c8d16cb
* changes: vp9_mcomp: make search_step_table static vp9_encodeframe: delete auto_partition_range() vp9_mcomp: don't mark setup_center_error() inline vp9_encoder: hide adjust_image_stat()
-rw-r--r--vp9/encoder/vp9_encodeframe.c60
-rw-r--r--vp9/encoder/vp9_encoder.c2
-rw-r--r--vp9/encoder/vp9_mcomp.c30
3 files changed, 16 insertions, 76 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 5299244d9..dcddefc28 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -2220,66 +2220,6 @@ static void rd_auto_partition_range(VP9_COMP *cpi, const TileInfo *const tile,
*max_block_size = max_size;
}
-static void auto_partition_range(VP9_COMP *cpi, const TileInfo *const tile,
- MACROBLOCKD *const xd,
- int mi_row, int mi_col,
- BLOCK_SIZE *min_block_size,
- BLOCK_SIZE *max_block_size) {
- VP9_COMMON *const cm = &cpi->common;
- MODE_INFO **mi_8x8 = xd->mi;
- const int left_in_image = xd->left_available && mi_8x8[-1];
- const int above_in_image = xd->up_available && mi_8x8[-xd->mi_stride];
- int row8x8_remaining = tile->mi_row_end - mi_row;
- int col8x8_remaining = tile->mi_col_end - mi_col;
- int bh, bw;
- BLOCK_SIZE min_size = BLOCK_32X32;
- BLOCK_SIZE max_size = BLOCK_8X8;
- int bsl = mi_width_log2_lookup[BLOCK_64X64];
- const int search_range_ctrl = (((mi_row + mi_col) >> bsl) +
- get_chessboard_index(cm->current_video_frame)) & 0x1;
- // Trap case where we do not have a prediction.
- if (search_range_ctrl &&
- (left_in_image || above_in_image || cm->frame_type != KEY_FRAME)) {
- int block;
- MODE_INFO **mi;
- BLOCK_SIZE sb_type;
-
- // Find the min and max partition sizes used in the left SB64.
- if (left_in_image) {
- MODE_INFO *cur_mi;
- mi = &mi_8x8[-1];
- for (block = 0; block < MI_BLOCK_SIZE; ++block) {
- cur_mi = mi[block * xd->mi_stride];
- sb_type = cur_mi ? cur_mi->mbmi.sb_type : 0;
- min_size = MIN(min_size, sb_type);
- max_size = MAX(max_size, sb_type);
- }
- }
- // Find the min and max partition sizes used in the above SB64.
- if (above_in_image) {
- mi = &mi_8x8[-xd->mi_stride * MI_BLOCK_SIZE];
- for (block = 0; block < MI_BLOCK_SIZE; ++block) {
- sb_type = mi[block] ? mi[block]->mbmi.sb_type : 0;
- min_size = MIN(min_size, sb_type);
- max_size = MAX(max_size, sb_type);
- }
- }
-
- min_size = min_partition_size[min_size];
- max_size = find_partition_size(max_size, row8x8_remaining, col8x8_remaining,
- &bh, &bw);
- min_size = MIN(min_size, max_size);
- min_size = MAX(min_size, BLOCK_8X8);
- max_size = MIN(max_size, BLOCK_32X32);
- } else {
- min_size = BLOCK_8X8;
- max_size = BLOCK_32X32;
- }
-
- *min_block_size = min_size;
- *max_block_size = max_size;
-}
-
// TODO(jingning) refactor functions setting partition search range
static void set_partition_range(VP9_COMMON *cm, MACROBLOCKD *xd,
int mi_row, int mi_col, BLOCK_SIZE bsize,
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index 4bdd09fb8..d708b8319 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -3990,7 +3990,6 @@ static void check_src_altref(VP9_COMP *cpi,
extern double vp9_get_blockiness(const unsigned char *img1, int img1_pitch,
const unsigned char *img2, int img2_pitch,
int width, int height);
-#endif
static void adjust_image_stat(double y, double u, double v, double all,
ImageStat *s) {
@@ -4000,6 +3999,7 @@ static void adjust_image_stat(double y, double u, double v, double all,
s->stat[ALL] += all;
s->worst = MIN(s->worst, all);
}
+#endif // CONFIG_INTERNAL_STATS
int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
size_t *size, uint8_t *dest,
diff --git a/vp9/encoder/vp9_mcomp.c b/vp9/encoder/vp9_mcomp.c
index 234272697..081b99f9f 100644
--- a/vp9/encoder/vp9_mcomp.c
+++ b/vp9/encoder/vp9_mcomp.c
@@ -286,20 +286,20 @@ static INLINE const uint8_t *pre(const uint8_t *buf, int stride, int r, int c) {
bestmv->row *= 8; \
bestmv->col *= 8;
-static INLINE unsigned int setup_center_error(const MACROBLOCKD *xd,
- const MV *bestmv,
- const MV *ref_mv,
- int error_per_bit,
- const vp9_variance_fn_ptr_t *vfp,
- const uint8_t *const src,
- const int src_stride,
- const uint8_t *const y,
- int y_stride,
- const uint8_t *second_pred,
- int w, int h, int offset,
- int *mvjcost, int *mvcost[2],
- unsigned int *sse1,
- int *distortion) {
+static unsigned int setup_center_error(const MACROBLOCKD *xd,
+ const MV *bestmv,
+ const MV *ref_mv,
+ int error_per_bit,
+ const vp9_variance_fn_ptr_t *vfp,
+ const uint8_t *const src,
+ const int src_stride,
+ const uint8_t *const y,
+ int y_stride,
+ const uint8_t *second_pred,
+ int w, int h, int offset,
+ int *mvjcost, int *mvcost[2],
+ unsigned int *sse1,
+ int *distortion) {
unsigned int besterr;
#if CONFIG_VP9_HIGHBITDEPTH
if (second_pred != NULL) {
@@ -610,7 +610,7 @@ int vp9_find_best_sub_pixel_tree_pruned(const MACROBLOCK *x,
return besterr;
}
-const MV search_step_table[12] = {
+static const MV search_step_table[12] = {
// left, right, up, down
{0, -4}, {0, 4}, {-4, 0}, {4, 0},
{0, -2}, {0, 2}, {-2, 0}, {2, 0},