dvbsub: use the FB backbuffer on spark

Origin commit data
------------------
Branch: ni/coolstream
Commit: 40532a9d67
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-03-19 (Mon, 19 Mar 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2012-03-19 19:51:48 +01:00
parent baa6504ec5
commit 8e529bb8f1

View File

@@ -77,12 +77,16 @@ fb_pixel_t * simple_resize32(uint8_t * orgin, uint32_t * colors, int nb_colors,
fb_pixel_t *cr,*l; fb_pixel_t *cr,*l;
int i,j,k,ip; int i,j,k,ip;
#ifndef HAVE_SPARK_HARDWARE
cr = (fb_pixel_t *) malloc(dx*dy*sizeof(fb_pixel_t)); cr = (fb_pixel_t *) malloc(dx*dy*sizeof(fb_pixel_t));
if(cr == NULL) { if(cr == NULL) {
printf("Error: malloc\n"); printf("Error: malloc\n");
return NULL; return NULL;
} }
#else
cr = CFrameBuffer::getInstance()->getBackBufferPointer();
#endif
l = cr; l = cr;
for(j = 0; j < dy; j++, l += dx) for(j = 0; j < dy; j++, l += dx)
@@ -160,8 +164,8 @@ void cDvbSubtitleBitmaps::Draw(int &min_x, int &min_y, int &max_x, int &max_y)
for (int x2 = 0; x2 < nw; x2++) for (int x2 = 0; x2 < nw; x2++)
*(sublfb + xoff + x2 + y) = *ptr++; *(sublfb + xoff + x2 + y) = *ptr++;
} }
#endif
free(newdata); free(newdata);
#endif
if(min_x > xoff) if(min_x > xoff)
min_x = xoff; min_x = xoff;