diff options
author | Niklas Haas <git@haasn.dev> | 2024-10-04 16:44:19 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.dev> | 2024-10-07 19:51:34 +0200 |
commit | 61369484f62e21999116e9b806d0eb4a7cc6a7b4 (patch) | |
tree | 05de4a3f2cf8248cf9f0c0aa17b38bf0323571f6 | |
parent | aee19ee431bf8a841cadd8154878ca59ef7d0769 (diff) | |
download | ffmpeg-61369484f62e21999116e9b806d0eb4a7cc6a7b4.tar.gz |
swscale/internal: expose ff_update_palette() internally
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
-rw-r--r-- | libswscale/swscale.c | 4 | ||||
-rw-r--r-- | libswscale/swscale_internal.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 8b6a3a84b4..ad0cde6ad8 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -748,7 +748,7 @@ static void rgb48Toxyz12(struct SwsContext *c, uint16_t *dst, } } -static void update_palette(SwsContext *c, const uint32_t *pal) +void ff_update_palette(SwsContext *c, const uint32_t *pal) { for (int i = 0; i < 256; i++) { int r, g, b, y, u, v, a = 0xff; @@ -946,7 +946,7 @@ static int scale_internal(SwsContext *c, memset(c->dither_error[i], 0, sizeof(c->dither_error[0][0]) * (c->dstW+2)); if (usePal(c->srcFormat)) - update_palette(c, (const uint32_t *)srcSlice[1]); + ff_update_palette(c, (const uint32_t *)srcSlice[1]); memcpy(src2, srcSlice, sizeof(src2)); memcpy(dst2, dstSlice, sizeof(dst2)); diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 57e7515582..66d0664721 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -694,6 +694,8 @@ void ff_yuv2rgb_init_tables_ppc(SwsContext *c, const int inv_table[4], void ff_updateMMXDitherTables(SwsContext *c, int dstY); +void ff_update_palette(SwsContext *c, const uint32_t *pal); + av_cold void ff_sws_init_range_convert(SwsContext *c); av_cold void ff_sws_init_range_convert_aarch64(SwsContext *c); av_cold void ff_sws_init_range_convert_loongarch(SwsContext *c); |