xine-lib 1.2.11
Macros | Functions | Variables
slice_xvmc.c File Reference
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
#include <xine/xine_internal.h>
#include <xine/video_out.h>
#include "mpeg2_internal.h"
#include <xine/xineutils.h>
#include <xine/attributes.h>
#include "accel_xvmc.h"
#include "xvmc.h"
#include "vlc.h"

Macros

#define MOTION_ACCEL   XINE_VO_MOTION_ACCEL
 
#define IDCT_ACCEL   XINE_VO_IDCT_ACCEL
 
#define SIGNED_INTRA   XINE_VO_SIGNED_INTRA
 
#define ACCEL   (MOTION_ACCEL | IDCT_ACCEL)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define SATURATE(val)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define MOTION_CALL(routine, direction)
 
#define NEXT_MACROBLOCK
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 
#define bit_buf   (picture->bitstream_buf)
 
#define bits   (picture->bitstream_bits)
 
#define bit_ptr   (picture->bitstream_ptr)
 

Functions

void xvmc_setup_scan_ptable (void)
 
static int get_xvmc_macroblock_modes (picture_t *picture)
 
static int get_xvmc_quantizer_scale (picture_t *picture)
 
static int get_xvmc_motion_delta (picture_t *picture, int f_code)
 
static int bound_motion_vector (int vec, int f_code)
 
static int get_xvmc_dmv (picture_t *picture)
 
static int get_xvmc_coded_block_pattern (picture_t *picture)
 
static int get_xvmc_luma_dc_dct_diff (picture_t *picture)
 
static int get_xvmc_chroma_dc_dct_diff (picture_t *picture)
 
static void get_xvmc_intra_block_B14 (picture_t *picture)
 
static void get_xvmc_intra_block_B15 (picture_t *picture)
 
static void get_xvmc_non_intra_block (picture_t *picture)
 
static void get_xvmc_mpeg1_intra_block (picture_t *picture)
 
static void get_xvmc_mpeg1_non_intra_block (picture_t *picture)
 
static void slice_xvmc_intra_DCT (picture_t *picture, int cc, uint8_t *dest, int stride)
 
static void slice_xvmc_non_intra_DCT (picture_t *picture, uint8_t *dest, int stride)
 
static void motion_mp1 (picture_t *picture, motion_t *motion, void(**table)(uint8_t *, uint8_t *, int, int))
 
static void motion_fr_frame (picture_t *picture, motion_t *motion, void(**table)(uint8_t *, uint8_t *, int, int))
 
static void motion_fr_field (picture_t *picture, motion_t *motion, void(**table)(uint8_t *, uint8_t *, int, int), int dir)
 
static void motion_fr_dmv (picture_t *picture, motion_t *motion, void(**table)(uint8_t *, uint8_t *, int, int))
 
static void motion_fr_conceal (picture_t *picture)
 
static void motion_fi_field (picture_t *picture, motion_t *motion, void(**table)(uint8_t *, uint8_t *, int, int))
 
static void motion_fi_16x8 (picture_t *picture, motion_t *motion, void(**table)(uint8_t *, uint8_t *, int, int))
 
static void motion_fi_dmv (picture_t *picture, motion_t *motion, void(**table)(uint8_t *, uint8_t *, int, int))
 
static void motion_fi_conceal (picture_t *picture)
 
static int slice_xvmc_init (picture_t *picture, int code)
 
void mpeg2_xvmc_slice (mpeg2dec_accel_t *accel, picture_t *picture, int code, uint8_t *buffer)
 

Variables

static const uint8_t mpeg2_scan_norm_orig [64]
 
static const uint8_t mpeg2_scan_alt_orig [64]
 
static uint8_t mpeg2_scan_alt_ptable [64]
 
static uint8_t mpeg2_scan_norm_ptable [64]
 
static uint8_t mpeg2_scan_orig_ptable [64]
 
static const int non_linear_quantizer_scale []
 

Macro Definition Documentation

◆ ACCEL

#define ACCEL   (MOTION_ACCEL | IDCT_ACCEL)

