mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
align buffer for double too
sometimes, gcc insert sse2 storeu instructions (like in VP8InitFilter()) with aligment requirements. Bug was visible 'sometimes' in non-debug mode, when trying to use -af. Change-Id: If3ec282bbbb9f9d0d33ca4b2c4bed46cd26fe495
This commit is contained in:
parent
842c009b38
commit
e9273902f1
@ -155,7 +155,8 @@ static VP8Encoder* InitEncoder(const WebPConfig* const config,
|
|||||||
16 + 16 + 16 + 8 + 1 + // left y/u/v
|
16 + 16 + 16 + 8 + 1 + // left y/u/v
|
||||||
2 * ALIGN_CST) // align all
|
2 * ALIGN_CST) // align all
|
||||||
* sizeof(uint8_t);
|
* sizeof(uint8_t);
|
||||||
const size_t lf_stats_size = config->autofilter ? sizeof(LFStats) : 0;
|
const size_t lf_stats_size =
|
||||||
|
config->autofilter ? sizeof(LFStats) + ALIGN_CST : 0;
|
||||||
VP8Encoder* enc;
|
VP8Encoder* enc;
|
||||||
uint8_t* mem;
|
uint8_t* mem;
|
||||||
size_t size = sizeof(VP8Encoder) + ALIGN_CST // main struct
|
size_t size = sizeof(VP8Encoder) + ALIGN_CST // main struct
|
||||||
@ -215,7 +216,7 @@ static VP8Encoder* InitEncoder(const WebPConfig* const config,
|
|||||||
mem += preds_w * preds_h * sizeof(uint8_t);
|
mem += preds_w * preds_h * sizeof(uint8_t);
|
||||||
enc->nz_ = 1 + (uint32_t*)mem;
|
enc->nz_ = 1 + (uint32_t*)mem;
|
||||||
mem += nz_size;
|
mem += nz_size;
|
||||||
enc->lf_stats_ = lf_stats_size ? (LFStats*)mem : NULL;
|
enc->lf_stats_ = lf_stats_size ? (LFStats*)DO_ALIGN(mem) : NULL;
|
||||||
mem += lf_stats_size;
|
mem += lf_stats_size;
|
||||||
|
|
||||||
// top samples (all 16-aligned)
|
// top samples (all 16-aligned)
|
||||||
|
Loading…
Reference in New Issue
Block a user