xine-lib 1.2.11
Data Structures | Macros | Typedefs | Functions | Variables
vdpau_mpeg4.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_mpeg4_decoder_s
 

Macros

#define LOG_MODULE   "vdpau_mpeg4"
 
#define begin_vo_start_code   0x00
 
#define end_vo_start_code   0x1f
 
#define begin_vol_start_code   0x20
 
#define end_vol_start_code   0x2f
 
#define viso_sequence_start_code   0xb0
 
#define viso_sequence_end_code   0xb1
 
#define viso_start_code   0xb5
 
#define group_start_code   0xb3
 
#define user_data_start_code   0xb2
 
#define vop_start_code   0xb6
 
#define I_FRAME   0
 
#define P_FRAME   1
 
#define B_FRAME   2
 
#define PICTURE_TOP   1
 
#define PICTURE_BOTTOM   2
 
#define PICTURE_FRAME   3
 
#define SHAPE_RECT   0
 
#define SHAPE_BIN   1
 
#define SHAPE_BINONLY   2
 
#define SHAPE_GRAY   3
 
#define SPRITE_STATIC   1
 
#define SPRITE_GMC   2
 
#define ROUNDED_DIV(a, b)   (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
 

Typedefs

typedef struct vdpau_mpeg4_decoder_s vdpau_mpeg4_decoder_t
 

Functions

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 update_metadata (vdpau_mpeg4_decoder_t *this_gen)
 
static void visual_object (vdpau_mpeg4_decoder_t *this_gen, uint8_t *buf, int len)
 
static void video_object_layer (vdpau_mpeg4_decoder_t *this_gen, uint8_t *buf, int len)
 
static void video_object_plane (vdpau_mpeg4_decoder_t *this_gen, uint8_t *buf, int len)
 
static void gop_header (vdpau_mpeg4_decoder_t *this_gen, uint8_t *buf, int len)
 
static void user_data (vdpau_mpeg4_decoder_t *this_gen, uint8_t *buffer, int len)
 
static int parse_code (vdpau_mpeg4_decoder_t *this_gen, uint8_t *buf, int len)
 
static void decode_render (vdpau_mpeg4_decoder_t *vd, vdpau_accel_t *accel, uint8_t *buf, int len)
 
static void decode_picture (vdpau_mpeg4_decoder_t *vd)
 
static void vdpau_mpeg4_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
 
static void vdpau_mpeg4_flush (video_decoder_t *this_gen)
 
static void vdpau_mpeg4_reset (video_decoder_t *this_gen)
 
static void vdpau_mpeg4_discontinuity (video_decoder_t *this_gen)
 
static void vdpau_mpeg4_dispose (video_decoder_t *this_gen)
 
static video_decoder_topen_plugin (video_decoder_class_t *class_gen, xine_stream_t *stream)
 
void * mpeg4_init_plugin (xine_t *xine, const void *data)
 

Variables

static int nframe
 
static const uint8_t default_intra_quantizer_matrix [64]
 
static const uint8_t default_non_intra_quantizer_matrix [64]
 
uint8_t mpeg_scan_norm [64]
 

Macro Definition Documentation

◆ B_FRAME

#define B_FRAME   2

◆ begin_vo_start_code

#define begin_vo_start_code   0x00

◆ begin_vol_start_code

#define begin_vol_start_code   0x20

◆ end_vo_start_code

#define end_vo_start_code   0x1f

◆ end_vol_start_code

#define end_vol_start_code   0x2f

◆ group_start_code

#define group_start_code   0xb3

◆ I_FRAME

#define I_FRAME   0

◆ LOG_MODULE

#define LOG_MODULE   "vdpau_mpeg4"

◆ P_FRAME

#define P_FRAME   1

◆ PICTURE_BOTTOM

#define PICTURE_BOTTOM   2

◆ PICTURE_FRAME

#define PICTURE_FRAME   3

◆ PICTURE_TOP

#define PICTURE_TOP   1

◆ ROUNDED_DIV

#define ROUNDED_DIV (   a,
 
)    (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))

◆ SHAPE_BIN

#define SHAPE_BIN   1

◆ SHAPE_BINONLY

#define SHAPE_BINONLY   2

◆ SHAPE_GRAY

#define SHAPE_GRAY   3

◆ SHAPE_RECT

#define SHAPE_RECT   0

◆ SPRITE_GMC

#define SPRITE_GMC   2

