[vlc-commits] [Git][videolan/vlc][master] 2 commits: freetype: set the palette alpha in one call
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Jul 22 13:55:37 UTC 2023
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
72530613 by Steve Lhomme at 2023-07-22T13:37:36+00:00
freetype: set the palette alpha in one call
- - - - -
0630c0bf by Steve Lhomme at 2023-07-22T13:37:36+00:00
spudec: fix detection of preexisting palette value
Introduced in 7f316163a656e49ec175ce7baaa426dc46573cf0
- - - - -
2 changed files:
- modules/codec/spudec/parse.c
- modules/text_renderer/freetype/freetype.c
Changes:
=====================================
modules/codec/spudec/parse.c
=====================================
@@ -149,9 +149,9 @@ static void ParsePXCTLI( decoder_t *p_dec, const subpicture_data_t *p_spu_data,
int i_index = VIDEO_PALETTE_COLORS_MAX;
for( int k = p_palette->i_entries; k > 0; k-- )
{
- if( !memcmp( &p_palette->palette[k], yuvaentry, sizeof(uint8_t [4]) ) )
+ if( !memcmp( p_palette->palette[k], yuvaentry, sizeof(uint8_t [4]) ) )
{
- i_index = VIDEO_PALETTE_COLORS_MAX;
+ i_index = i;
break;
}
}
=====================================
modules/text_renderer/freetype/freetype.c
=====================================
@@ -394,18 +394,14 @@ static int RenderYUVP( filter_t *p_filter, subpicture_region_t *p_region,
fmt.p_palette->palette[i][0] = 0;
fmt.p_palette->palette[i][1] = 0x80;
fmt.p_palette->palette[i][2] = 0x80;
- fmt.p_palette->palette[i][3] = pi_gamma[i];
- fmt.p_palette->palette[i][3] =
- (int)fmt.p_palette->palette[i][3] * i_alpha / 255;
+ fmt.p_palette->palette[i][3] = (int)pi_gamma[i] * i_alpha / 255;
}
for( i = 8; i < fmt.p_palette->i_entries; i++ )
{
fmt.p_palette->palette[i][0] = i * 16 * i_y / 256;
fmt.p_palette->palette[i][1] = i_u;
fmt.p_palette->palette[i][2] = i_v;
- fmt.p_palette->palette[i][3] = pi_gamma[i];
- fmt.p_palette->palette[i][3] =
- (int)fmt.p_palette->palette[i][3] * i_alpha / 255;
+ fmt.p_palette->palette[i][3] = (int)pi_gamma[i] * i_alpha / 255;
}
p_dst = p_region->p_picture->Y_PIXELS;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/47b89d9892d9d43daf65deed7c8fd9353e175c7d...0630c0bfa38eac16531de54cd6079eb1ec6760ff
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/47b89d9892d9d43daf65deed7c8fd9353e175c7d...0630c0bfa38eac16531de54cd6079eb1ec6760ff
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list