Skip to content

Commit 6136948

Browse files
committed
swscale/internal: expose ff_update_palette() internally
Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <[email protected]>
1 parent aee19ee commit 6136948

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

libswscale/swscale.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ static void rgb48Toxyz12(struct SwsContext *c, uint16_t *dst,
748748
}
749749
}
750750

751-
static void update_palette(SwsContext *c, const uint32_t *pal)
751+
void ff_update_palette(SwsContext *c, const uint32_t *pal)
752752
{
753753
for (int i = 0; i < 256; i++) {
754754
int r, g, b, y, u, v, a = 0xff;
@@ -946,7 +946,7 @@ static int scale_internal(SwsContext *c,
946946
memset(c->dither_error[i], 0, sizeof(c->dither_error[0][0]) * (c->dstW+2));
947947

948948
if (usePal(c->srcFormat))
949-
update_palette(c, (const uint32_t *)srcSlice[1]);
949+
ff_update_palette(c, (const uint32_t *)srcSlice[1]);
950950

951951
memcpy(src2, srcSlice, sizeof(src2));
952952
memcpy(dst2, dstSlice, sizeof(dst2));

libswscale/swscale_internal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,8 @@ void ff_yuv2rgb_init_tables_ppc(SwsContext *c, const int inv_table[4],
694694

695695
void ff_updateMMXDitherTables(SwsContext *c, int dstY);
696696

697+
void ff_update_palette(SwsContext *c, const uint32_t *pal);
698+
697699
av_cold void ff_sws_init_range_convert(SwsContext *c);
698700
av_cold void ff_sws_init_range_convert_aarch64(SwsContext *c);
699701
av_cold void ff_sws_init_range_convert_loongarch(SwsContext *c);

0 commit comments

Comments
 (0)