mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
vp8l_dec.c,cosmetics: fix a few typos
Change-Id: Ia2906883e7d19bd96f355b4ade98d29ac2efe8cc
This commit is contained in:
parent
c3d0c2d7d8
commit
5ccbd6ed8c
@ -178,7 +178,7 @@ static WEBP_INLINE int PlaneCodeToDistance(int xsize, int plane_code) {
|
|||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Decodes the next Huffman code from bit-stream.
|
// Decodes the next Huffman code from bit-stream.
|
||||||
// FillBitWindow(br) needs to be called at minimum every second call
|
// VP8LFillBitWindow(br) needs to be called at minimum every second call
|
||||||
// to ReadSymbol, in order to pre-fetch enough bits.
|
// to ReadSymbol, in order to pre-fetch enough bits.
|
||||||
static WEBP_INLINE int ReadSymbol(const HuffmanCode* table,
|
static WEBP_INLINE int ReadSymbol(const HuffmanCode* table,
|
||||||
VP8LBitReader* const br) {
|
VP8LBitReader* const br) {
|
||||||
@ -321,7 +321,7 @@ static int ReadHuffmanCode(int alphabet_size, VP8LDecoder* const dec,
|
|||||||
// The first code is either 1 bit or 8 bit code.
|
// The first code is either 1 bit or 8 bit code.
|
||||||
int symbol = VP8LReadBits(br, (first_symbol_len_code == 0) ? 1 : 8);
|
int symbol = VP8LReadBits(br, (first_symbol_len_code == 0) ? 1 : 8);
|
||||||
code_lengths[symbol] = 1;
|
code_lengths[symbol] = 1;
|
||||||
// The second code (if present), is always 8 bit long.
|
// The second code (if present), is always 8 bits long.
|
||||||
if (num_symbols == 2) {
|
if (num_symbols == 2) {
|
||||||
symbol = VP8LReadBits(br, 8);
|
symbol = VP8LReadBits(br, 8);
|
||||||
code_lengths[symbol] = 1;
|
code_lengths[symbol] = 1;
|
||||||
@ -1281,7 +1281,7 @@ static int ExpandColorMap(int num_colors, VP8LTransform* const transform) {
|
|||||||
uint8_t* const new_data = (uint8_t*)new_color_map;
|
uint8_t* const new_data = (uint8_t*)new_color_map;
|
||||||
new_color_map[0] = transform->data_[0];
|
new_color_map[0] = transform->data_[0];
|
||||||
for (i = 4; i < 4 * num_colors; ++i) {
|
for (i = 4; i < 4 * num_colors; ++i) {
|
||||||
// Equivalent to AddPixelEq(), on a byte-basis.
|
// Equivalent to VP8LAddPixels(), on a byte-basis.
|
||||||
new_data[i] = (data[i] + new_data[i - 4]) & 0xff;
|
new_data[i] = (data[i] + new_data[i - 4]) & 0xff;
|
||||||
}
|
}
|
||||||
for (; i < 4 * final_num_colors; ++i) {
|
for (; i < 4 * final_num_colors; ++i) {
|
||||||
|
Loading…
Reference in New Issue
Block a user