dvbsub.c File Reference

Include dependency graph for dvbsub.c:


Data Structures

struct  dvbsub_objectdef_s
struct  dvbsub_color_t
struct  dvbsub_display_s
struct  dvbsub_clut_s
struct  dvbsub_region_s
struct  dvbsub_regiondef_s
struct  dvbsub_page_t
struct  decoder_sys_t
struct  encoder_region_t
struct  encoder_sys_t

Defines

#define POSX_TEXT   N_("Decoding X coordinate")
#define POSX_LONGTEXT   N_("X coordinate of the rendered subtitle")
#define POSY_TEXT   N_("Decoding Y coordinate")
#define POSY_LONGTEXT   N_("Y coordinate of the rendered subtitle")
#define POS_TEXT   N_("Subpicture position")
#define POS_LONGTEXT
#define ENC_POSX_TEXT   N_("Encoding X coordinate")
#define ENC_POSX_LONGTEXT   N_("X coordinate of the encoded subtitle" )
#define ENC_POSY_TEXT   N_("Encoding Y coordinate")
#define ENC_POSY_LONGTEXT   N_("Y coordinate of the encoded subtitle" )
#define DVBSUB_CFG_PREFIX   "dvbsub-"
#define ENC_CFG_PREFIX   "sout-dvbsub-"
#define DVBSUB_ST_PAGE_COMPOSITION   0x10
#define DVBSUB_ST_REGION_COMPOSITION   0x11
#define DVBSUB_ST_CLUT_DEFINITION   0x12
#define DVBSUB_ST_OBJECT_DATA   0x13
#define DVBSUB_ST_DISPLAY_DEFINITION   0x14
#define DVBSUB_ST_ENDOFDISPLAY   0x80
#define DVBSUB_ST_STUFFING   0xff
#define DVBSUB_OT_BASIC_BITMAP   0x00
#define DVBSUB_OT_BASIC_CHAR   0x01
#define DVBSUB_OT_COMPOSITE_STRING   0x02
#define DVBSUB_DT_2BP_CODE_STRING   0x10
#define DVBSUB_DT_4BP_CODE_STRING   0x11
#define DVBSUB_DT_8BP_CODE_STRING   0x12
#define DVBSUB_DT_24_TABLE_DATA   0x20
#define DVBSUB_DT_28_TABLE_DATA   0x21
#define DVBSUB_DT_48_TABLE_DATA   0x22
#define DVBSUB_DT_END_LINE   0xf0
#define DVBSUB_PCS_STATE_ACQUISITION   0x01
#define DVBSUB_PCS_STATE_CHANGE   0x02
#define RGB_TO_Y(r, g, b)   ((int16_t) 77 * r + 150 * g + 29 * b) / 256;
#define RGB_TO_U(r, g, b)   ((int16_t) -44 * r - 87 * g + 131 * b) / 256;
#define RGB_TO_V(r, g, b)   ((int16_t) 131 * r - 110 * g - 21 * b) / 256;

Typedefs

typedef struct dvbsub_objectdef_s dvbsub_objectdef_t
typedef struct dvbsub_display_s dvbsub_display_t
typedef struct dvbsub_clut_s dvbsub_clut_t
typedef struct dvbsub_region_s dvbsub_region_t
typedef struct dvbsub_regiondef_s dvbsub_regiondef_t

Functions

static int Open (vlc_object_t *)
 Probes and initializes.
static void Close (vlc_object_t *)
 Releases resources.
