summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2013-12-05 16:23:09 -0800
committerDmitry Kovalev <dkovalev@google.com>2013-12-05 16:23:09 -0800
commit0d4b8d7e432400334a954bfb0c5a45d905506b7c (patch)
treebff991548546a8273ac2dae8dac586557c691b5a /vp9/encoder
parent3eb0170ea6a12492ec70f54f4cea5e41ac0c2c1b (diff)
downloadlibvpx-0d4b8d7e432400334a954bfb0c5a45d905506b7c.tar
libvpx-0d4b8d7e432400334a954bfb0c5a45d905506b7c.tar.gz
libvpx-0d4b8d7e432400334a954bfb0c5a45d905506b7c.tar.bz2
libvpx-0d4b8d7e432400334a954bfb0c5a45d905506b7c.zip
Renaming constants.
NUM_YV12_BUFFERS => FRAME_BUFFERS ALLOWED_REFS_PER_FRAME => REFS_PER_FRAME NUM_REF_FRAMES_LOG2 => REF_FRAMES_LOG2 NUM_REF_FRAMES => REF_FRAMES NUM_FRAME_CONTEXTS_LOG2 => FRAME_CONTEXTS_LOG2 NUM_FRAME_CONTEXTS => FRAME_CONTEXTS Change-Id: I4e1ada08f25d8fa30fdf03aebe1b1c9df0f87e63
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_bitstream.c20
-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
4 files changed, 17 insertions, 17 deletions
diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c
index 97717fb9c..ba8a4ebbc 100644
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -1114,11 +1114,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;
@@ -1183,8 +1183,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);
@@ -1194,13 +1194,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]);
}
@@ -1218,7 +1218,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_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index 7c36637a0..7b25f26b5 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -2155,7 +2155,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]];
@@ -2572,8 +2572,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]]];
@@ -3608,7 +3608,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 b8602e094..aba09afb4 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 bf1fc4f31..cb0977833 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -195,7 +195,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];
}