mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 15:32:43 +02:00
libeplayer3/writer/framebuffer: small optimization
Origin commit data
------------------
Branch: master
Commit: d0d31f9998
Author: martii <m4rtii@gmx.de>
Date: 2013-07-28 (Sun, 28 Jul 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -133,12 +133,13 @@ static int writeData(void* _call)
|
|||||||
uint32_t c = call->color >> 8;
|
uint32_t c = call->color >> 8;
|
||||||
uint32_t a = 255 - (call->color & 0xff);
|
uint32_t a = 255 - (call->color & 0xff);
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 256; i++)
|
for (i = 0; i < 256; i++) {
|
||||||
colortable[i] = c | (((a * i) >> 8) << 24);
|
uint32_t k = (a * i) >> 8;
|
||||||
|
colortable[i] = k ? (c | (k << 24)) : 0;
|
||||||
|
}
|
||||||
last_color = call->color;
|
last_color = call->color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fb_printf(100, "x %d\n", call->x);
|
fb_printf(100, "x %d\n", call->x);
|
||||||
fb_printf(100, "y %d\n", call->y);
|
fb_printf(100, "y %d\n", call->y);
|
||||||
fb_printf(100, "width %d\n", call->Width);
|
fb_printf(100, "width %d\n", call->Width);
|
||||||
@@ -152,7 +153,7 @@ static int writeData(void* _call)
|
|||||||
for (y=0;y<call->Height;y++) {
|
for (y=0;y<call->Height;y++) {
|
||||||
for (x = 0; x < call->Width; x++) {
|
for (x = 0; x < call->Width; x++) {
|
||||||
uint32_t c = colortable[src[x]];
|
uint32_t c = colortable[src[x]];
|
||||||
if (c >> 24)
|
if (c)
|
||||||
*dst++ = c;
|
*dst++ = c;
|
||||||
else
|
else
|
||||||
dst++;
|
dst++;
|
||||||
|
Reference in New Issue
Block a user