summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2013-11-22 14:26:39 -0800
committerDmitry Kovalev <dkovalev@google.com>2013-11-22 14:26:39 -0800
commit75e4377d81265e756d2351a01f76a76aefea8cd5 (patch)
treea459b4d53a7e0b002e6a348468961718e01bc1b9 /vp9/encoder
parent0a64f943fccc194a16c53af461f81bd48d840d71 (diff)
downloadlibvpx-75e4377d81265e756d2351a01f76a76aefea8cd5.tar
libvpx-75e4377d81265e756d2351a01f76a76aefea8cd5.tar.gz
libvpx-75e4377d81265e756d2351a01f76a76aefea8cd5.tar.bz2
libvpx-75e4377d81265e756d2351a01f76a76aefea8cd5.zip
Using partition counts from FRAME_COUNTS struct in the encoder.
Change-Id: I6c3d47b00acabe7ffba22ffc73741173aa9a0bff
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_bitstream.c3
-rw-r--r--vp9/encoder/vp9_encodeframe.c10
-rw-r--r--vp9/encoder/vp9_onyx_if.c1
-rw-r--r--vp9/encoder/vp9_onyx_int.h1
4 files changed, 6 insertions, 9 deletions
diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c
index e8ec61eea..a0fced576 100644
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -1391,8 +1391,7 @@ static size_t write_compressed_header(VP9_COMP *cpi, uint8_t *data) {
for (i = 0; i < PARTITION_CONTEXTS; ++i)
prob_diff_update(vp9_partition_tree, fc->partition_prob[i],
- (unsigned int *)cpi->partition_count[i], PARTITION_TYPES,
- &header_bc);
+ cm->counts.partition[i], PARTITION_TYPES, &header_bc);
vp9_write_nmv_probs(cpi, cm->allow_high_precision_mv, &header_bc);
}
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 2a85deec8..33839370a 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -850,18 +850,18 @@ static void encode_sb(VP9_COMP *cpi, const TileInfo *const tile,
switch (partition) {
case PARTITION_NONE:
if (output_enabled && bsize >= BLOCK_8X8)
- cpi->partition_count[pl][PARTITION_NONE]++;
+ cm->counts.partition[pl][PARTITION_NONE]++;
encode_b(cpi, tile, tp, mi_row, mi_col, output_enabled, c1, -1);
break;
case PARTITION_VERT:
if (output_enabled)
- cpi->partition_count[pl][PARTITION_VERT]++;
+ cm->counts.partition[pl][PARTITION_VERT]++;
encode_b(cpi, tile, tp, mi_row, mi_col, output_enabled, c1, 0);
encode_b(cpi, tile, tp, mi_row, mi_col + bs, output_enabled, c1, 1);
break;
case PARTITION_HORZ:
if (output_enabled)
- cpi->partition_count[pl][PARTITION_HORZ]++;
+ cm->counts.partition[pl][PARTITION_HORZ]++;
encode_b(cpi, tile, tp, mi_row, mi_col, output_enabled, c1, 0);
encode_b(cpi, tile, tp, mi_row + bs, mi_col, output_enabled, c1, 1);
break;
@@ -869,7 +869,7 @@ static void encode_sb(VP9_COMP *cpi, const TileInfo *const tile,
subsize = get_subsize(bsize, PARTITION_SPLIT);
if (output_enabled)
- cpi->partition_count[pl][PARTITION_SPLIT]++;
+ cm->counts.partition[pl][PARTITION_SPLIT]++;
for (i = 0; i < 4; i++) {
const int x_idx = i & 1, y_idx = i >> 1;
@@ -1888,7 +1888,7 @@ static void init_encode_frame_mb_context(VP9_COMP *cpi) {
vp9_zero(cpi->y_mode_count);
vp9_zero(cpi->y_uv_mode_count);
vp9_zero(cm->counts.inter_mode);
- vp9_zero(cpi->partition_count);
+ vp9_zero(cm->counts.partition);
vp9_zero(cpi->intra_inter_count);
vp9_zero(cpi->comp_inter_count);
vp9_zero(cpi->single_ref_count);
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index 585f799df..b1fa6865e 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -3053,7 +3053,6 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
vp9_copy(counts->y_mode, cpi->y_mode_count);
vp9_copy(counts->uv_mode, cpi->y_uv_mode_count);
- vp9_copy(counts->partition, cpi->partition_count);
vp9_copy(counts->intra_inter, cpi->intra_inter_count);
vp9_copy(counts->comp_inter, cpi->comp_inter_count);
vp9_copy(counts->single_ref, cpi->single_ref_count);
diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h
index 8fa63854e..54af75633 100644
--- a/vp9/encoder/vp9_onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -467,7 +467,6 @@ typedef struct VP9_COMP {
int y_mode_count[4][INTRA_MODES];
int y_uv_mode_count[INTRA_MODES][INTRA_MODES];
- unsigned int partition_count[PARTITION_CONTEXTS][PARTITION_TYPES];
nmv_context_counts NMVcount;