static subpicture_tDecode (decoder_t *, block_t **)
static int OpenEncoder (vlc_object_t *)
static void CloseEncoder (vlc_object_t *)
static block_tEncode (encoder_t *, subpicture_t *)
int vlc_entry__main (module_t *p_module)
const char * vlc_entry_license__main (void)
static void decode_segment (decoder_t *, bs_t *)
static void decode_page_composition (decoder_t *, bs_t *)
static void decode_region_composition (decoder_t *, bs_t *)
static void decode_object (decoder_t *, bs_t *)
static void decode_display_definition (decoder_t *, bs_t *)
static void decode_clut (decoder_t *, bs_t *)
static void free_all (decoder_t *)
static void default_clut_init (decoder_t *)
static void default_dds_init (decoder_t *)
static subpicture_trender (decoder_t *)
static void dvbsub_render_pdata (decoder_t *, dvbsub_region_t *, int, int, uint8_t *, int)
static void dvbsub_pdata2bpp (bs_t *, uint8_t *, int, int *)
static void dvbsub_pdata4bpp (bs_t *, uint8_t *, int, int *)
static void dvbsub_pdata8bpp (bs_t *, uint8_t *, int, int *)
static void encode_page_composition (encoder_t *, bs_t *, subpicture_t *)
static void encode_clut (encoder_t *, bs_t *, subpicture_t *)
static void encode_region_composition (encoder_t *, bs_t *, subpicture_t *)
static void encode_object (encoder_t *, bs_t *, subpicture_t *)
static subpicture_tYuvaYuvp (subpicture_t *p_subpic)
static void encode_pixel_data (encoder_t *p_enc, bs_t *s, subpicture_region_t *p_region, bool b_top)
static void encode_pixel_line_2bp (bs_t *s, subpicture_region_t *p_region, int i_line)
static void encode_pixel_line_4bp (bs_t *s, subpicture_region_t *p_region, int i_line)
static void encode_pixel_line_8bp (bs_t *s, subpicture_region_t *p_region, int i_line)

Variables

static const int pi_pos_values [] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }
static const char *const ppsz_pos_descriptions []
static const char *const ppsz_enc_options [] = { "x", "y", NULL }

Define Documentation

#define DVBSUB_CFG_PREFIX   "dvbsub-"

#define DVBSUB_DT_24_TABLE_DATA   0x20

#define DVBSUB_DT_28_TABLE_DATA   0x21

#define DVBSUB_DT_2BP_CODE_STRING   0x10

#define DVBSUB_DT_48_TABLE_DATA   0x22

#define DVBSUB_DT_4BP_CODE_STRING   0x11

#define DVBSUB_DT_8BP_CODE_STRING   0x12

#define DVBSUB_DT_END_LINE   0xf0

#define DVBSUB_OT_BASIC_BITMAP   0x00

#define DVBSUB_OT_BASIC_CHAR   0x01

#define DVBSUB_OT_COMPOSITE_STRING   0x02

#define DVBSUB_PCS_STATE_ACQUISITION   0x01

#define DVBSUB_PCS_STATE_CHANGE   0x02

#define DVBSUB_ST_CLUT_DEFINITION   0x12

Referenced by decode_segment(), and encode_clut().

#define DVBSUB_ST_DISPLAY_DEFINITION   0x14

Referenced by decode_segment().

#define DVBSUB_ST_ENDOFDISPLAY   0x80

Referenced by decode_segment(), and Encode().

#define DVBSUB_ST_OBJECT_DATA   0x13

Referenced by decode_segment(), and encode_object().

#define DVBSUB_ST_PAGE_COMPOSITION   0x10

#define DVBSUB_ST_REGION_COMPOSITION   0x11

#define DVBSUB_ST_STUFFING   0xff

Referenced by decode_segment().

#define ENC_CFG_PREFIX   "sout-dvbsub-"

#define ENC_POSX_LONGTEXT   N_("X coordinate of the encoded subtitle" )

#define ENC_POSX_TEXT   N_("Encoding X coordinate")

#define ENC_POSY_LONGTEXT   N_("Y coordinate of the encoded subtitle" )

#define ENC_POSY_TEXT   N_("Encoding Y coordinate")

#define POS_LONGTEXT

Value:

N_( \
  "You can enforce the subpicture position on the video " \
  "(0=center, 1=left, 2=right, 4=top, 8=bottom, you can " \
  "also use combinations of these values, e.g. 6=top-right).")

#define POS_TEXT   N_("Subpicture position")

#define POSX_LONGTEXT   N_("X coordinate of the rendered subtitle")

#define POSX_TEXT   N_("Decoding X coordinate")

#define POSY_LONGTEXT   N_("Y coordinate of the rendered subtitle")

#define POSY_TEXT   N_("Decoding Y coordinate")

