[vlc-devel] commit: Fix SPU alpha channel palette values ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Jan 9 11:14:34 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jan 7 21:04:11 2010 +0200| [6b5e5fb434db2982b2bfd461501a7df65feb860f] | committer: Rémi Denis-Courmont
Fix SPU alpha channel palette values
To convert from 4-bits to 8-bits channel, one should multiply by 17.
Acked-by: Antoine Cellerier <dionoea at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6b5e5fb434db2982b2bfd461501a7df65feb860f
---
modules/codec/spudec/parse.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/modules/codec/spudec/parse.c b/modules/codec/spudec/parse.c
index 3b23650..5c2bc30 100644
--- a/modules/codec/spudec/parse.c
+++ b/modules/codec/spudec/parse.c
@@ -701,9 +701,7 @@ static void Render( decoder_t *p_dec, subpicture_t *p_spu,
fmt.p_palette->palette[i_x][0] = p_spu_data->pi_yuv[i_x][0];
fmt.p_palette->palette[i_x][1] = p_spu_data->pi_yuv[i_x][1];
fmt.p_palette->palette[i_x][2] = p_spu_data->pi_yuv[i_x][2];
- fmt.p_palette->palette[i_x][3] =
- p_spu_data->pi_alpha[i_x] == 0xf ? 0xff :
- p_spu_data->pi_alpha[i_x] << 4;
+ fmt.p_palette->palette[i_x][3] = p_spu_data->pi_alpha[i_x] * 0x11;
}
p_spu->p_region = subpicture_region_New( &fmt );
More information about the vlc-devel
mailing list