Browse Source

textst: document the palette colors are in limited range

As found in 9.14.4.2.2.1.1 Semantic definition of fields in PDS
of the Blu-ray specs.
pull/180/head
Steve Lhomme 11 months ago
parent
commit
888438ee92
  1. 2
      modules/codec/textst.c

2
modules/codec/textst.c

@ -182,7 +182,7 @@ static size_t textst_Decode_palette(decoder_t *p_dec, const uint8_t *p_data, siz
i_size = i_data = __MIN(i_data, i_size);
while (i_data > 4)
{
p_sys->palette[p_data[0]] = /* YCrCbT to ARGB */
p_sys->palette[p_data[0]] = /* YCrCbT limited range to ARGB full range */
( (uint32_t)((float)p_data[1] +1.402f * (p_data[2]-128)) << 16 ) |
( (uint32_t)((float)p_data[1] -0.34414 * (p_data[3]-128) -0.71414 * (p_data[2]-128)) << 8 ) |
( (uint32_t)((float)p_data[1] +1.722 * (p_data[3]-128)) ) |

Loading…
Cancel
Save