◆ bit_buf [1/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [2/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [3/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [4/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [5/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [6/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [7/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [8/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [9/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [10/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [11/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [12/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [13/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [14/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [15/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [16/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [17/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [18/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_buf [19/19]

#define bit_buf   (picture->bitstream_buf)

◆ bit_ptr [1/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [2/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [3/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [4/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [5/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [6/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [7/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [8/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [9/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [10/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [11/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [12/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [13/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [14/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [15/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [16/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [17/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [18/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bit_ptr [19/19]

#define bit_ptr   (picture->bitstream_ptr)

◆ bits [1/19]

#define bits   (picture->bitstream_bits)

◆ bits [2/19]

#define bits   (picture->bitstream_bits)

◆ bits [3/19]

#define bits   (picture->bitstream_bits)

◆ bits [4/19]

#define bits   (picture->bitstream_bits)

◆ bits [5/19]

#define bits   (picture->bitstream_bits)

◆ bits [6/19]

#define bits   (picture->bitstream_bits)

◆ bits [7/19]

#define bits   (picture->bitstream_bits)

◆ bits [8/19]

#define bits   (picture->bitstream_bits)

◆ bits [9/19]

#define bits   (picture->bitstream_bits)

◆ bits [10/19]

#define bits   (picture->bitstream_bits)

◆ bits [11/19]

#define bits   (picture->bitstream_bits)

◆ bits [12/19]

#define bits   (picture->bitstream_bits)

◆ bits [13/19]

#define bits   (picture->bitstream_bits)

◆ bits [14/19]

#define bits   (picture->bitstream_bits)

◆ bits [15/19]

#define bits   (picture->bitstream_bits)

◆ bits [16/19]

#define bits   (picture->bitstream_bits)

◆ bits [17/19]

#define bits   (picture->bitstream_bits)

◆ bits [18/19]

#define bits   (picture->bitstream_bits)

◆ bits [19/19]

#define bits   (picture->bitstream_bits)

◆ IDCT_ACCEL

#define IDCT_ACCEL   XINE_VO_IDCT_ACCEL

◆ MOTION_ACCEL

#define MOTION_ACCEL   XINE_VO_MOTION_ACCEL

◆ MOTION_CALL

#define MOTION_CALL (   routine,
  direction 
)
Value:
do { \
if ((direction) & MACROBLOCK_MOTION_FORWARD) \
routine (picture, &(picture->f_motion), mpeg2_mc.put); \
if ((direction) & MACROBLOCK_MOTION_BACKWARD) \
routine (picture, &(picture->b_motion), \
((direction) & MACROBLOCK_MOTION_FORWARD ? \
} while (0)
mpeg2_mc_t mpeg2_mc
Definition: motion_comp.c:32
#define MACROBLOCK_MOTION_BACKWARD
Definition: mpeg2_internal.h:37
#define MACROBLOCK_MOTION_FORWARD
Definition: mpeg2_internal.h:38
mpeg2_mc_fct * avg[8]
Definition: mpeg2_internal.h:286
mpeg2_mc_fct * put[8]
Definition: mpeg2_internal.h:285

◆ NEXT_MACROBLOCK

#define NEXT_MACROBLOCK
Value:
do { \
picture->offset += 16; \
if (picture->offset == picture->coded_picture_width) { \
do { /* just so we can use the break statement */ \
if (picture->current_frame->proc_slice) { \
picture->current_frame->proc_slice (picture->current_frame, \
picture->dest); \
if (picture->picture_coding_type == B_TYPE) \
break; \
} \
picture->dest[0] += 16 * picture->pitches[0]; \
picture->dest[1] += 8 * picture->pitches[1]; \
picture->dest[2] += 8 * picture->pitches[2]; \
} while (0); \
picture->v_offset += 16; \
if (picture->v_offset > picture->limit_y) { \
mpeg2_cpu_state_restore (&cpu_state); \
return; \
} \
picture->offset = 0; \
} \
} while (0)
#define B_TYPE
Definition: ff_mpeg_parser.c:45
void(* mpeg2_cpu_state_restore)(cpu_state_t *state)
Definition: cpu_state.c:34

◆ SATURATE

#define SATURATE (   val)
Value:
do { \
if ((uint32_t)(val + 2048) > 4095) \
val = (val > 0) ? 2047 : -2048; \
} while (0)

◆ SIGNED_INTRA

#define SIGNED_INTRA   XINE_VO_SIGNED_INTRA

Function Documentation

◆ bound_motion_vector()

static int bound_motion_vector ( int  vec,
int  f_code 
)
inlinestatic

◆ get_xvmc_chroma_dc_dct_diff()

static int get_xvmc_chroma_dc_dct_diff ( picture_t picture)
inlinestatic

◆ get_xvmc_coded_block_pattern()

static int get_xvmc_coded_block_pattern ( picture_t picture)
inlinestatic

◆ get_xvmc_dmv()

static int get_xvmc_dmv ( picture_t picture)
inlinestatic

◆ get_xvmc_intra_block_B14()

static void get_xvmc_intra_block_B14 ( picture_t picture)
static

◆ get_xvmc_intra_block_B15()

static void get_xvmc_intra_block_B15 ( picture_t picture)
static

◆ get_xvmc_luma_dc_dct_diff()

static int get_xvmc_luma_dc_dct_diff ( picture_t picture)
inlinestatic

◆ get_xvmc_macroblock_modes()

static int get_xvmc_macroblock_modes ( picture_t picture)
inlinestatic

◆ get_xvmc_motion_delta()

static int get_xvmc_motion_delta ( picture_t picture,
int  f_code 
)
inlinestatic

◆ get_xvmc_mpeg1_intra_block()

static void get_xvmc_mpeg1_intra_block ( picture_t picture)
static

◆ get_xvmc_mpeg1_non_intra_block()

static void get_xvmc_mpeg1_non_intra_block ( picture_t picture)
static

◆ get_xvmc_non_intra_block()

static void get_xvmc_non_intra_block ( picture_t picture)
static

◆ get_xvmc_quantizer_scale()

static int get_xvmc_quantizer_scale ( picture_t picture)
inlinestatic

◆ motion_fi_16x8()

static void motion_fi_16x8 ( picture_t picture,
motion_t motion,
void(**)(uint8_t *, uint8_t *, int, int)  table 
)
static

◆ motion_fi_conceal()

static void motion_fi_conceal ( picture_t picture)
static

◆ motion_fi_dmv()

static void motion_fi_dmv ( picture_t picture,
motion_t motion,
void(**)(uint8_t *, uint8_t *, int, int)  table 
)
static

◆ motion_fi_field()

static void motion_fi_field ( picture_t picture,
motion_t motion,
void(**)(uint8_t *, uint8_t *, int, int)  table 
)
static

◆ motion_fr_conceal()

static void motion_fr_conceal ( picture_t picture)
static

◆ motion_fr_dmv()

static void motion_fr_dmv ( picture_t picture,
motion_t motion,
void(**)(uint8_t *, uint8_t *, int, int)  table 
)
static

◆ motion_fr_field()

static void motion_fr_field ( picture_t picture,
motion_t motion,
void(**)(uint8_t *, uint8_t *, int, int)  table,
int  dir 
)
static

◆ motion_fr_frame()

static void motion_fr_frame ( picture_t picture,
motion_t motion,
void(**)(uint8_t *, uint8_t *, int, int)  table 
)
static

◆ motion_mp1()

static void motion_mp1 ( picture_t picture,
motion_t motion,
void(**)(uint8_t *, uint8_t *, int, int)  table 
)
static

◆ mpeg2_xvmc_slice()

void mpeg2_xvmc_slice ( mpeg2dec_accel_t accel,
picture_t picture,
int  code,
uint8_t *  buffer 
)

◆ slice_xvmc_init()

static int slice_xvmc_init ( picture_t picture,
int  code 
)
inlinestatic

◆ slice_xvmc_intra_DCT()

static void slice_xvmc_intra_DCT ( picture_t picture,
int  cc,
uint8_t *  dest,
int  stride 
)
inlinestatic

◆ slice_xvmc_non_intra_DCT()

static void slice_xvmc_non_intra_DCT ( picture_t picture,
uint8_t *  dest,
int  stride 
)
inlinestatic

◆ xvmc_setup_scan_ptable()

void xvmc_setup_scan_ptable ( void  )

Variable Documentation

◆ mpeg2_scan_alt_orig

const uint8_t mpeg2_scan_alt_orig[64]
static
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 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(), and xvmc_setup_scan_ptable().

◆ mpeg2_scan_alt_ptable

uint8_t mpeg2_scan_alt_ptable[64]
static

◆ mpeg2_scan_norm_orig

const uint8_t mpeg2_scan_norm_orig[64]
static
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(), and xvmc_setup_scan_ptable().

◆ mpeg2_scan_norm_ptable

uint8_t mpeg2_scan_norm_ptable[64]
static

◆ mpeg2_scan_orig_ptable

uint8_t mpeg2_scan_orig_ptable[64]
static

◆ non_linear_quantizer_scale

const int non_linear_quantizer_scale[]
static
Initial value:
= {
0, 1, 2, 3, 4, 5, 6, 7,
8, 10, 12, 14, 16, 18, 20, 22,
24, 28, 32, 36, 40, 44, 48, 52,
56, 64, 72, 80, 88, 96, 104, 112
}

Referenced by get_xvmc_quantizer_scale().