Revision 3d9408f4

View differences:

libswscale/rgb2rgb.c
250 250
        ((uint16_t *)dst)[i] = bswap_16(((const uint16_t *)palette)[src[i]]);
251 251
}
252 252

  
253
/**
254
 * Palette is assumed to contain BGR15, see rgb32to15 to convert the palette.
255
 */
256
void palette8torgb15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
257
{
258
    long i;
259
    for (i=0; i<num_pixels; i++)
260
        ((uint16_t *)dst)[i] = ((const uint16_t *)palette)[src[i]];
261
}
262
void palette8tobgr15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
263
{
264
    long i;
265
    for (i=0; i<num_pixels; i++)
266
        ((uint16_t *)dst)[i] = bswap_16(((const uint16_t *)palette)[src[i]]);
267
}
268

  
269 253
void rgb32to24(const uint8_t *src, uint8_t *dst, long src_size)
270 254
{
271 255
    long i;
libswscale/rgb2rgb.h
70 70
void palette8topacked24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
71 71
void palette8torgb16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
72 72
void palette8tobgr16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
73
void palette8torgb15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
74
void palette8tobgr15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
75 73

  
76 74
/**
77 75
 * Height should be a multiple of 2 and width should be a multiple of 16.

Also available in: Unified diff