Commit 6b5e5fb4 authored by Rémi Denis-Courmont's avatar 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: default avatarAntoine Cellerier <dionoea@videolan.org>
parent 11fe3be4
......@@ -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 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment