GRIDMATRIX optimization wasn't adding in cost of double-byte properly

This commit is contained in:
gitlost 2019-12-04 14:07:55 +00:00
parent b1f4a12c78
commit 5fe97772cb
2 changed files with 3 additions and 1 deletions

View file

@ -201,6 +201,7 @@ static void define_mode(unsigned int gbdata[], const size_t length, char* mode,
if (byte_count == 512 || (double_byte && byte_count == 511)) {
cur_costs[GM_B] = head_costs[GM_B];
if (double_byte && byte_count == 511) {
cur_costs[GM_B] += 48; /* 8 * GM_MULT */
double_byte = 0; /* Splitting double-byte so mark as single */
}
byte_count = 0;