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,6 +275,12 @@ 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)) {
|
else if(LV_COLOR_FORMAT_IS_ALPHA_ONLY(cf)) {
|
||||||
|
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*/
|
/*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);
|
decoder_data_t * decoder_data = get_decoder_data(dsc);
|
||||||
if(decoder_data == NULL) {
|
if(decoder_data == NULL) {
|
||||||
@ -283,6 +289,7 @@ lv_result_t lv_bin_decoder_open(lv_image_decoder_t * decoder, lv_image_decoder_d
|
|||||||
|
|
||||||
res = decode_alpha_only(decoder, dsc);
|
res = decode_alpha_only(decoder, dsc);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
/*In case of uncompressed formats the image stored in the ROM/RAM.
|
/*In case of uncompressed formats the image stored in the ROM/RAM.
|
||||||
*So simply give its pointer*/
|
*So simply give its pointer*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user