aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/rgb2rgb.c
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2010-06-01 19:35:16 +0000
committerReinhard Tartler <siretart@tauware.de>2010-06-01 19:35:16 +0000
commit2b991422f8fd6865bd5d0069a3f91827a4e6016e (patch)
tree3d9ebeffbe27eaaaf2c5c630646bddd5914ad86a /libswscale/rgb2rgb.c
parent73404a44c1aa647c48bb8d91e1ed51824e8f3376 (diff)
downloadffmpeg-2b991422f8fd6865bd5d0069a3f91827a4e6016e.tar.gz
deprecate palette8topacked32 in favor of public API functions sws_convertPalette8ToPacked32 and -24
additionallym deprecate palette8torgb16 and its bgr variant without replacement. These functions are not meant to be used by applications. Discussed at: http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/109340 Originally committed as revision 31301 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/rgb2rgb.c')
-rw-r--r--libswscale/rgb2rgb.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c
index 9080ead463..983944de22 100644
--- a/libswscale/rgb2rgb.c
+++ b/libswscale/rgb2rgb.c
@@ -207,31 +207,15 @@ void sws_rgb2rgb_init(int flags)
rgb2rgb_init_C();
}
-/**
- * Convert the palette to the same packet 32-bit format as the palette
- */
+#if LIBSWSCALE_VERSION_MAJOR < 1
void palette8topacked32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
{
- long i;
-
- for (i=0; i<num_pixels; i++)
- ((uint32_t *) dst)[i] = ((const uint32_t *) palette)[src[i]];
+ sws_convertPalette8ToPacked32(src, dst, num_pixels, palette);
}
-/**
- * Palette format: ABCD -> dst format: ABC
- */
void palette8topacked24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
{
- long i;
-
- for (i=0; i<num_pixels; i++) {
- //FIXME slow?
- dst[0]= palette[src[i]*4+0];
- dst[1]= palette[src[i]*4+1];
- dst[2]= palette[src[i]*4+2];
- dst+= 3;
- }
+ sws_convertPalette8ToPacked24(src, dst, num_pixels, palette);
}
/**
@@ -249,6 +233,7 @@ void palette8tobgr16(const uint8_t *src, uint8_t *dst, long num_pixels, const ui
for (i=0; i<num_pixels; i++)
((uint16_t *)dst)[i] = bswap_16(((const uint16_t *)palette)[src[i]]);
}
+#endif
void rgb32to24(const uint8_t *src, uint8_t *dst, long src_size)
{