Home | History | Annotate | Download | only in video

Lines Matching refs:bpp

37 SDL_PixelFormat *SDL_AllocFormat(int bpp,
53 format->BitsPerPixel = bpp;
54 format->BytesPerPixel = (bpp+7)/8;
93 } else if ( bpp > 8 ) { /* Packed pixels with standard mask */
95 if ( bpp > 24 )
96 bpp = 24;
97 format->Rloss = 8-(bpp/3);
98 format->Gloss = 8-(bpp/3)-(bpp%3);
99 format->Bloss = 8-(bpp/3);
100 format->Rshift = ((bpp/3)+(bpp%3))+(bpp/3);
101 format->Gshift = (bpp/3);
121 if ( bpp <= 8 ) { /* Palettized mode */
122 int ncolors = 1<<bpp;
124 fprintf(stderr,"bpp=%d ncolors=%d\n",bpp,ncolors);
224 SDL_PixelFormat *SDL_ReallocFormat(SDL_Surface *surface, int bpp,
231 surface->format = SDL_AllocFormat(bpp, Rmask, Gmask, Bmask, Amask);
266 void SDL_DitherColors(SDL_Color *colors, int bpp)
269 if(bpp != 8)
270 return; /* only 8bpp supported right now */
468 int bpp;
472 bpp = ((dst->BytesPerPixel == 3) ? 4 : dst->BytesPerPixel);
473 map = (Uint8 *)SDL_malloc(pal->ncolors*bpp);
482 ASSEMBLE_RGBA(&map[i*bpp], dst->BytesPerPixel, dst,