mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
perf(bin_decoder): improve the decoding performance of a8 (#7494)
This commit is contained in:
parent
0223869773
commit
517b307ae3
@ -275,13 +275,20 @@ lv_result_t lv_bin_decoder_open(lv_image_decoder_t * decoder, lv_image_decoder_d
|
||||
}
|
||||
}
|
||||
else if(LV_COLOR_FORMAT_IS_ALPHA_ONLY(cf)) {
|
||||
/*Alpha only image will need decoder data to store pointer to decoded image, to free it when decoder closes*/
|
||||
decoder_data_t * decoder_data = get_decoder_data(dsc);
|
||||
if(decoder_data == NULL) {
|
||||
return LV_RESULT_INVALID;
|
||||
if(cf == LV_COLOR_FORMAT_A8) {
|
||||
res = LV_RESULT_OK;
|
||||
use_directly = true;
|
||||
dsc->decoded = (lv_draw_buf_t *)image;
|
||||
}
|
||||
else {
|
||||
/*Alpha only image will need decoder data to store pointer to decoded image, to free it when decoder closes*/
|
||||
decoder_data_t * decoder_data = get_decoder_data(dsc);
|
||||
if(decoder_data == NULL) {
|
||||
return LV_RESULT_INVALID;
|
||||
}
|
||||
|
||||
res = decode_alpha_only(decoder, dsc);
|
||||
res = decode_alpha_only(decoder, dsc);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/*In case of uncompressed formats the image stored in the ROM/RAM.
|
||||
|
Loading…
x
Reference in New Issue
Block a user