summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vp9/common/vp9_alloccommon.c11
-rw-r--r--vp9/common/vp9_entropymode.c5
-rw-r--r--vp9/common/vp9_onyxc_int.h32
-rw-r--r--vp9/common/vp9_pred_common.c12
-rw-r--r--vp9/common/vp9_pred_common.h9
-rw-r--r--vp9/common/vp9_reconinter.c2
-rw-r--r--vp9/decoder/vp9_decodeframe.c20
-rw-r--r--vp9/decoder/vp9_decodemv.c4
-rw-r--r--vp9/decoder/vp9_onyxd_if.c2
-rw-r--r--vp9/encoder/vp9_bitstream.c23
-rw-r--r--vp9/encoder/vp9_encodeframe.c2
-rw-r--r--vp9/encoder/vp9_onyx_if.c8
-rw-r--r--vp9/encoder/vp9_onyx_int.h4
-rw-r--r--vp9/encoder/vp9_ratectrl.c2
-rw-r--r--vp9/encoder/vp9_rdopt.c18
-rw-r--r--vpx/src/vpx_decoder.c2
16 files changed, 73 insertions, 83 deletions
diff --git a/vp9/common/vp9_alloccommon.c b/vp9/common/vp9_alloccommon.c
index f495c29f3..f56784071 100644
--- a/vp9/common/vp9_alloccommon.c
+++ b/vp9/common/vp9_alloccommon.c
@@ -34,7 +34,7 @@ void vp9_update_mode_info_border(VP9_COMMON *cm, MODE_INFO *mi) {
void vp9_free_frame_buffers(VP9_COMMON *cm) {
int i;
- for (i = 0; i < NUM_YV12_BUFFERS; i++)
+ for (i = 0; i < FRAME_BUFFERS; i++)
vp9_free_frame_buffer(&cm->yv12_fb[i]);
vp9_free_frame_buffer(&cm->post_proc_buffer);
@@ -75,7 +75,6 @@ static void setup_mi(VP9_COMMON *cm) {
cm->mode_info_stride * (cm->mi_rows + 1) *
sizeof(*cm->mi_grid_base));
- vp9_update_mode_info_border(cm, cm->mip);
vp9_update_mode_info_border(cm, cm->prev_mip);
}
@@ -141,20 +140,20 @@ int vp9_alloc_frame_buffers(VP9_COMMON *cm, int width, int height) {
vp9_free_frame_buffers(cm);
- for (i = 0; i < NUM_YV12_BUFFERS; i++) {
+ for (i = 0; i < FRAME_BUFFERS; i++) {
cm->fb_idx_ref_cnt[i] = 0;
if (vp9_alloc_frame_buffer(&cm->yv12_fb[i], width, height, ss_x, ss_y,
VP9BORDERINPIXELS) < 0)
goto fail;
}
- cm->new_fb_idx = NUM_YV12_BUFFERS - 1;
+ cm->new_fb_idx = FRAME_BUFFERS - 1;
cm->fb_idx_ref_cnt[cm->new_fb_idx] = 1;
- for (i = 0; i < ALLOWED_REFS_PER_FRAME; i++)
+ for (i = 0; i < REFS_PER_FRAME; i++)
cm->active_ref_idx[i] = i;
- for (i = 0; i < NUM_REF_FRAMES; i++) {
+ for (i = 0; i < REF_FRAMES; i++) {
cm->ref_frame_map[i] = i;
cm->fb_idx_ref_cnt[i] = 1;
}
diff --git a/vp9/common/vp9_entropymode.c b/vp9/common/vp9_entropymode.c
index 265242129..83281b2ea 100644
--- a/vp9/common/vp9_entropymode.c
+++ b/vp9/common/vp9_entropymode.c
@@ -459,7 +459,7 @@ void vp9_setup_past_independence(VP9_COMMON *cm) {
if (cm->frame_type == KEY_FRAME ||
cm->error_resilient_mode || cm->reset_frame_context == 3) {
// Reset all frame contexts.
- for (i = 0; i < NUM_FRAME_CONTEXTS; ++i)
+ for (i = 0; i < FRAME_CONTEXTS; ++i)
cm->frame_contexts[i] = cm->fc;
} else if (cm->reset_frame_context == 2) {
// Reset only the frame context specified in the frame header.
@@ -471,9 +471,6 @@ void vp9_setup_past_independence(VP9_COMMON *cm) {
vpx_memset(cm->mip, 0,
cm->mode_info_stride * (cm->mi_rows + 1) * sizeof(MODE_INFO));
- vp9_update_mode_info_border(cm, cm->mip);
- vp9_update_mode_info_border(cm, cm->prev_mip);
-
vp9_zero(cm->ref_frame_sign_bias);
cm->frame_context_idx = 0;
diff --git a/vp9/common/vp9_onyxc_int.h b/vp9/common/vp9_onyxc_int.h
index dc6d1b997..8163a03c4 100644
--- a/vp9/common/vp9_onyxc_int.h
+++ b/vp9/common/vp9_onyxc_int.h
@@ -25,18 +25,18 @@
#include "vp9/common/vp9_postproc.h"
#endif
-#define ALLOWED_REFS_PER_FRAME 3
+#define REFS_PER_FRAME 3
-#define NUM_REF_FRAMES_LOG2 3
-#define NUM_REF_FRAMES (1 << NUM_REF_FRAMES_LOG2)
+#define REF_FRAMES_LOG2 3
+#define REF_FRAMES (1 << REF_FRAMES_LOG2)
// 1 scratch frame for the new frame, 3 for scaled references on the encoder
// TODO(jkoleszar): These 3 extra references could probably come from the
// normal reference pool.
-#define NUM_YV12_BUFFERS (NUM_REF_FRAMES + 4)
+#define FRAME_BUFFERS (REF_FRAMES + 4)
-#define NUM_FRAME_CONTEXTS_LOG2 2
-#define NUM_FRAME_CONTEXTS (1 << NUM_FRAME_CONTEXTS_LOG2)
+#define FRAME_CONTEXTS_LOG2 2
+#define FRAME_CONTEXTS (1 << FRAME_CONTEXTS_LOG2)
extern const struct {
PARTITION_CONTEXT above;
@@ -113,17 +113,17 @@ typedef struct VP9Common {
YV12_BUFFER_CONFIG *frame_to_show;
- YV12_BUFFER_CONFIG yv12_fb[NUM_YV12_BUFFERS];
- int fb_idx_ref_cnt[NUM_YV12_BUFFERS]; /* reference counts */
- int ref_frame_map[NUM_REF_FRAMES]; /* maps fb_idx to reference slot */
+ YV12_BUFFER_CONFIG yv12_fb[FRAME_BUFFERS];
+ int fb_idx_ref_cnt[FRAME_BUFFERS]; /* reference counts */
+ int ref_frame_map[REF_FRAMES]; /* maps fb_idx to reference slot */
// TODO(jkoleszar): could expand active_ref_idx to 4, with 0 as intra, and
// roll new_fb_idx into it.
- // Each frame can reference ALLOWED_REFS_PER_FRAME buffers
- int active_ref_idx[ALLOWED_REFS_PER_FRAME];
- struct scale_factors active_ref_scale[ALLOWED_REFS_PER_FRAME];
- struct scale_factors_common active_ref_scale_comm[ALLOWED_REFS_PER_FRAME];
+ // Each frame can reference REFS_PER_FRAME buffers
+ int active_ref_idx[REFS_PER_FRAME];
+ struct scale_factors active_ref_scale[REFS_PER_FRAME];
+ struct scale_factors_common active_ref_scale_comm[REFS_PER_FRAME];
int new_fb_idx;
YV12_BUFFER_CONFIG post_proc_buffer;
@@ -198,7 +198,7 @@ typedef struct VP9Common {
REFERENCE_MODE comp_pred_mode;
FRAME_CONTEXT fc; /* this frame entropy */
- FRAME_CONTEXT frame_contexts[NUM_FRAME_CONTEXTS];
+ FRAME_CONTEXT frame_contexts[FRAME_CONTEXTS];
unsigned int frame_context_idx; /* Context to use/update */
FRAME_COUNTS counts;
@@ -228,11 +228,11 @@ static YV12_BUFFER_CONFIG *get_frame_new_buffer(VP9_COMMON *cm) {
static int get_free_fb(VP9_COMMON *cm) {
int i;
- for (i = 0; i < NUM_YV12_BUFFERS; i++)
+ for (i = 0; i < FRAME_BUFFERS; i++)
if (cm->fb_idx_ref_cnt[i] == 0)
break;
- assert(i < NUM_YV12_BUFFERS);
+ assert(i < FRAME_BUFFERS);
cm->fb_idx_ref_cnt[i] = 1;
return i;
}
diff --git a/vp9/common/vp9_pred_common.c b/vp9/common/vp9_pred_common.c
index a367f0b5d..793117daa 100644
--- a/vp9/common/vp9_pred_common.c
+++ b/vp9/common/vp9_pred_common.c
@@ -60,13 +60,11 @@ unsigned char vp9_get_pred_context_switchable_interp(const MACROBLOCKD *xd) {
return SWITCHABLE_FILTERS;
}
// Returns a context number for the given MB prediction signal
-unsigned char vp9_get_pred_context_intra_inter(const MACROBLOCKD *xd) {
- const MODE_INFO *const above_mi = get_above_mi(xd);
- const MODE_INFO *const left_mi = get_left_mi(xd);
- const MB_MODE_INFO *const above_mbmi = get_above_mbmi(above_mi);
- const MB_MODE_INFO *const left_mbmi = get_left_mbmi(left_mi);
- const int above_in_image = above_mi != NULL;
- const int left_in_image = left_mi != NULL;
+int vp9_get_intra_inter_context(const MACROBLOCKD *xd) {
+ const MB_MODE_INFO *const above_mbmi = get_above_mbmi(get_above_mi(xd));
+ const MB_MODE_INFO *const left_mbmi = get_left_mbmi(get_left_mi(xd));
+ const int above_in_image = above_mbmi != NULL;
+ const int left_in_image = left_mbmi != NULL;
const int above_intra = above_in_image ? !is_inter_block(above_mbmi) : 1;
const int left_intra = left_in_image ? !is_inter_block(left_mbmi) : 1;
diff --git a/vp9/common/vp9_pred_common.h b/vp9/common/vp9_pred_common.h
index b6f18e323..bd0b8d662 100644
--- a/vp9/common/vp9_pred_common.h
+++ b/vp9/common/vp9_pred_common.h
@@ -61,12 +61,11 @@ static INLINE unsigned char vp9_get_pred_flag_mbskip(const MACROBLOCKD *xd) {
unsigned char vp9_get_pred_context_switchable_interp(const MACROBLOCKD *xd);
-unsigned char vp9_get_pred_context_intra_inter(const MACROBLOCKD *xd);
+int vp9_get_intra_inter_context(const MACROBLOCKD *xd);
-static INLINE vp9_prob vp9_get_pred_prob_intra_inter(const VP9_COMMON *cm,
- const MACROBLOCKD *xd) {
- const int pred_context = vp9_get_pred_context_intra_inter(xd);
- return cm->fc.intra_inter_prob[pred_context];
+static INLINE vp9_prob vp9_get_intra_inter_prob(const VP9_COMMON *cm,
+ const MACROBLOCKD *xd) {
+ return cm->fc.intra_inter_prob[vp9_get_intra_inter_context(xd)];
}
unsigned char vp9_get_pred_context_comp_inter_inter(const VP9_COMMON *cm,
diff --git a/vp9/common/vp9_reconinter.c b/vp9/common/vp9_reconinter.c
index 6e54cf3fd..e8247679c 100644
--- a/vp9/common/vp9_reconinter.c
+++ b/vp9/common/vp9_reconinter.c
@@ -288,7 +288,7 @@ void vp9_setup_scale_factors(VP9_COMMON *cm, int i) {
const int ref = cm->active_ref_idx[i];
struct scale_factors *const sf = &cm->active_ref_scale[i];
struct scale_factors_common *const sfc = &cm->active_ref_scale_comm[i];
- if (ref >= NUM_YV12_BUFFERS) {
+ if (ref >= FRAME_BUFFERS) {
vp9_zero(*sf);
vp9_zero(*sfc);
} else {
diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c
index c5ed6c894..78cf09bfa 100644
--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -50,7 +50,7 @@ static int read_be32(const uint8_t *p) {
static int is_compound_reference_allowed(const VP9_COMMON *cm) {
int i;
- for (i = 1; i < ALLOWED_REFS_PER_FRAME; ++i)
+ for (i = 1; i < REFS_PER_FRAME; ++i)
if (cm->ref_frame_sign_bias[i + 1] != cm->ref_frame_sign_bias[1])
return 1;
@@ -719,7 +719,7 @@ static void setup_frame_size_with_refs(VP9D_COMP *pbi,
int width, height;
int found = 0, i;
- for (i = 0; i < ALLOWED_REFS_PER_FRAME; ++i) {
+ for (i = 0; i < REFS_PER_FRAME; ++i) {
if (vp9_rb_read_bit(rb)) {
YV12_BUFFER_CONFIG *const cfg = get_frame_ref_buffer(cm, i);
width = cfg->y_crop_width;
@@ -1096,9 +1096,9 @@ static size_t read_uncompressed_header(VP9D_COMP *pbi,
}
}
- pbi->refresh_frame_flags = (1 << NUM_REF_FRAMES) - 1;
+ pbi->refresh_frame_flags = (1 << REF_FRAMES) - 1;
- for (i = 0; i < ALLOWED_REFS_PER_FRAME; ++i)
+ for (i = 0; i < REFS_PER_FRAME; ++i)
cm->active_ref_idx[i] = cm->new_fb_idx;
setup_frame_size(pbi, rb);
@@ -1111,13 +1111,13 @@ static size_t read_uncompressed_header(VP9D_COMP *pbi,
if (cm->intra_only) {
check_sync_code(cm, rb);
- pbi->refresh_frame_flags = vp9_rb_read_literal(rb, NUM_REF_FRAMES);
+ pbi->refresh_frame_flags = vp9_rb_read_literal(rb, REF_FRAMES);
setup_frame_size(pbi, rb);
} else {
- pbi->refresh_frame_flags = vp9_rb_read_literal(rb, NUM_REF_FRAMES);
+ pbi->refresh_frame_flags = vp9_rb_read_literal(rb, REF_FRAMES);
- for (i = 0; i < ALLOWED_REFS_PER_FRAME; ++i) {
- const int ref = vp9_rb_read_literal(rb, NUM_REF_FRAMES_LOG2);
+ for (i = 0; i < REFS_PER_FRAME; ++i) {
+ const int ref = vp9_rb_read_literal(rb, REF_FRAMES_LOG2);
cm->active_ref_idx[i] = cm->ref_frame_map[ref];
cm->ref_frame_sign_bias[LAST_FRAME + i] = vp9_rb_read_bit(rb);
}
@@ -1127,7 +1127,7 @@ static size_t read_uncompressed_header(VP9D_COMP *pbi,
cm->allow_high_precision_mv = vp9_rb_read_bit(rb);
cm->mcomp_filter_type = read_interp_filter_type(rb);
- for (i = 0; i < ALLOWED_REFS_PER_FRAME; ++i) {
+ for (i = 0; i < REFS_PER_FRAME; ++i) {
vp9_setup_scale_factors(cm, i);
if (vp9_is_scaled(&cm->active_ref_scale_comm[i]))
vp9_extend_frame_borders(&cm->yv12_fb[cm->active_ref_idx[i]],
@@ -1146,7 +1146,7 @@ static size_t read_uncompressed_header(VP9D_COMP *pbi,
// This flag will be overridden by the call to vp9_setup_past_independence
// below, forcing the use of context 0 for those frame types.
- cm->frame_context_idx = vp9_rb_read_literal(rb, NUM_FRAME_CONTEXTS_LOG2);
+ cm->frame_context_idx = vp9_rb_read_literal(rb, FRAME_CONTEXTS_LOG2);
if (frame_is_intra_only(cm) || cm->error_resilient_mode)
vp9_setup_past_independence(cm);
diff --git a/vp9/decoder/vp9_decodemv.c b/vp9/decoder/vp9_decodemv.c
index 327a9166c..7858e16c8 100644
--- a/vp9/decoder/vp9_decodemv.c
+++ b/vp9/decoder/vp9_decodemv.c
@@ -408,8 +408,8 @@ static int read_is_inter_block(VP9_COMMON *const cm, MACROBLOCKD *const xd,
return vp9_get_segdata(&cm->seg, segment_id, SEG_LVL_REF_FRAME) !=
INTRA_FRAME;
} else {
- const int ctx = vp9_get_pred_context_intra_inter(xd);
- const int is_inter = vp9_read(r, vp9_get_pred_prob_intra_inter(cm, xd));
+ const int ctx = vp9_get_intra_inter_context(xd);
+ const int is_inter = vp9_read(r, cm->fc.intra_inter_prob[ctx]);
if (!cm->frame_parallel_decoding_mode)
++cm->counts.intra_inter[ctx][is_inter];
return is_inter;
diff --git a/vp9/decoder/vp9_onyxd_if.c b/vp9/decoder/vp9_onyxd_if.c
index 4c0cd45a9..e72b9628b 100644
--- a/vp9/decoder/vp9_onyxd_if.c
+++ b/vp9/decoder/vp9_onyxd_if.c
@@ -261,7 +261,7 @@ int vp9_get_reference_dec(VP9D_PTR ptr, int index, YV12_BUFFER_CONFIG **fb) {
VP9D_COMP *pbi = (VP9D_COMP *) ptr;
VP9_COMMON *cm = &pbi->common;
- if (index < 0 || index >= NUM_REF_FRAMES)
+ if (index < 0 || index >= REF_FRAMES)
return -1;
*fb = &cm->yv12_fb[cm->ref_frame_map[index]];
diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c
index 276bb13c7..7ee775b74 100644
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -292,8 +292,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
skip_coeff = write_skip_coeff(cpi, segment_id, m, bc);
if (!vp9_segfeature_active(seg, segment_id, SEG_LVL_REF_FRAME))
- vp9_write(bc, rf != INTRA_FRAME,
- vp9_get_pred_prob_intra_inter(cm, xd));
+ vp9_write(bc, rf != INTRA_FRAME, vp9_get_intra_inter_prob(cm, xd));
if (bsize >= BLOCK_8X8 && cm->tx_mode == TX_MODE_SELECT &&
!(rf != INTRA_FRAME &&
@@ -1105,11 +1104,11 @@ static void write_frame_size(VP9_COMP *cpi,
static void write_frame_size_with_refs(VP9_COMP *cpi,
struct vp9_write_bit_buffer *wb) {
VP9_COMMON *const cm = &cpi->common;
- int refs[ALLOWED_REFS_PER_FRAME] = {cpi->lst_fb_idx, cpi->gld_fb_idx,
- cpi->alt_fb_idx};
+ int refs[REFS_PER_FRAME] = {cpi->lst_fb_idx, cpi->gld_fb_idx,
+ cpi->alt_fb_idx};
int i, found = 0;
- for (i = 0; i < ALLOWED_REFS_PER_FRAME; ++i) {
+ for (i = 0; i < REFS_PER_FRAME; ++i) {
YV12_BUFFER_CONFIG *cfg = &cm->yv12_fb[cm->ref_frame_map[refs[i]]];
found = cm->width == cfg->y_crop_width &&
cm->height == cfg->y_crop_height;
@@ -1174,8 +1173,8 @@ static void write_uncompressed_header(VP9_COMP *cpi,
write_frame_size(cpi, wb);
} else {
- const int refs[ALLOWED_REFS_PER_FRAME] = {cpi->lst_fb_idx, cpi->gld_fb_idx,
- cpi->alt_fb_idx};
+ const int refs[REFS_PER_FRAME] = {cpi->lst_fb_idx, cpi->gld_fb_idx,
+ cpi->alt_fb_idx};
if (!cm->show_frame)
vp9_wb_write_bit(wb, cm->intra_only);
@@ -1185,13 +1184,13 @@ static void write_uncompressed_header(VP9_COMP *cpi,
if (cm->intra_only) {
write_sync_code(wb);
- vp9_wb_write_literal(wb, get_refresh_mask(cpi), NUM_REF_FRAMES);
+ vp9_wb_write_literal(wb, get_refresh_mask(cpi), REF_FRAMES);
write_frame_size(cpi, wb);
} else {
int i;
- vp9_wb_write_literal(wb, get_refresh_mask(cpi), NUM_REF_FRAMES);
- for (i = 0; i < ALLOWED_REFS_PER_FRAME; ++i) {
- vp9_wb_write_literal(wb, refs[i], NUM_REF_FRAMES_LOG2);
+ vp9_wb_write_literal(wb, get_refresh_mask(cpi), REF_FRAMES);
+ for (i = 0; i < REFS_PER_FRAME; ++i) {
+ vp9_wb_write_literal(wb, refs[i], REF_FRAMES_LOG2);
vp9_wb_write_bit(wb, cm->ref_frame_sign_bias[LAST_FRAME + i]);
}
@@ -1209,7 +1208,7 @@ static void write_uncompressed_header(VP9_COMP *cpi,
vp9_wb_write_bit(wb, cm->frame_parallel_decoding_mode);
}
- vp9_wb_write_literal(wb, cm->frame_context_idx, NUM_FRAME_CONTEXTS_LOG2);
+ vp9_wb_write_literal(wb, cm->frame_context_idx, FRAME_CONTEXTS_LOG2);
encode_loopfilter(&cm->lf, wb);
encode_quantization(cm, wb);
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index bc71d0259..2fa9dcc6e 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -751,7 +751,7 @@ static void update_stats(VP9_COMP *cpi) {
SEG_LVL_REF_FRAME);
if (!seg_ref_active)
- cpi->intra_inter_count[vp9_get_pred_context_intra_inter(xd)]
+ cpi->intra_inter_count[vp9_get_intra_inter_context(xd)]
[is_inter_block(mbmi)]++;
// If the segment reference feature is enabled we have only a single
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index d40fc6673..d69476613 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -2151,7 +2151,7 @@ int vp9_get_reference_enc(VP9_PTR ptr, int index, YV12_BUFFER_CONFIG **fb) {
VP9_COMP *cpi = (VP9_COMP *)(ptr);
VP9_COMMON *cm = &cpi->common;
- if (index < 0 || index >= NUM_REF_FRAMES)
+ if (index < 0 || index >= REF_FRAMES)
return -1;
*fb = &cm->yv12_fb[cm->ref_frame_map[index]];
@@ -2551,8 +2551,8 @@ static void loopfilter_frame(VP9_COMP *cpi, VP9_COMMON *cm) {
static void scale_references(VP9_COMP *cpi) {
VP9_COMMON *cm = &cpi->common;
int i;
- int refs[ALLOWED_REFS_PER_FRAME] = {cpi->lst_fb_idx, cpi->gld_fb_idx,
- cpi->alt_fb_idx};
+ int refs[REFS_PER_FRAME] = {cpi->lst_fb_idx, cpi->gld_fb_idx,
+ cpi->alt_fb_idx};
for (i = 0; i < 3; i++) {
YV12_BUFFER_CONFIG *ref = &cm->yv12_fb[cm->ref_frame_map[refs[i]]];
@@ -3558,7 +3558,7 @@ int vp9_get_compressed_data(VP9_PTR ptr, unsigned int *frame_flags,
VP9BORDERINPIXELS);
// Calculate scaling factors for each of the 3 available references
- for (i = 0; i < ALLOWED_REFS_PER_FRAME; ++i) {
+ for (i = 0; i < REFS_PER_FRAME; ++i) {
vp9_setup_scale_factors(cm, i);
if (vp9_is_scaled(&cm->active_ref_scale_comm[i]))
vp9_extend_frame_borders(&cm->yv12_fb[cm->active_ref_idx[i]],
diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h
index c6315653e..344d1b138 100644
--- a/vp9/encoder/vp9_onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -366,7 +366,7 @@ typedef struct VP9_COMP {
struct lookahead_ctx *lookahead;
struct lookahead_entry *source;
#if CONFIG_MULTIPLE_ARF
- struct lookahead_entry *alt_ref_source[NUM_REF_FRAMES];
+ struct lookahead_entry *alt_ref_source[REF_FRAMES];
#else
struct lookahead_entry *alt_ref_source;
#endif
@@ -394,7 +394,7 @@ typedef struct VP9_COMP {
int use_svc;
#if CONFIG_MULTIPLE_ARF
- int alt_ref_fb_idx[NUM_REF_FRAMES - 3];
+ int alt_ref_fb_idx[REF_FRAMES - 3];
#endif
int refresh_last_frame;
int refresh_golden_frame;
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index d631b3145..3fa8ceadb 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -199,7 +199,7 @@ void vp9_setup_inter_frame(VP9_COMP *cpi) {
if (cm->error_resilient_mode || cm->intra_only)
vp9_setup_past_independence(cm);
- assert(cm->frame_context_idx < NUM_FRAME_CONTEXTS);
+ assert(cm->frame_context_idx < FRAME_CONTEXTS);
cm->fc = cm->frame_contexts[cm->frame_context_idx];
}
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 399c534ec..d7aabf8e7 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -2145,7 +2145,7 @@ static void estimate_ref_frame_costs(VP9_COMP *cpi, int segment_id,
vpx_memset(ref_costs_comp, 0, MAX_REF_FRAMES * sizeof(*ref_costs_comp));
*comp_mode_p = 128;
} else {
- vp9_prob intra_inter_p = vp9_get_pred_prob_intra_inter(cm, xd);
+ vp9_prob intra_inter_p = vp9_get_intra_inter_prob(cm, xd);
vp9_prob comp_inter_p = 128;
if (cm->comp_pred_mode == REFERENCE_MODE_SELECT) {
@@ -2323,7 +2323,6 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
int_mv mvp_full;
int ref = mbmi->ref_frame[0];
int_mv ref_mv = mbmi->ref_mvs[ref][0];
- const BLOCK_SIZE block_size = get_plane_block_size(bsize, &xd->plane[0]);
int tmp_col_min = x->mv_col_min;
int tmp_col_max = x->mv_col_max;
@@ -2397,24 +2396,24 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
bestsme = vp9_hex_search(x, &mvp_full.as_mv,
step_param,
sadpb, 1,
- &cpi->fn_ptr[block_size], 1,
+ &cpi->fn_ptr[bsize], 1,
&ref_mv.as_mv, &tmp_mv->as_mv);
} else if (cpi->sf.search_method == SQUARE) {
bestsme = vp9_square_search(x, &mvp_full.as_mv,
step_param,
sadpb, 1,
- &cpi->fn_ptr[block_size], 1,
+ &cpi->fn_ptr[bsize], 1,
&ref_mv.as_mv, &tmp_mv->as_mv);
} else if (cpi->sf.search_method == BIGDIA) {
bestsme = vp9_bigdia_search(x, &mvp_full.as_mv,
step_param,
sadpb, 1,
- &cpi->fn_ptr[block_size], 1,
+ &cpi->fn_ptr[bsize], 1,
&ref_mv.as_mv, &tmp_mv->as_mv);
} else {
bestsme = vp9_full_pixel_diamond(cpi, x, &mvp_full, step_param,
sadpb, further_steps, 1,
- &cpi->fn_ptr[block_size],
+ &cpi->fn_ptr[bsize],
&ref_mv, tmp_mv);
}
@@ -2429,7 +2428,7 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
cpi->find_fractional_mv_step(x, &tmp_mv->as_mv, &ref_mv.as_mv,
cm->allow_high_precision_mv,
x->errorperbit,
- &cpi->fn_ptr[block_size],
+ &cpi->fn_ptr[bsize],
0, cpi->sf.subpel_iters_per_step,
x->nmvjointcost, x->mvcost,
&dis, &sse);
@@ -2459,7 +2458,6 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
const int refs[2] = { mbmi->ref_frame[0],
mbmi->ref_frame[1] < 0 ? 0 : mbmi->ref_frame[1] };
int_mv ref_mv[2];
- const BLOCK_SIZE block_size = get_plane_block_size(bsize, &xd->plane[0]);
int ite, ref;
// Prediction buffer from second frame.
uint8_t *second_pred = vpx_memalign(16, pw * ph * sizeof(uint8_t));
@@ -2533,7 +2531,7 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
// Small-range full-pixel motion search
bestsme = vp9_refining_search_8p_c(x, &tmp_mv, sadpb,
search_range,
- &cpi->fn_ptr[block_size],
+ &cpi->fn_ptr[bsize],
x->nmvjointcost, x->mvcost,
&ref_mv[id], second_pred,
pw, ph);
@@ -2552,7 +2550,7 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
&ref_mv[id].as_mv,
cpi->common.allow_high_precision_mv,
x->errorperbit,
- &cpi->fn_ptr[block_size],
+ &cpi->fn_ptr[bsize],
0, cpi->sf.subpel_iters_per_step,
x->nmvjointcost, x->mvcost,
&dis, &sse, second_pred,
diff --git a/vpx/src/vpx_decoder.c b/vpx/src/vpx_decoder.c
index 1f575e0a0..a99e48f88 100644
--- a/vpx/src/vpx_decoder.c
+++ b/vpx/src/vpx_decoder.c
@@ -172,7 +172,7 @@ vpx_codec_err_t vpx_codec_register_put_slice_cb(vpx_codec_ctx_t *ctx
if (!ctx || !cb)
res = VPX_CODEC_INVALID_PARAM;
else if (!ctx->iface || !ctx->priv
- || !(ctx->iface->caps & VPX_CODEC_CAP_PUT_FRAME))
+ || !(ctx->iface->caps & VPX_CODEC_CAP_PUT_SLICE))
res = VPX_CODEC_ERROR;
else {
ctx->priv->dec.put_slice_cb.u.put_slice = cb;