mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 14:34:33 +02:00
Remove useless code.
The casts are to the same type and the #define not used. Change-Id: I8d69c3b9dde7a1c53c2ba5a026a653d8c2e1d2a7
This commit is contained in:
@ -91,11 +91,6 @@ static WEBP_INLINE uint32_t PixOrCopyLength(const PixOrCopy* const p) {
|
||||
return p->len;
|
||||
}
|
||||
|
||||
static WEBP_INLINE uint32_t PixOrCopyArgb(const PixOrCopy* const p) {
|
||||
assert(p->mode == kLiteral);
|
||||
return p->argb_or_distance;
|
||||
}
|
||||
|
||||
static WEBP_INLINE uint32_t PixOrCopyCacheIdx(const PixOrCopy* const p) {
|
||||
assert(p->mode == kCacheIdx);
|
||||
assert(p->argb_or_distance < (1U << MAX_COLOR_CACHE_BITS));
|
||||
|
@ -28,7 +28,6 @@
|
||||
|
||||
#include "src/enc/delta_palettization_enc.h"
|
||||
|
||||
#define PALETTE_KEY_RIGHT_SHIFT 22 // Key for 1K buffer.
|
||||
// Maximum number of histogram images (sub-blocks).
|
||||
#define MAX_HUFF_IMAGE_SIZE 2600
|
||||
|
||||
|
@ -207,7 +207,7 @@ static VP8Encoder* InitVP8Encoder(const WebPConfig* const config,
|
||||
enc->preds_w_ = preds_w;
|
||||
enc->mb_info_ = (VP8MBInfo*)mem;
|
||||
mem += info_size;
|
||||
enc->preds_ = ((uint8_t*)mem) + 1 + enc->preds_w_;
|
||||
enc->preds_ = mem + 1 + enc->preds_w_;
|
||||
mem += preds_size;
|
||||
enc->nz_ = 1 + (uint32_t*)WEBP_ALIGN(mem);
|
||||
mem += nz_size;
|
||||
@ -216,7 +216,7 @@ static VP8Encoder* InitVP8Encoder(const WebPConfig* const config,
|
||||
|
||||
// top samples (all 16-aligned)
|
||||
mem = (uint8_t*)WEBP_ALIGN(mem);
|
||||
enc->y_top_ = (uint8_t*)mem;
|
||||
enc->y_top_ = mem;
|
||||
enc->uv_top_ = enc->y_top_ + top_stride;
|
||||
mem += 2 * top_stride;
|
||||
assert(mem <= (uint8_t*)enc + size);
|
||||
|
Reference in New Issue
Block a user