mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-28 14:38:21 +01:00
Merge "3% speed improvement for lossless webp encoder for low effort mode:"
This commit is contained in:
commit
a40f60a9b4
@ -692,7 +692,7 @@ void VP8LResidualImage(int width, int height, int bits, int low_effort,
|
|||||||
uint32_t* const current_tile_rows = argb_scratch + width;
|
uint32_t* const current_tile_rows = argb_scratch + width;
|
||||||
int tile_y;
|
int tile_y;
|
||||||
int histo[4][256];
|
int histo[4][256];
|
||||||
memset(histo, 0, sizeof(histo));
|
if (!low_effort) memset(histo, 0, sizeof(histo));
|
||||||
for (tile_y = 0; tile_y < tiles_per_col; ++tile_y) {
|
for (tile_y = 0; tile_y < tiles_per_col; ++tile_y) {
|
||||||
const int tile_y_offset = tile_y * max_tile_size;
|
const int tile_y_offset = tile_y * max_tile_size;
|
||||||
const int this_tile_height =
|
const int this_tile_height =
|
||||||
@ -720,6 +720,7 @@ void VP8LResidualImage(int width, int height, int bits, int low_effort,
|
|||||||
image[tile_y * tiles_per_row + tile_x] = 0xff000000u | (pred << 8);
|
image[tile_y * tiles_per_row + tile_x] = 0xff000000u | (pred << 8);
|
||||||
CopyTileWithPrediction(width, height, tile_x, tile_y, bits, pred,
|
CopyTileWithPrediction(width, height, tile_x, tile_y, bits, pred,
|
||||||
argb_scratch, argb);
|
argb_scratch, argb);
|
||||||
|
if (!low_effort) {
|
||||||
for (y = 0; y < max_tile_size; ++y) {
|
for (y = 0; y < max_tile_size; ++y) {
|
||||||
int all_x;
|
int all_x;
|
||||||
int all_y = tile_y_offset + y;
|
int all_y = tile_y_offset + y;
|
||||||
@ -732,6 +733,7 @@ void VP8LResidualImage(int width, int height, int bits, int low_effort,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void VP8LSubtractGreenFromBlueAndRed_C(uint32_t* argb_data, int num_pixels) {
|
void VP8LSubtractGreenFromBlueAndRed_C(uint32_t* argb_data, int num_pixels) {
|
||||||
|
Loading…
Reference in New Issue
Block a user