#define RGB_TO_U ( r,
g,
b   )     ((int16_t) -44 * r - 87 * g + 131 * b) / 256;

Referenced by default_clut_init().

#define RGB_TO_V ( r,
g,
b   )     ((int16_t) 131 * r - 110 * g - 21 * b) / 256;

Referenced by default_clut_init().

#define RGB_TO_Y ( r,
g,
b   )     ((int16_t) 77 * r + 150 * g + 29 * b) / 256;

Referenced by default_clut_init().


Typedef Documentation

typedef struct dvbsub_clut_s dvbsub_clut_t


Function Documentation

static void Close ( vlc_object_t p_this  )  [static]

Releases resources.

Close the module.

Destroys the X11 window.

Disconnect from the X server.

Close a SDL video output.

It destroys an OpenGL vout display.

Terminate a vout display created by Open.

It destroyes a Direct3D vout display.

Terminate an output method created by Open.

Release the drawable.

Close a libcaca video output.

Close a aa video output method.

Close the filter.

Terminate a splitter module.

This function closes a clone video splitter module.

Common close function.

Releases allocate resources.

Close: Destructor.

Parameters:
p_this pointer to this filter object
p_this,: the filter object

static void CloseEncoder ( vlc_object_t p_this  )  [static]

static subpicture_t * Decode ( decoder_t p_dec,
block_t **  pp_block 
) [static]

static void decode_clut ( decoder_t p_dec,
bs_t s 
) [static]

static void decode_display_definition ( decoder_t p_dec,
bs_t s 
) [static]

static void decode_object ( decoder_t p_dec,
bs_t s 
) [static]

static void decode_page_composition ( decoder_t p_dec,
bs_t s 
) [static]

static void decode_region_composition ( decoder_t p_dec,
bs_t s 
) [static]

static void decode_segment ( decoder_t p_dec,
bs_t s 
) [static]

static void default_clut_init ( decoder_t p_dec  )  [static]

static void default_dds_init ( decoder_t p_dec  )  [static]

static void dvbsub_pdata2bpp ( bs_t s,
uint8_t *  p,
int  i_width,
int *  pi_off 
) [static]

References bs_align(), bs_eof(), bs_read(), and i_color.

Referenced by dvbsub_render_pdata().

static void dvbsub_pdata4bpp ( bs_t s,
uint8_t *  p,
int  i_width,
int *  pi_off 
) [static]

static void dvbsub_pdata8bpp ( bs_t s,
uint8_t *  p,
int  i_width,
int *  pi_off 
) [static]

static void dvbsub_render_pdata ( decoder_t p_dec,
dvbsub_region_t p_region,
int  i_x,
int  i_y,
uint8_t *  p_field,
int  i_field 
) [static]

static block_t * Encode ( encoder_t p_enc,
subpicture_t p_subpic 
) [static]

static void encode_clut ( encoder_t p_enc,
bs_t s,
subpicture_t p_subpic 
) [static]

static void encode_object ( encoder_t p_enc,
bs_t s,
subpicture_t p_subpic 
) [static]

static void encode_page_composition ( encoder_t p_enc,
bs_t s,
subpicture_t p_subpic 
) [static]

static void encode_pixel_data ( encoder_t p_enc,
bs_t s,
subpicture_region_t p_region,
bool  b_top 
) [static]

static void encode_pixel_line_2bp ( bs_t s,
subpicture_region_t p_region,
int  i_line 
) [static]

static void encode_pixel_line_4bp ( bs_t s,
subpicture_region_t p_region,
int  i_line 
) [static]

static void encode_pixel_line_8bp ( bs_t s,
subpicture_region_t p_region,
int  i_line 
) [static]

static void encode_region_composition ( encoder_t p_enc,
bs_t s,
subpicture_t p_subpic 
) [static]

static void free_all ( decoder_t p_dec  )  [static]

static int Open ( vlc_object_t p_this  )  [static]

Probes and initializes.

Basic chorus/flanger/delay audio filter This implements a variable delay filter for VLC.

