mirror of
https://github.com/mpv-player/mpv
synced 2025-01-14 02:51:26 +00:00
remove palette8torgb15 and palette8tobgr15
They contain exactly the same code as their 16bit variants, so this is effectively code de-duplication. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31298 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e629ec20bc
commit
88c4cbb3f9
@ -114,11 +114,6 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
|
||||
// no stride conversion needed
|
||||
switch(IMGFMT_RGB_DEPTH(dmpi->imgfmt)){
|
||||
case 15:
|
||||
if (IMGFMT_IS_BGR(dmpi->imgfmt))
|
||||
palette8tobgr15(mpi->planes[0],dmpi->planes[0],mpi->h*mpi->w,mpi->planes[1]);
|
||||
else
|
||||
palette8torgb15(mpi->planes[0],dmpi->planes[0],mpi->h*mpi->w,mpi->planes[1]);
|
||||
break;
|
||||
case 16:
|
||||
if (IMGFMT_IS_BGR(dmpi->imgfmt))
|
||||
palette8tobgr16(mpi->planes[0],dmpi->planes[0],mpi->h*mpi->w,mpi->planes[1]);
|
||||
@ -145,11 +140,6 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
|
||||
unsigned char* dst=dmpi->planes[0]+y*dmpi->stride[0];
|
||||
switch(IMGFMT_RGB_DEPTH(dmpi->imgfmt)){
|
||||
case 15:
|
||||
if (IMGFMT_IS_BGR(dmpi->imgfmt))
|
||||
palette8tobgr15(src,dst,mpi->w,mpi->planes[1]);
|
||||
else
|
||||
palette8torgb15(src,dst,mpi->w,mpi->planes[1]);
|
||||
break;
|
||||
case 16:
|
||||
if (IMGFMT_IS_BGR(dmpi->imgfmt))
|
||||
palette8tobgr16(src,dst,mpi->w,mpi->planes[1]);
|
||||
|
@ -250,22 +250,6 @@ void palette8tobgr16(const uint8_t *src, uint8_t *dst, long num_pixels, const ui
|
||||
((uint16_t *)dst)[i] = bswap_16(((const uint16_t *)palette)[src[i]]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Palette is assumed to contain BGR15, see rgb32to15 to convert the palette.
|
||||
*/
|
||||
void palette8torgb15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
|
||||
{
|
||||
long i;
|
||||
for (i=0; i<num_pixels; i++)
|
||||
((uint16_t *)dst)[i] = ((const uint16_t *)palette)[src[i]];
|
||||
}
|
||||
void palette8tobgr15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
|
||||
{
|
||||
long i;
|
||||
for (i=0; i<num_pixels; i++)
|
||||
((uint16_t *)dst)[i] = bswap_16(((const uint16_t *)palette)[src[i]]);
|
||||
}
|
||||
|
||||
void rgb32to24(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
{
|
||||
long i;
|
||||
|
@ -70,8 +70,6 @@ void palette8topacked32(const uint8_t *src, uint8_t *dst, long num_pixels, const
|
||||
void palette8topacked24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
|
||||
void palette8torgb16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
|
||||
void palette8tobgr16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
|
||||
void palette8torgb15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
|
||||
void palette8tobgr15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
|
||||
|
||||
/**
|
||||
* Height should be a multiple of 2 and width should be a multiple of 16.
|
||||
|
Loading…
Reference in New Issue
Block a user