◆ SPRITE_STATIC

#define SPRITE_STATIC   1

◆ user_data_start_code

#define user_data_start_code   0xb2

◆ viso_sequence_end_code

#define viso_sequence_end_code   0xb1

◆ viso_sequence_start_code

#define viso_sequence_start_code   0xb0

◆ viso_start_code

#define viso_start_code   0xb5

◆ vop_start_code

#define vop_start_code   0xb6

Typedef Documentation

◆ vdpau_mpeg4_decoder_t

Function Documentation

◆ decode_picture()

static void decode_picture ( vdpau_mpeg4_decoder_t vd)
static

◆ decode_render()

static void decode_render ( vdpau_mpeg4_decoder_t vd,
vdpau_accel_t accel,
uint8_t *  buf,
int  len 
)
static

◆ free_sequence()

static void free_sequence ( sequence_t sequence)
static

◆ gop_header()

static void gop_header ( vdpau_mpeg4_decoder_t this_gen,
uint8_t *  buf,
int  len 
)
static

◆ init_picture()

static void init_picture ( picture_t pic)
static

References reset_picture().

Referenced by open_plugin().

◆ mpeg4_init_plugin()

void * mpeg4_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_mpeg4_decoder_t this_gen,
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

◆ update_metadata()

static void update_metadata ( vdpau_mpeg4_decoder_t this_gen)
static

◆ user_data()

static void user_data ( vdpau_mpeg4_decoder_t this_gen,
uint8_t *  buffer,
int  len 
)
static

◆ vdpau_mpeg4_decode_data()

static void vdpau_mpeg4_decode_data ( video_decoder_t this_gen,
buf_element_t buf 
)
static

◆ vdpau_mpeg4_discontinuity()

static void vdpau_mpeg4_discontinuity ( video_decoder_t this_gen)
static

References lprintf, and reset_sequence().

Referenced by open_plugin().

◆ vdpau_mpeg4_dispose()

static void vdpau_mpeg4_dispose ( video_decoder_t this_gen)
static

References free_sequence(), and lprintf.

Referenced by open_plugin().

◆ vdpau_mpeg4_flush()

static void vdpau_mpeg4_flush ( video_decoder_t this_gen)
static

References lprintf.

Referenced by open_plugin().

◆ vdpau_mpeg4_reset()

static void vdpau_mpeg4_reset ( video_decoder_t this_gen)
static

References lprintf, and reset_sequence().

Referenced by open_plugin().

◆ video_object_layer()

static void video_object_layer ( vdpau_mpeg4_decoder_t this_gen,
uint8_t *  buf,
int  len 
)
static

◆ video_object_plane()

static void video_object_plane ( vdpau_mpeg4_decoder_t this_gen,
uint8_t *  buf,
int  len 
)
static

◆ visual_object()

static void visual_object ( vdpau_mpeg4_decoder_t this_gen,
uint8_t *  buf,
int  len 
)
static

Variable Documentation

◆ default_intra_quantizer_matrix

const uint8_t default_intra_quantizer_matrix[64]
static
Initial value:
= {
8,
17, 17,
20, 18, 18,
19, 19, 21, 21,
22, 22, 22, 21, 21,
23, 23, 23, 23, 23, 23,
25, 24, 24, 24, 24, 25, 25,
27, 27, 26, 26, 26, 26, 26, 27,
28, 28, 28, 28, 28, 28, 28,
30, 30, 30, 30, 30, 30,
32, 32, 32, 32, 32,
35, 35, 35, 35,
38, 38, 38,
41, 41,
45
}

Referenced by video_object_layer().

◆ default_non_intra_quantizer_matrix

const uint8_t default_non_intra_quantizer_matrix[64]
static
Initial value:
= {
16,
17, 17,
18, 18, 18,
19, 19, 19, 19,
20, 20, 20, 20, 20,
21, 21, 21, 21, 21, 21,
22, 22, 22, 22, 22, 22, 22,
23, 23, 23, 23, 23, 23, 23, 23,
24, 24, 24, 25, 24, 24, 24,
25, 26, 26, 26, 26, 25,
27, 27, 27, 27, 27,
28, 28, 28, 28,
30, 30, 30,
31, 31,
33
}

Referenced by video_object_layer().

◆ mpeg_scan_norm

uint8_t mpeg_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 video_object_layer().

◆ nframe

int nframe
static

Referenced by decode_render(), and open_plugin().