[NORMATIVE] Init the txfm context to be max value
Initialize the transform block partition context with maximum
transform block size value instead of 0.
This improves the compression performance in speed 1 by 0.1% for
lowres_cam, 0.05% for lowres.
BUG=aomedia:1039
Change-Id: I4cf8517dcfca689cb2b9d71c0ede6dd941b09532
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h
index 3840df4..c484b73 100644
--- a/av1/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -1161,14 +1161,17 @@
av1_zero_array(cm->above_seg_context + mi_col_start, aligned_width);
- av1_zero_array(cm->above_txfm_context + (mi_col_start << TX_UNIT_WIDE_LOG2),
- aligned_width << TX_UNIT_WIDE_LOG2);
+ memset(cm->above_txfm_context + (mi_col_start << TX_UNIT_WIDE_LOG2),
+ tx_size_wide[TX_SIZES_LARGEST],
+ (aligned_width << TX_UNIT_WIDE_LOG2) * sizeof(TXFM_CONTEXT));
}
static INLINE void av1_zero_left_context(MACROBLOCKD *const xd) {
av1_zero(xd->left_context);
av1_zero(xd->left_seg_context);
- av1_zero(xd->left_txfm_context_buffer);
+
+ memset(xd->left_txfm_context_buffer, tx_size_high[TX_SIZES_LARGEST],
+ sizeof(xd->left_txfm_context_buffer));
}
// Disable array-bounds checks as the TX_SIZE enum contains values larger than
diff --git a/test/decode_to_md5.sh b/test/decode_to_md5.sh
index ee42554..27bea91 100755
--- a/test/decode_to_md5.sh
+++ b/test/decode_to_md5.sh
@@ -57,7 +57,7 @@
decode_to_md5_av1() {
# expected MD5 sum for the last frame.
- local expected_md5="08d6acb77b20a408237fd42c7575e67d"
+ local expected_md5="dc9d5c24d2c74994ecc361ae0d44e6cf"
local file="${AV1_IVF_FILE}"
# TODO(urvang): Check in the encoded file (like libvpx does) to avoid