mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 14:34:33 +02:00
right-size some tables
Change-Id: I5e894fd3f0f4b666512108495d8cecb34f65e119
This commit is contained in:
@ -658,7 +658,7 @@ static int StatLoop(VP8Encoder* const enc) {
|
||||
// Main loops
|
||||
//
|
||||
|
||||
static const int kAverageBytesPerMB[8] = { 50, 24, 16, 9, 7, 5, 3, 2 };
|
||||
static const uint8_t kAverageBytesPerMB[8] = { 50, 24, 16, 9, 7, 5, 3, 2 };
|
||||
|
||||
static int PreLoopInitialize(VP8Encoder* const enc) {
|
||||
int p;
|
||||
|
@ -457,11 +457,11 @@ void VP8SetSegmentParams(VP8Encoder* const enc, float quality) {
|
||||
// Form the predictions in cache
|
||||
|
||||
// Must be ordered using {DC_PRED, TM_PRED, V_PRED, H_PRED} as index
|
||||
const int VP8I16ModeOffsets[4] = { I16DC16, I16TM16, I16VE16, I16HE16 };
|
||||
const int VP8UVModeOffsets[4] = { C8DC8, C8TM8, C8VE8, C8HE8 };
|
||||
const uint16_t VP8I16ModeOffsets[4] = { I16DC16, I16TM16, I16VE16, I16HE16 };
|
||||
const uint16_t VP8UVModeOffsets[4] = { C8DC8, C8TM8, C8VE8, C8HE8 };
|
||||
|
||||
// Must be indexed using {B_DC_PRED -> B_HU_PRED} as index
|
||||
const int VP8I4ModeOffsets[NUM_BMODES] = {
|
||||
const uint16_t VP8I4ModeOffsets[NUM_BMODES] = {
|
||||
I4DC4, I4TM4, I4VE4, I4HE4, I4RD4, I4VR4, I4LD4, I4VL4, I4HD4, I4HU4
|
||||
};
|
||||
|
||||
@ -492,14 +492,14 @@ void VP8MakeIntra4Preds(const VP8EncIterator* const it) {
|
||||
// |YYYY|....| 12
|
||||
// +----+----+
|
||||
|
||||
const int VP8Scan[16] = { // Luma
|
||||
const uint16_t VP8Scan[16] = { // Luma
|
||||
0 + 0 * BPS, 4 + 0 * BPS, 8 + 0 * BPS, 12 + 0 * BPS,
|
||||
0 + 4 * BPS, 4 + 4 * BPS, 8 + 4 * BPS, 12 + 4 * BPS,
|
||||
0 + 8 * BPS, 4 + 8 * BPS, 8 + 8 * BPS, 12 + 8 * BPS,
|
||||
0 + 12 * BPS, 4 + 12 * BPS, 8 + 12 * BPS, 12 + 12 * BPS,
|
||||
};
|
||||
|
||||
static const int VP8ScanUV[4 + 4] = {
|
||||
static const uint16_t VP8ScanUV[4 + 4] = {
|
||||
0 + 0 * BPS, 4 + 0 * BPS, 0 + 4 * BPS, 4 + 4 * BPS, // U
|
||||
8 + 0 * BPS, 12 + 0 * BPS, 8 + 4 * BPS, 12 + 4 * BPS // V
|
||||
};
|
||||
|
@ -75,10 +75,10 @@ typedef enum { // Rate-distortion optimization levels
|
||||
#define U_OFF_ENC (16)
|
||||
#define V_OFF_ENC (16 + 8)
|
||||
|
||||
extern const int VP8Scan[16]; // in quant.c
|
||||
extern const int VP8UVModeOffsets[4]; // in analyze.c
|
||||
extern const int VP8I16ModeOffsets[4];
|
||||
extern const int VP8I4ModeOffsets[NUM_BMODES];
|
||||
extern const uint16_t VP8Scan[16];
|
||||
extern const uint16_t VP8UVModeOffsets[4];
|
||||
extern const uint16_t VP8I16ModeOffsets[4];
|
||||
extern const uint16_t VP8I4ModeOffsets[NUM_BMODES];
|
||||
|
||||
// Layout of prediction blocks
|
||||
// intra 16x16
|
||||
|
@ -735,7 +735,7 @@ static WebPEncodingError StoreImageToBitMask(
|
||||
codes = huffman_codes + 5 * histogram_ix;
|
||||
}
|
||||
if (PixOrCopyIsLiteral(v)) {
|
||||
static const int order[] = { 1, 2, 0, 3 };
|
||||
static const uint8_t order[] = { 1, 2, 0, 3 };
|
||||
int k;
|
||||
for (k = 0; k < 4; ++k) {
|
||||
const int code = PixOrCopyLiteral(v, order[k]);
|
||||
|
Reference in New Issue
Block a user