summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2014-06-26 01:55:00 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-06-26 01:55:00 -0700
commit601be5a29e236db6b762a21fee8a330ee7ea5639 (patch)
tree7c989ab5d20d70a90705e7b2d6db0f56aa62f8da
parentce7199075e551871052de49121905277721062a5 (diff)
parent9f76c1ec507e1c866c8952c6003e99af9bc9d73c (diff)
downloadlibvpx-601be5a29e236db6b762a21fee8a330ee7ea5639.tar
libvpx-601be5a29e236db6b762a21fee8a330ee7ea5639.tar.gz
libvpx-601be5a29e236db6b762a21fee8a330ee7ea5639.tar.bz2
libvpx-601be5a29e236db6b762a21fee8a330ee7ea5639.zip
Merge "Dual arf: Name changes."
-rw-r--r--vp9/encoder/vp9_encoder.c7
-rw-r--r--vp9/encoder/vp9_firstpass.c12
2 files changed, 9 insertions, 10 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index 11fd584a7..08968b247 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -2397,7 +2397,7 @@ static int get_arf_src_index(VP9_COMP *cpi) {
return arf_src_index;
}
-static void is_src_altref(VP9_COMP *cpi) {
+static void check_src_altref(VP9_COMP *cpi) {
RATE_CONTROL *const rc = &cpi->rc;
if (cpi->pass == 2) {
@@ -2513,9 +2513,8 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
cm->show_frame = 1;
cm->intra_only = 0;
- // Check to see if the frame to be encoded is an overlay for a previous
- // arf frame and if so configure it as such.
- is_src_altref(cpi);
+ // Check to see if the frame should be encoded is an arf overlay.
+ check_src_altref(cpi);
}
}
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c
index 0261b98e4..d0dd18213 100644
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -1310,7 +1310,7 @@ static void allocate_gf_group_bits(VP9_COMP *cpi, int64_t gf_group_bits,
double modified_err = 0.0;
double err_fraction;
int mid_boost_bits = 0;
- int middle_frame_idx;
+ int mid_frame_idx;
unsigned char arf_buffer_indices[MAX_ACTIVE_ARFS];
key_frame = cpi->common.frame_type == KEY_FRAME ||
@@ -1376,7 +1376,7 @@ static void allocate_gf_group_bits(VP9_COMP *cpi, int64_t gf_group_bits,
}
// Define middle frame
- middle_frame_idx = frame_index + (rc->baseline_gf_interval >> 1) - 1;
+ mid_frame_idx = frame_index + (rc->baseline_gf_interval >> 1) - 1;
// Allocate bits to the other frames in the group.
for (i = 0; i < rc->baseline_gf_interval - 1; ++i) {
@@ -1397,7 +1397,7 @@ static void allocate_gf_group_bits(VP9_COMP *cpi, int64_t gf_group_bits,
mid_boost_bits += (target_frame_size >> 4);
target_frame_size -= (target_frame_size >> 4);
- if (frame_index <= middle_frame_idx)
+ if (frame_index <= mid_frame_idx)
arf_idx = 1;
}
twopass->gf_group.arf_update_idx[frame_index] = arf_buffer_indices[arf_idx];
@@ -1427,9 +1427,9 @@ static void allocate_gf_group_bits(VP9_COMP *cpi, int64_t gf_group_bits,
// Final setup for second arf and its overlay.
if (cpi->multi_arf_enabled) {
twopass->gf_group.bit_allocation[2] =
- twopass->gf_group.bit_allocation[middle_frame_idx] + mid_boost_bits;
- twopass->gf_group.update_type[middle_frame_idx] = OVERLAY_UPDATE;
- twopass->gf_group.bit_allocation[middle_frame_idx] = 0;
+ twopass->gf_group.bit_allocation[mid_frame_idx] + mid_boost_bits;
+ twopass->gf_group.update_type[mid_frame_idx] = OVERLAY_UPDATE;
+ twopass->gf_group.bit_allocation[mid_frame_idx] = 0;
}
} else {
twopass->gf_group.update_type[frame_index] = GF_UPDATE;