1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-29 22:00:58 +02:00

swscale/internal: expose ff_update_palette() internally

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
Niklas Haas 2024-10-04 16:44:19 +02:00
parent aee19ee431
commit 61369484f6
2 changed files with 4 additions and 2 deletions

View File

@ -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));

View File

@ -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);