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