summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2013-12-16 20:12:47 -0800
committerDmitry Kovalev <dkovalev@google.com>2013-12-16 20:12:47 -0800
commit1d23a6594bf7ce33a0e3c8f608c68d23dd746266 (patch)
tree573921a192dc5826a70de5d2228fe39794894c38 /vp9/encoder/vp9_encodeframe.c
parent3755be94ed143a957941046c6724e18bdeeda063 (diff)
downloadlibvpx-1d23a6594bf7ce33a0e3c8f608c68d23dd746266.tar
libvpx-1d23a6594bf7ce33a0e3c8f608c68d23dd746266.tar.gz
libvpx-1d23a6594bf7ce33a0e3c8f608c68d23dd746266.tar.bz2
libvpx-1d23a6594bf7ce33a0e3c8f608c68d23dd746266.zip
Reusing FRAME_COUNTS in the encoder.
Change-Id: I6ab9fe2326ebbadf0dd10cca9f66cf8277e3f43b Replacing: comp_inter_count, single_ref_count, comp_ref_count.
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r--vp9/encoder/vp9_encodeframe.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 1c86b0ece..4ddbd9067 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -762,17 +762,17 @@ static void update_stats(VP9_COMP *cpi) {
// the reference frame counts used to work out probabilities.
if (is_inter_block(mbmi) && !seg_ref_active) {
if (cm->reference_mode == REFERENCE_MODE_SELECT)
- cpi->comp_inter_count[vp9_get_reference_mode_context(cm, xd)]
+ cm->counts.comp_inter[vp9_get_reference_mode_context(cm, xd)]
[has_second_ref(mbmi)]++;
if (has_second_ref(mbmi)) {
- cpi->comp_ref_count[vp9_get_pred_context_comp_ref_p(cm, xd)]
+ cm->counts.comp_ref[vp9_get_pred_context_comp_ref_p(cm, xd)]
[mbmi->ref_frame[0] == GOLDEN_FRAME]++;
} else {
- cpi->single_ref_count[vp9_get_pred_context_single_ref_p1(xd)][0]
+ cm->counts.single_ref[vp9_get_pred_context_single_ref_p1(xd)][0]
[mbmi->ref_frame[0] != LAST_FRAME]++;
if (mbmi->ref_frame[0] != LAST_FRAME)
- cpi->single_ref_count[vp9_get_pred_context_single_ref_p2(xd)][1]
+ cm->counts.single_ref[vp9_get_pred_context_single_ref_p2(xd)][1]
[mbmi->ref_frame[0] != GOLDEN_FRAME]++;
}
}
@@ -2011,9 +2011,9 @@ static void init_encode_frame_mb_context(VP9_COMP *cpi) {
vp9_zero(cm->counts.inter_mode);
vp9_zero(cm->counts.partition);
vp9_zero(cpi->intra_inter_count);
- vp9_zero(cpi->comp_inter_count);
- vp9_zero(cpi->single_ref_count);
- vp9_zero(cpi->comp_ref_count);
+ vp9_zero(cm->counts.comp_inter);
+ vp9_zero(cm->counts.single_ref);
+ vp9_zero(cm->counts.comp_ref);
vp9_zero(cm->counts.tx);
vp9_zero(cm->counts.mbskip);
@@ -2431,16 +2431,16 @@ void vp9_encode_frame(VP9_COMP *cpi) {
int comp_count_zero = 0;
for (i = 0; i < COMP_INTER_CONTEXTS; i++) {
- single_count_zero += cpi->comp_inter_count[i][0];
- comp_count_zero += cpi->comp_inter_count[i][1];
+ single_count_zero += cm->counts.comp_inter[i][0];
+ comp_count_zero += cm->counts.comp_inter[i][1];
}
if (comp_count_zero == 0) {
cpi->common.reference_mode = SINGLE_REFERENCE;
- vp9_zero(cpi->comp_inter_count);
+ vp9_zero(cm->counts.comp_inter);
} else if (single_count_zero == 0) {
cpi->common.reference_mode = COMPOUND_REFERENCE;
- vp9_zero(cpi->comp_inter_count);
+ vp9_zero(cm->counts.comp_inter);
}
}