xine-lib 1.2.13-20230125hg15249
Data Structures | Macros | Typedefs | Functions | Variables
vdpau_vc1.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_vc1_decoder_s
 

Macros

#define LOG_MODULE   "vdpau_vc1"
 
#define sequence_header_code   0x0f
 
#define sequence_end_code   0x0a
 
#define entry_point_code   0x0e
 
#define frame_start_code   0x0d
 
#define field_start_code   0x0c
 
#define slice_start_code   0x0b
 
#define PICTURE_FRAME   0
 
#define PICTURE_FRAME_INTERLACE   2
 
#define PICTURE_FIELD_INTERLACE   3
 
#define I_FRAME   0
 
#define P_FRAME   1
 
#define B_FRAME   3
 
#define BI_FRAME   4
 
#define FIELDS_I_I   0
 
#define FIELDS_I_P   1
 
#define FIELDS_P_I   2
 
#define FIELDS_P_P   3
 
#define FIELDS_B_B   4
 
#define FIELDS_B_BI   5
 
#define FIELDS_BI_B   6
 
#define FIELDS_BI_BI   7
 
#define MODE_STARTCODE   0
 
#define MODE_FRAME   1
 

Typedefs

typedef struct vdpau_vc1_decoder_s vdpau_vc1_decoder_t
 

Functions

static void init_picture (picture_t *pic)
 
static void reset_picture (picture_t *pic)
 
static void reset_sequence (sequence_t *sequence)
 
static void init_sequence (sequence_t *sequence)
 
static void update_metadata (vdpau_vc1_decoder_t *this_gen)
 
static void sequence_header_advanced (vdpau_vc1_decoder_t *this_gen, uint8_t *buf, int len)
 
static void sequence_header (vdpau_vc1_decoder_t *this_gen, uint8_t *buf, int len)
 
static void entry_point (vdpau_vc1_decoder_t *this_gen, uint8_t *buf, int len)
 
static void picture_header (vdpau_vc1_decoder_t *this_gen, uint8_t *buf, int len)
 
static void picture_header_advanced (vdpau_vc1_decoder_t *this_gen, uint8_t *buf, int len)
 
static void parse_header (vdpau_vc1_decoder_t *this_gen, uint8_t *buf, int len)
 
static void remove_emulation_prevention (uint8_t *src, uint8_t *dst, int src_len, int *dst_len)
 
static int parse_code (vdpau_vc1_decoder_t *this_gen, uint8_t *buf, int len)
 
static void decode_render (vdpau_vc1_decoder_t *vd, vdpau_accel_t *accel, uint8_t *buf, int len)
 
static int search_field (vdpau_vc1_decoder_t *vd, uint8_t *buf, int len)
 
static void decode_picture (vdpau_vc1_decoder_t *vd)
 
static void vdpau_vc1_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
 
static void vdpau_vc1_flush (video_decoder_t *this_gen)
 
static void vdpau_vc1_reset (video_decoder_t *this_gen)
 
static void vdpau_vc1_discontinuity (video_decoder_t *this_gen)
 
static void vdpau_vc1_dispose (video_decoder_t *this_gen)
 
static video_decoder_topen_plugin (video_decoder_class_t *class_gen, xine_stream_t *stream)
 
void * vc1_init_plugin (xine_t *xine, const void *data)
 

Variables

const double aspect_ratio []
 

Macro Definition Documentation

◆ B_FRAME

#define B_FRAME   3

◆ BI_FRAME

#define BI_FRAME   4

◆ entry_point_code

#define entry_point_code   0x0e

Referenced by parse_code(), and parse_header().

◆ field_start_code

#define field_start_code   0x0c

Referenced by parse_code(), and search_field().

◆ FIELDS_B_B

#define FIELDS_B_B   4

◆ FIELDS_B_BI

#define FIELDS_B_BI   5

Referenced by picture_header_advanced().

◆ FIELDS_BI_B

#define FIELDS_BI_B   6

Referenced by decode_render().

◆ FIELDS_BI_BI

#define FIELDS_BI_BI   7

◆ FIELDS_I_I

#define FIELDS_I_I   0

◆ FIELDS_I_P

#define FIELDS_I_P   1

◆ FIELDS_P_I

#define FIELDS_P_I   2

