xine-lib 1.2.11
Data Structures | Macros | Typedefs | Functions | Variables
vdpau_mpeg12.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <xine/xine_internal.h>
#include <xine/video_out.h>
#include <xine/buffer.h>
#include <xine/xineutils.h>
#include "accel_vdpau.h"
#include "bits_reader.h"
#include "group_vdpau.h"
#include <vdpau/vdpau.h>

Data Structures

struct  picture_t
 
struct  sequence_t
 
struct  vdpau_mpeg12_decoder_s
 

Macros

#define LOG_MODULE   "vdpau_mpeg12"
 
#define sequence_header_code   0xb3
 
#define sequence_error_code   0xb4
 
#define sequence_end_code   0xb7
 
#define group_start_code   0xb8
 
#define extension_start_code   0xb5
 
#define user_data_start_code   0xb2
 
#define picture_start_code   0x00
 
#define begin_slice_start_code   0x01
 
#define end_slice_start_code   0xaf
 
#define sequence_ext_sc   1
 
#define quant_matrix_ext_sc   3
 
#define picture_coding_ext_sc   8
 
#define sequence_display_ext_sc   2
 
#define I_FRAME   1
 
#define P_FRAME   2
 
#define B_FRAME   3
 
#define PICTURE_TOP   1
 
#define PICTURE_BOTTOM   2
 
#define PICTURE_FRAME   3
 

Typedefs

typedef struct vdpau_mpeg12_decoder_s vdpau_mpeg12_decoder_t
 

Functions

static void picture_ready (vdpau_mpeg12_decoder_t *vd, uint8_t end_of_sequence)
 
static void reset_picture (picture_t *pic)
 
static void init_picture (picture_t *pic)
 
static void reset_sequence (sequence_t *sequence, int free_refs)
 
static void free_sequence (sequence_t *sequence)
 
static void sequence_header (vdpau_mpeg12_decoder_t *this_gen, uint8_t *buf, int len)
 
static void process_sequence_mpeg12_dependent_data (vdpau_mpeg12_decoder_t *this_gen)
 
static void picture_header (vdpau_mpeg12_decoder_t *this_gen, uint8_t *buf, int len)
 
static void sequence_extension (sequence_t *sequence, uint8_t *buf, int len)
 
static void picture_coding_extension (sequence_t *sequence, uint8_t *buf, int len)
 
static void quant_matrix_extension (sequence_t *sequence, uint8_t *buf, int len)
 
static void copy_slice (sequence_t *sequence, uint8_t *buf, int len)
 
static int parse_code (vdpau_mpeg12_decoder_t *this_gen, uint8_t *buf, int len)
 
static void decode_render (vdpau_mpeg12_decoder_t *vd, vdpau_accel_t *accel)
 
static void decode_picture (vdpau_mpeg12_decoder_t *vd, uint8_t end_of_sequence)
 
static void vdpau_mpeg12_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
 
static void vdpau_mpeg12_flush (video_decoder_t *this_gen)
 
static void vdpau_mpeg12_reset (video_decoder_t *this_gen)
 
static void vdpau_mpeg12_discontinuity (video_decoder_t *this_gen)
 
static void vdpau_mpeg12_dispose (video_decoder_t *this_gen)
 
static video_decoder_topen_plugin (video_decoder_class_t *class_gen, xine_stream_t *stream)
 
void * mpeg12_init_plugin (xine_t *xine, const void *data)
 

Variables

static const uint8_t default_intra_quantizer_matrix [64]
 
uint8_t mpeg2_scan_norm [64]
 

Macro Definition Documentation

◆ B_FRAME

#define B_FRAME   3

◆ begin_slice_start_code

#define begin_slice_start_code   0x01

◆ end_slice_start_code

#define end_slice_start_code   0xaf

◆ extension_start_code

#define extension_start_code   0xb5

◆ group_start_code

#define group_start_code   0xb8

◆ I_FRAME

#define I_FRAME   1

◆ LOG_MODULE

#define LOG_MODULE   "vdpau_mpeg12"

◆ P_FRAME

#define P_FRAME   2

◆ PICTURE_BOTTOM

