diff options
author | James Zern <jzern@google.com> | 2023-04-10 17:18:52 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2023-04-10 17:18:52 -0700 |
commit | a6a09b32962ba6ba1cd04b4fb421c456ce0f2ec0 (patch) | |
tree | 7d8f48533fcae96a9444f3a610494af4aaa39e14 | |
parent | 50ac4f7c97ae29ebf16e3364c057bdc46782a47d (diff) | |
download | libwebp-a6a09b32962ba6ba1cd04b4fb421c456ce0f2ec0.tar.gz |
webp-lossless-bitstream-spec: fix 2 code typos
- add missing '(' in DIV_ROUND_UP
- in 6.2.2, rename 'pos' variable reference to match definition
('position')
spotted by thakis@
Change-Id: Ida3ed281c2c753ebbb0e1eb3c4ed04dadc79ca24
-rw-r--r-- | doc/webp-lossless-bitstream-spec.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/webp-lossless-bitstream-spec.txt b/doc/webp-lossless-bitstream-spec.txt index 563426d4..a5daad49 100644 --- a/doc/webp-lossless-bitstream-spec.txt +++ b/doc/webp-lossless-bitstream-spec.txt @@ -241,7 +241,7 @@ two-dimensionally. int size_bits = ReadBits(3) + 2; int block_width = (1 << size_bits); int block_height = (1 << size_bits); -#define DIV_ROUND_UP(num, den) ((num) + (den) - 1) / (den)) +#define DIV_ROUND_UP(num, den) (((num) + (den) - 1) / (den)) int block_xsize = DIV_ROUND_UP(image_width, 1 << size_bits); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1008,7 +1008,7 @@ codes to be used as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ int position = (y >> prefix_bits) * prefix_xsize + (x >> prefix_bits); -int meta_prefix_code = (entropy_image[pos] >> 8) & 0xffff; +int meta_prefix_code = (entropy_image[position] >> 8) & 0xffff; PrefixCodeGroup prefix_group = prefix_code_groups[meta_prefix_code]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |