From: Henrik Gramner Date: Sat, 14 Oct 2017 12:11:26 +0000 (+0200) Subject: Shrink the i4x4_mode cost_table array X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=06c8f6bab0fc8fa9b2df9a1af5d10c87c515edb4;p=libx264 Shrink the i4x4_mode cost_table array Only 17 elements are actually used. It was originally padded to 64 bytes to avoid cache line splits in the x86 assembly, but those haven't really been an issue on x86 CPU:s made in the past decade or so. Benchmarking shows no performance impact from dropping the padding, so might as well remove it and save some cache. --- diff --git a/common/common.h b/common/common.h index fe2b1c7f..27a56fbd 100644 --- a/common/common.h +++ b/common/common.h @@ -349,7 +349,7 @@ struct x264_t struct { uint16_t ref[QP_MAX+1][3][33]; - ALIGNED_64( uint16_t i4x4_mode[QP_MAX+1][32] ); + uint16_t i4x4_mode[QP_MAX+1][17]; } *cost_table; const uint8_t *chroma_qp_table; /* includes both the nonlinear luma->chroma mapping and chroma_qp_offset */