◆ FIELDS_P_P

#define FIELDS_P_P   3

◆ frame_start_code

#define frame_start_code   0x0d

Referenced by parse_code().

◆ I_FRAME

#define I_FRAME   0

◆ LOG_MODULE

#define LOG_MODULE   "vdpau_vc1"

◆ MODE_FRAME

#define MODE_FRAME   1

◆ MODE_STARTCODE

#define MODE_STARTCODE   0

◆ P_FRAME

#define P_FRAME   1

◆ PICTURE_FIELD_INTERLACE

#define PICTURE_FIELD_INTERLACE   3

◆ PICTURE_FRAME

#define PICTURE_FRAME   0

Referenced by picture_header_advanced().

◆ PICTURE_FRAME_INTERLACE

#define PICTURE_FRAME_INTERLACE   2

Referenced by picture_header_advanced().

◆ sequence_end_code

#define sequence_end_code   0x0a

Referenced by parse_code().

◆ sequence_header_code

#define sequence_header_code   0x0f

Referenced by parse_code(), and parse_header().

◆ slice_start_code

#define slice_start_code   0x0b

Referenced by parse_code().

Typedef Documentation

◆ vdpau_vc1_decoder_t

Function Documentation

◆ decode_picture()

static void decode_picture ( vdpau_vc1_decoder_t * vd)
static

◆ decode_render()

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

◆ entry_point()

static void entry_point ( vdpau_vc1_decoder_t * this_gen,
uint8_t * buf,
int len )
static

◆ init_picture()

static void init_picture ( picture_t * pic)
static

Referenced by open_plugin().

◆ init_sequence()

static void init_sequence ( sequence_t * sequence)
static

◆ 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_vc1_decoder_t * this_gen,
uint8_t * buf,
int len )
static

◆ parse_header()

static void parse_header ( vdpau_vc1_decoder_t * this_gen,
uint8_t * buf,
int len )
static

◆ picture_header()

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

◆ picture_header_advanced()

static void picture_header_advanced ( vdpau_vc1_decoder_t * this_gen,
uint8_t * buf,
int len )
static

◆ remove_emulation_prevention()

static void remove_emulation_prevention ( uint8_t * src,
uint8_t * dst,
int src_len,
int * dst_len )
static

References lprintf.

Referenced by decode_picture(), and parse_code().

◆ reset_picture()

static void reset_picture ( picture_t * pic)
static

References picture_t::slices.

Referenced by decode_picture(), and reset_sequence().

◆ reset_sequence()

static void reset_sequence ( sequence_t * sequence)
static

◆ search_field()

static int search_field ( vdpau_vc1_decoder_t * vd,
uint8_t * buf,
int len )
static

References field_start_code, and lprintf.

Referenced by decode_picture().

◆ sequence_header()

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

◆ sequence_header_advanced()

static void sequence_header_advanced ( vdpau_vc1_decoder_t * this_gen,
uint8_t * buf,
int len )
static

◆ update_metadata()

static void update_metadata ( vdpau_vc1_decoder_t * this_gen)
static

◆ vc1_init_plugin()

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

◆ vdpau_vc1_decode_data()

static void vdpau_vc1_decode_data ( video_decoder_t * this_gen,
buf_element_t * buf )
static

◆ vdpau_vc1_discontinuity()

static void vdpau_vc1_discontinuity ( video_decoder_t * this_gen)
static

References lprintf.

Referenced by open_plugin().

◆ vdpau_vc1_dispose()

static void vdpau_vc1_dispose ( video_decoder_t * this_gen)
static

References lprintf, and reset_sequence().

Referenced by open_plugin().

◆ vdpau_vc1_flush()

static void vdpau_vc1_flush ( video_decoder_t * this_gen)
static

References lprintf.

Referenced by open_plugin().

◆ vdpau_vc1_reset()

static void vdpau_vc1_reset ( video_decoder_t * this_gen)
static

References lprintf, and reset_sequence().

Referenced by open_plugin().

Variable Documentation

◆ aspect_ratio

const double aspect_ratio[]
Initial value:
= {
0.0,
1.0,
12./11.,
10./11.,
16./11.,
40./33.,
24./11.,
20./11.,
32./11.,
80./33.,
18./11.,
15./11.,
64./33.,
160./99.
}