#define PICTURE_BOTTOM   2

◆ picture_coding_ext_sc

#define picture_coding_ext_sc   8

◆ PICTURE_FRAME

#define PICTURE_FRAME   3

◆ picture_start_code

#define picture_start_code   0x00

◆ PICTURE_TOP

#define PICTURE_TOP   1

◆ quant_matrix_ext_sc

#define quant_matrix_ext_sc   3

◆ sequence_display_ext_sc

#define sequence_display_ext_sc   2

◆ sequence_end_code

#define sequence_end_code   0xb7

◆ sequence_error_code

#define sequence_error_code   0xb4

◆ sequence_ext_sc

#define sequence_ext_sc   1

◆ sequence_header_code

#define sequence_header_code   0xb3

◆ user_data_start_code

#define user_data_start_code   0xb2

Typedef Documentation

◆ vdpau_mpeg12_decoder_t

Function Documentation

◆ copy_slice()

static void copy_slice ( sequence_t sequence,
uint8_t *  buf,
int  len 
)
static

◆ decode_picture()

static void decode_picture ( vdpau_mpeg12_decoder_t vd,
uint8_t  end_of_sequence 
)
static

◆ decode_render()

static void decode_render ( vdpau_mpeg12_decoder_t vd,
vdpau_accel_t accel 
)
static

◆ free_sequence()

static void free_sequence ( sequence_t sequence)
static

◆ init_picture()

static void init_picture ( picture_t pic)
static

◆ mpeg12_init_plugin()

void * mpeg12_init_plugin ( xine_t xine,
const void *  data 
)

◆ open_plugin()

static video_decoder_t * open_plugin ( video_decoder_class_t class_gen,
xine_stream_t stream 
)
static

◆ parse_code()

static int parse_code ( vdpau_mpeg12_decoder_t this_gen,
uint8_t *  buf,
int  len 
)
static

◆ picture_coding_extension()

static void picture_coding_extension ( sequence_t sequence,
uint8_t *  buf,
int  len 
)
static

◆ picture_header()

static void picture_header ( vdpau_mpeg12_decoder_t this_gen,
uint8_t *  buf,
int  len 
)
static

◆ picture_ready()

static void picture_ready ( vdpau_mpeg12_decoder_t vd,
uint8_t  end_of_sequence 
)
static

◆ process_sequence_mpeg12_dependent_data()

static void process_sequence_mpeg12_dependent_data ( vdpau_mpeg12_decoder_t this_gen)
static

◆ quant_matrix_extension()

static void quant_matrix_extension ( sequence_t sequence,
uint8_t *  buf,
int  len 
)
static

◆ reset_picture()

static void reset_picture ( picture_t pic)
static

◆ reset_sequence()

static void reset_sequence ( sequence_t sequence,
int  free_refs 
)
static

◆ sequence_extension()

static void sequence_extension ( sequence_t sequence,
uint8_t *  buf,
int  len 
)
static

◆ sequence_header()

static void sequence_header ( vdpau_mpeg12_decoder_t this_gen,
uint8_t *  buf,
int  len 
)
static

◆ vdpau_mpeg12_decode_data()

static void vdpau_mpeg12_decode_data ( video_decoder_t this_gen,
buf_element_t buf 
)
static

◆ vdpau_mpeg12_discontinuity()

static void vdpau_mpeg12_discontinuity ( video_decoder_t this_gen)
static

References lprintf, and reset_sequence().

Referenced by open_plugin().

◆ vdpau_mpeg12_dispose()

static void vdpau_mpeg12_dispose ( video_decoder_t this_gen)
static

References free_sequence(), and lprintf.

Referenced by open_plugin().

◆ vdpau_mpeg12_flush()

static void vdpau_mpeg12_flush ( video_decoder_t this_gen)
static

References lprintf.

Referenced by open_plugin().

◆ vdpau_mpeg12_reset()

static void vdpau_mpeg12_reset ( video_decoder_t this_gen)
static

References lprintf, and reset_sequence().

Referenced by open_plugin().

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 quant_matrix_extension(), and sequence_header().

◆ 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 quant_matrix_extension(), and sequence_header().