Todo:

  • Improve CDDB support (non-blocking, cache, .

Open the module.

Create an X11 window.

Probe the X server.

This function initializes SDL vout method.

It creates an OpenGL vout display.

This function allocates and initialize the DirectX vout display.

It creates a Direct3D vout display.

This function allocates and initializes a FB vout method.

Find the drawable set by libvlc application.

This function initializes libcaca vout method.

This function allocates and initializes a aa vout method.

This function allocates and initializes a Wall splitter module.

Open the filter.

This function allocates and initializes a Clone splitter module.

Open: initialize and create stuff.

Connect to the sftp server and ask for a file.

Parameters:
p_this,: the vlc_object
Returns:
VLC_SUCCESS if everything was fine
Parameters:
p_this 
p_this,: the filter object
Returns:
VLC_SUCCESS or vlc error codes

Todo:
Reinstate meta codec name

static int OpenEncoder ( vlc_object_t p_this  )  [static]

static subpicture_t * render ( decoder_t p_dec  )  [static]

References decoder_sys_t::b_absolute, subpicture_t::b_absolute, subpicture_t::b_ephemer, subpicture_t::b_subtitle, dvbsub_display_s::b_windowed, dvbsub_clut_s::c_2b, dvbsub_clut_s::c_4b, dvbsub_clut_s::c_8b, dvbsub_color_t::Cb, dvbsub_color_t::Cr, decoder_NewSubpicture(), decoder_sys_t::display, i, subpicture_region_t::i_align, video_format_t::i_chroma, dvbsub_region_s::i_clut, dvbsub_region_s::i_depth, video_palette_t::i_entries, video_format_t::i_height, dvbsub_region_s::i_height, dvbsub_display_s::i_height, dvbsub_clut_s::i_id, dvbsub_region_s::i_id, dvbsub_regiondef_s::i_id, dvbsub_region_s::i_object_defs, subpicture_t::i_original_picture_height, subpicture_t::i_original_picture_width, decoder_sys_t::i_pts, dvbsub_page_t::i_region_defs, video_format_t::i_sar_den, video_format_t::i_sar_num, decoder_sys_t::i_spu_position, decoder_sys_t::i_spu_x, decoder_sys_t::i_spu_y, subpicture_t::i_start, dvbsub_page_t::i_timeout, dvbsub_objectdef_s::i_type, video_format_t::i_visible_height, video_format_t::i_visible_width, video_format_t::i_width, dvbsub_region_s::i_width, dvbsub_display_s::i_width, dvbsub_objectdef_s::i_x, subpicture_region_t::i_x, dvbsub_regiondef_s::i_x, dvbsub_display_s::i_x, video_format_t::i_x_offset, dvbsub_objectdef_s::i_y, subpicture_region_t::i_y, dvbsub_regiondef_s::i_y, dvbsub_display_s::i_y, video_format_t::i_y_offset, msg_Dbg, msg_Err, decoder_sys_t::p_cluts, p_dst, subpicture_region_t::p_next, dvbsub_clut_s::p_next, dvbsub_region_s::p_next, dvbsub_region_s::p_object_defs, decoder_sys_t::p_page, video_format_t::p_palette, subpicture_region_t::p_picture, dvbsub_region_s::p_pixbuf, subpicture_t::p_region, dvbsub_page_t::p_region_defs, decoder_sys_t::p_regions, decoder_t::p_sys, video_palette_t::palette, subpicture_region_t::psz_text, dvbsub_objectdef_s::psz_text, strdup(), subpicture_region_New(), dvbsub_color_t::T, VLC_CODEC_TEXT, VLC_CODEC_YUVP, and dvbsub_color_t::Y.

Referenced by Decode(), and ThreadDisplayPicture().

int vlc_entry__main ( module_t p_module  ) 

const char* vlc_entry_license__main ( void   ) 

static subpicture_t* YuvaYuvp ( subpicture_t p_subpic  )  [static]


Variable Documentation

const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 } [static]

const char* const ppsz_enc_options[] = { "x", "y", NULL } [static]

const char* const ppsz_pos_descriptions[] [static]

Initial value:

{ N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
  N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") }


Generated on Tue May 25 08:05:13 2010 for VLC by  doxygen 1.5.6