xine-lib: xine-lib-1.2.13/src/xine-engine/spu.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Functions
spu.c File Reference
`#include <xine/configfile.h>`
`#include <xine/xine_internal.h>`
`#include <xine/spu.h>`
`#include <xine.h>`
`#include "xine_private.h"`

## Data Structures
union | clut_union_t

## Macros
#define | BLACK_OPACITY 67
#define | COLOUR_OPACITY 100

## Functions
static void | _spu_dvbsub_make_tab (xine_private_t *xine)
static void | _spu_dvbsub_set_black (void *data, xine_cfg_entry_t *entry)
static void | _spu_dvbsub_set_color (void *data, xine_cfg_entry_t *entry)
void | _x_spu_misc_init (xine_t *this)
void | _x_spu_get_opacity (xine_t *this, xine_spu_opacity_t *opacity)
int | _x_spu_calculate_opacity (const clut_t *clut, uint8_t trans, const xine_spu_opacity_t *opacity)
void | _x_spu_dvb_opacity (xine_t *this, uint8_t *opacity, const clut_t *clut, int *gen, uint32_t n)
| (re)calculate DVB subtitle opacity table if needed.

## Macro Definition Documentation

## ◆ BLACK_OPACITY

#define BLACK_OPACITY 67

Referenced by _spu_dvbsub_make_tab(), and _x_spu_misc_init().

## ◆ COLOUR_OPACITY

#define COLOUR_OPACITY 100

Referenced by _spu_dvbsub_make_tab(), and _x_spu_misc_init().

## Function Documentation

## ◆ _spu_dvbsub_make_tab()

static void _spu_dvbsub_make_tab | ( | xine_private_t * | xine | ) |
| static

References xine_private_t::black, BLACK_OPACITY, xine_private_t::color, COLOUR_OPACITY, xine_private_t::dvbsub, xine_private_t::gen, and xine_private_t::tab.

Referenced by _spu_dvbsub_set_black(), _spu_dvbsub_set_color(), and _x_spu_misc_init().

## ◆ _spu_dvbsub_set_black()

static void _spu_dvbsub_set_black | ( | void * | data,
|  | xine_cfg_entry_t * | entry )
| static

References _spu_dvbsub_make_tab(), xine_private_t::black, xine_private_t::dvbsub, and xine_cfg_entry_s::num_value.

Referenced by _x_spu_misc_init().

## ◆ _spu_dvbsub_set_color()

static void _spu_dvbsub_set_color | ( | void * | data,
|  | xine_cfg_entry_t * | entry )
| static

References _spu_dvbsub_make_tab(), xine_private_t::color, xine_private_t::dvbsub, and xine_cfg_entry_s::num_value.

Referenced by _x_spu_misc_init().

## ◆ _x_spu_calculate_opacity()

int _x_spu_calculate_opacity | ( | const clut_t * | clut,
|  | uint8_t | trans,
|  | const xine_spu_opacity_t * | opacity )

References xine_spu_opacity_s::black, clut_s::cb, xine_spu_opacity_s::colour, clut_s::cr, and clut_s::y.

## ◆ _x_spu_dvb_opacity()

void _x_spu_dvb_opacity | ( | xine_t * | xine,
|  | uint8_t * | opacity,
|  | const clut_t * | clut,
|  | int * | gen,
|  | uint32_t | n )

(re)calculate DVB subtitle opacity table if needed.

Parameters

  xine | pointer to the xine instance.
  opacity | pointer to an array of 0...15 opacity values to fill in for each color.
  clut | pointer to an array of colors, with .foo set to 0...255 transparency value.
  gen | pointer to an int that you set to 0 initially, and when colors have changed.
  n | count of colors.

References clut_union_t::c, xine_private_t::dvbsub, xine_private_t::gen, xine_private_t::tab, v, and clut_s::y.

Referenced by recalculate_trans().

## ◆ _x_spu_get_opacity()

void _x_spu_get_opacity | ( | xine_t * | this,
|  | xine_spu_opacity_t * | opacity )

References xine_private_t::black, xine_spu_opacity_s::black, xine_private_t::color, xine_spu_opacity_s::colour, and xine_private_t::dvbsub.

## ◆ _x_spu_misc_init()

void _x_spu_misc_init | ( | xine_t * | this | ) |

References _, _spu_dvbsub_make_tab(), _spu_dvbsub_set_black(), _spu_dvbsub_set_color(), xine_private_t::black, BLACK_OPACITY, xine_private_t::color, COLOUR_OPACITY, xine_s::config, xine_private_t::dvbsub, xine_private_t::gen, NULL, config_values_s::register_range, and xine_private_t::x.

Referenced by xine_stream_new().