xine-lib: xine-lib-1.2.12/src/video_dec/libmpeg2/header.c File Reference

xine-lib 1.2.12

Functions | Variables
header.c File Reference
`#include "config.h"`
`#include <stdio.h>`
`#include <inttypes.h>`
`#include "mpeg2_internal.h"`
`#include <xine/attributes.h>`

## Functions
static uint32_t | get_bits (uint8_t *buffer, uint32_t count, uint32_t *bit_position)
static int32_t | get_bits_signed (uint8_t *buffer, uint32_t count, uint32_t *bit_position)
void | mpeg2_header_state_init (picture_t *picture)
int | mpeg2_header_sequence (picture_t *picture, uint8_t *buffer)
static int | sequence_extension (picture_t *picture, uint8_t *buffer)
static int | quant_matrix_extension (picture_t *picture, uint8_t *buffer)
static int | picture_coding_extension (picture_t *picture, uint8_t *buffer)
static int | sequence_display_extension (picture_t *picture, uint8_t *buffer)
static int | picture_display_extension (picture_t *picture, uint8_t *buffer)
int | mpeg2_header_extension (picture_t *picture, uint8_t *buffer)
int | mpeg2_header_group_of_pictures (picture_t *picture, uint8_t *buffer)
int | mpeg2_header_picture (picture_t *picture, uint8_t *buffer)

## Variables
static const uint8_t | default_intra_quantizer_matrix [64]
uint8_t | mpeg2_scan_norm [64]
uint8_t | mpeg2_scan_alt [64]

## Function Documentation

## ◆ get_bits()

static uint32_t get_bits | ( | uint8_t * | buffer,
|  | uint32_t | count,
|  | uint32_t * | bit_position
| ) |  |
| static

Referenced by get_bits_signed(), mpeg2_header_group_of_pictures(), and sequence_display_extension().

## ◆ get_bits_signed()

static int32_t get_bits_signed | ( | uint8_t * | buffer,
|  | uint32_t | count,
|  | uint32_t * | bit_position
| ) |  |
| static

References get_bits().

Referenced by picture_display_extension().

## ◆ mpeg2_header_extension()

int mpeg2_header_extension | ( | picture_t * | picture,
|  | uint8_t * | buffer
| ) |  |

References picture_coding_extension(), picture_display_extension(), quant_matrix_extension(), sequence_display_extension(), and sequence_extension().

Referenced by mpeg2_find_sequence_header(), mpeg2_parse_header(), and parse_chunk().

## ◆ mpeg2_header_group_of_pictures()

int mpeg2_header_group_of_pictures | ( | picture_t * | picture,
|  | uint8_t * | buffer
| ) |  |

References get_bits().

Referenced by parse_chunk().

## ◆ mpeg2_header_picture()

int mpeg2_header_picture | ( | picture_t * | picture,
|  | uint8_t * | buffer
| ) |  |

References FRAME_PICTURE.

Referenced by mpeg2_parse_header(), and parse_chunk().

## ◆ mpeg2_header_sequence()

int mpeg2_header_sequence | ( | picture_t * | picture,
|  | uint8_t * | buffer
| ) |  |

References default_intra_quantizer_matrix, FRAME_PICTURE, height, mpeg2_scan_norm, and width.

Referenced by mpeg2_find_sequence_header(), mpeg2_parse_header(), and parse_chunk().

## ◆ mpeg2_header_state_init()

void mpeg2_header_state_init | ( | picture_t * | picture | ) |

References mpeg2_scan_norm.

Referenced by invalid_end_action(), mpeg2_close(), mpeg2_init(), mpeg2_reset(), and seek_sequence().

## ◆ picture_coding_extension()

static int picture_coding_extension | ( | picture_t * | picture,
|  | uint8_t * | buffer
| ) |  |
| static

References mpeg2_scan_alt, mpeg2_scan_norm, picture_t::progressive_frame, picture_t::repeat_first_field, and picture_t::top_field_first.

Referenced by mpeg2_header_extension().

## ◆ picture_display_extension()

static int picture_display_extension | ( | picture_t * | picture,
|  | uint8_t * | buffer
| ) |  |
| static

References get_bits_signed().

Referenced by mpeg2_header_extension().

## ◆ quant_matrix_extension()

static int quant_matrix_extension | ( | picture_t * | picture,
|  | uint8_t * | buffer
| ) |  |
| static

References mpeg2_scan_norm.

Referenced by mpeg2_header_extension().

## ◆ sequence_display_extension()

static int sequence_display_extension | ( | picture_t * | picture,
|  | uint8_t * | buffer
| ) |  |
| static

References get_bits().

Referenced by mpeg2_header_extension().

## ◆ sequence_extension()

static int sequence_extension | ( | picture_t * | picture,
|  | uint8_t * | buffer
| ) |  |
| static

Referenced by mpeg2_header_extension().

## Variable Documentation

## ◆ default_intra_quantizer_matrix

const uint8_t default_intra_quantizer_matrix[64]
| static

Initial value:
= {
8,
16, 16,
19, 16, 19,
22, 22, 22, 22,
22, 22, 26, 24, 26,
27, 27, 27, 26, 26, 26,
26, 27, 27, 27, 29, 29, 29,
34, 34, 34, 29, 29, 29, 27, 27,
29, 29, 32, 32, 34, 34, 37,
38, 37, 35, 35, 34, 35,
38, 38, 40, 40, 40,
48, 48, 46, 46,
56, 56, 58,
69, 69,
83
}

Referenced by mpeg2_header_sequence().

## ◆ mpeg2_scan_alt

uint8_t mpeg2_scan_alt[64]

Initial value:
=
{
0,8,16,24,1,9,2,10,17,25,32,40,48,56,57,49,
41,33,26,18,3,11,4,12,19,27,34,42,50,58,35,43,
51,59,20,28,5,13,6,14,21,29,36,44,52,60,37,45,
53,61,22,30,7,15,23,31,38,46,54,62,39,47,55,63
}

Referenced by mpeg2_idct_init(), mpeg2_init(), mpeg2_xxmc_slice(), picture_coding_ext(), picture_coding_extension(), and xvmc_setup_scan_ptable().

## ◆ mpeg2_scan_norm

uint8_t mpeg2_scan_norm[64]

Initial value:
=
{
0, 1, 8,16, 9, 2, 3,10,
17,24,32,25,18,11, 4, 5,
12,19,26,33,40,48,41,34,
27,20,13, 6, 7,14,21,28,
35,42,49,56,57,50,43,36,
29,22,15,23,30,37,44,51,
58,59,52,45,38,31,39,46,
53,60,61,54,47,55,62,63
}

Referenced by get_xvmc_intra_block_B14(), get_xvmc_intra_block_B15(), get_xvmc_mpeg1_intra_block(), get_xvmc_mpeg1_non_intra_block(), get_xvmc_non_intra_block(), mpeg2_header_picture(), mpeg2_header_sequence(), mpeg2_header_state_init(), mpeg2_idct_init(), mpeg2_init(), picture_coding_ext(), picture_coding_extension(), quant_matrix_ext(), quant_matrix_extension(), and xvmc_setup_scan_ptable().