Lines Matching refs:distance
96 // Splitting of distance and length codes into prefixes and
99 static WEBP_INLINE void VP8LPrefixEncodeBitsNoLUT(int distance, int* const code,
101 const int highest_bit = BitsLog2Floor(--distance);
102 const int second_highest_bit = (distance >> (highest_bit - 1)) & 1;
107 static WEBP_INLINE void VP8LPrefixEncodeNoLUT(int distance, int* const code,
110 const int highest_bit = BitsLog2Floor(--distance);
111 const int second_highest_bit = (distance >> (highest_bit - 1)) & 1;
113 *extra_bits_value = distance & ((1 << *extra_bits) - 1);
126 static WEBP_INLINE void VP8LPrefixEncodeBits(int distance, int* const code,
128 if (distance < PREFIX_LOOKUP_IDX_MAX) {
129 const VP8LPrefixCode prefix_code = kPrefixEncodeCode[distance];
133 VP8LPrefixEncodeBitsNoLUT(distance, code, extra_bits);
137 static WEBP_INLINE void VP8LPrefixEncode(int distance, int* const code,
140 if (distance < PREFIX_LOOKUP_IDX_MAX) {
141 const VP8LPrefixCode prefix_code = kPrefixEncodeCode[distance];
144 *extra_bits_value = kPrefixEncodeExtraBitsValue[distance];
146 VP8LPrefixEncodeNoLUT(distance, code, extra_bits, extra_bits_value);