xine-lib: xine-lib-1.2.13/src/video_dec/libmpeg2/motion_comp.c File Reference

xine-lib 1.2.13-20230125hg15249

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

## Macros
#define | avg2(a, b) ((a+b+1)>>1)
#define | avg4(a, b, c, d) ((a+b+c+d+2)>>2)
#define | predict_o(i) (ref[i])
#define | predict_x(i) (avg2 (ref[i], ref[i+1]))
#define | predict_y(i) (avg2 (ref[i], (ref+stride)[i]))
#define | predict_xy(i)
#define | put(predictor, i) dest[i] = predictor (i)
#define | avg(predictor, i) dest[i] = avg2 (predictor (i), dest[i])
#define | MC_FUNC(op, xy)

## Functions
void | mpeg2_mc_init (uint32_t mm_accel)
static void | MC_put_o_16_c (uint8_t *dest, uint8_t *ref, int stride, int height)
static void | MC_put_o_8_c (uint8_t *dest, uint8_t *ref, int stride, int height)
static void | MC_avg_o_16_c (uint8_t *dest, uint8_t *ref, int stride, int height)
static void | MC_avg_o_8_c (uint8_t *dest, uint8_t *ref, int stride, int height)
static void | MC_put_x_16_c (uint8_t *dest, uint8_t *ref, int stride, int height)
static void | MC_put_x_8_c (uint8_t *dest, uint8_t *ref, int stride, int height)
static void | MC_avg_x_16_c (uint8_t *dest, uint8_t *ref, int stride, int height)
static void | MC_avg_x_8_c (uint8_t *dest, uint8_t *ref, int stride, int height)
static void | MC_put_y_16_c (uint8_t *dest, uint8_t *ref, int stride, int height)
static void | MC_put_y_8_c (uint8_t *dest, uint8_t *ref, int stride, int height)
static void | MC_avg_y_16_c (uint8_t *dest, uint8_t *ref, int stride, int height)
static void | MC_avg_y_8_c (uint8_t *dest, uint8_t *ref, int stride, int height)
static void | MC_put_xy_16_c (uint8_t *dest, uint8_t *ref, int stride, int height)
static void | MC_put_xy_8_c (uint8_t *dest, uint8_t *ref, int stride, int height)
static void | MC_avg_xy_16_c (uint8_t *dest, uint8_t *ref, int stride, int height)
static void | MC_avg_xy_8_c (uint8_t *dest, uint8_t *ref, int stride, int height)

## Variables
mpeg2_mc_t | mpeg2_mc
mpeg2_mc_t | mpeg2_mc_c = { {MC_put_o_16_c, MC_put_x_16_c, MC_put_y_16_c, MC_put_xy_16_c, MC_put_o_8_c, MC_put_x_8_c, MC_put_y_8_c, MC_put_xy_8_c}, {MC_avg_o_16_c, MC_avg_x_16_c, MC_avg_y_16_c, MC_avg_xy_16_c, MC_avg_o_8_c, MC_avg_x_8_c, MC_avg_y_8_c, MC_avg_xy_8_c} }

## Macro Definition Documentation

## ◆ avg

#define avg | ( |  | predictor,
|  |  | i ) dest[i] = avg2 (predictor (i), dest[i])

Referenced by method2_float(), and method2_int16().

## ◆ avg2

#define avg2 | ( |  | a,
|  |  | b ) ((a+b+1)>>1)

## ◆ avg4

#define avg4 | ( |  | a,
|  |  | b,
|  |  | c,
|  |  | d ) ((a+b+c+d+2)>>2)

## ◆ MC_FUNC

#define MC_FUNC | ( |  | op,
|  |  | xy )

## ◆ predict_o

#define predict_o | ( |  | i | ) | (ref[i])

## ◆ predict_x

#define predict_x | ( |  | i | ) | (avg2 (ref[i], ref[i+1]))

## ◆ predict_xy

#define predict_xy | ( |  | i | ) |

Value:
(avg4 (ref[i], ref[i+1], \
(ref+stride)[i], (ref+stride)[i+1]))
avg4
#define avg4(a, b, c, d)
Definition motion_comp.c:88

## ◆ predict_y

#define predict_y | ( |  | i | ) | (avg2 (ref[i], (ref+stride)[i]))

## ◆ put

#define put | ( |  | predictor,
|  |  | i ) dest[i] = predictor (i)

Referenced by _x_dummy_fifo_buffer_new(), and tdaan_port_put_buffer().

## Function Documentation

## ◆ MC_avg_o_16_c()

static void MC_avg_o_16_c | ( | uint8_t * | dest,
|  | uint8_t * | ref,
|  | int | stride,
|  | int | height )
| static

## ◆ MC_avg_o_8_c()

static void MC_avg_o_8_c | ( | uint8_t * | dest,
|  | uint8_t * | ref,
|  | int | stride,
|  | int | height )
| static

## ◆ MC_avg_x_16_c()

static void MC_avg_x_16_c | ( | uint8_t * | dest,
|  | uint8_t * | ref,
|  | int | stride,
|  | int | height )
| static

## ◆ MC_avg_x_8_c()

static void MC_avg_x_8_c | ( | uint8_t * | dest,
|  | uint8_t * | ref,
|  | int | stride,
|  | int | height )
| static

## ◆ MC_avg_xy_16_c()

static void MC_avg_xy_16_c | ( | uint8_t * | dest,
|  | uint8_t * | ref,
|  | int | stride,
|  | int | height )
| static

## ◆ MC_avg_xy_8_c()

static void MC_avg_xy_8_c | ( | uint8_t * | dest,
|  | uint8_t * | ref,
|  | int | stride,
|  | int | height )
| static

## ◆ MC_avg_y_16_c()

static void MC_avg_y_16_c | ( | uint8_t * | dest,
|  | uint8_t * | ref,
|  | int | stride,
|  | int | height )
| static

## ◆ MC_avg_y_8_c()

static void MC_avg_y_8_c | ( | uint8_t * | dest,
|  | uint8_t * | ref,
|  | int | stride,
|  | int | height )
| static

## ◆ MC_put_o_16_c()

static void MC_put_o_16_c | ( | uint8_t * | dest,
|  | uint8_t * | ref,
|  | int | stride,
|  | int | height )
| static

## ◆ MC_put_o_8_c()

static void MC_put_o_8_c | ( | uint8_t * | dest,
|  | uint8_t * | ref,
|  | int | stride,
|  | int | height )
| static

## ◆ MC_put_x_16_c()

static void MC_put_x_16_c | ( | uint8_t * | dest,
|  | uint8_t * | ref,
|  | int | stride,
|  | int | height )
| static

## ◆ MC_put_x_8_c()

static void MC_put_x_8_c | ( | uint8_t * | dest,
|  | uint8_t * | ref,
|  | int | stride,
|  | int | height )
| static

## ◆ MC_put_xy_16_c()

static void MC_put_xy_16_c | ( | uint8_t * | dest,
|  | uint8_t * | ref,
|  | int | stride,
|  | int | height )
| static

## ◆ MC_put_xy_8_c()

static void MC_put_xy_8_c | ( | uint8_t * | dest,
|  | uint8_t * | ref,
|  | int | stride,
|  | int | height )
| static

## ◆ MC_put_y_16_c()

static void MC_put_y_16_c | ( | uint8_t * | dest,
|  | uint8_t * | ref,
|  | int | stride,
|  | int | height )
| static

## ◆ MC_put_y_8_c()

static void MC_put_y_8_c | ( | uint8_t * | dest,
|  | uint8_t * | ref,
|  | int | stride,
|  | int | height )
| static

## ◆ mpeg2_mc_init()

void mpeg2_mc_init | ( | uint32_t | mm_accel | ) |

References MM_ACCEL_MLIB, MM_ACCEL_PPC_ALTIVEC, MM_ACCEL_SPARC_VIS, MM_ACCEL_X86_3DNOW, MM_ACCEL_X86_MMX, MM_ACCEL_X86_MMXEXT, mpeg2_mc, mpeg2_mc_3dnow, mpeg2_mc_altivec, mpeg2_mc_c, mpeg2_mc_mlib, mpeg2_mc_mmx, mpeg2_mc_mmxext, and mpeg2_mc_vis.

Referenced by mpeg2_accel(), and mpeg2_init().

## Variable Documentation

## ◆ mpeg2_mc

mpeg2_mc_t mpeg2_mc

Referenced by motion_fi_dmv(), motion_fr_dmv(), mpeg2_mc_init(), mpeg2_mc_init(), and mpeg2_xvmc_slice().

## ◆ mpeg2_mc_c

mpeg2_mc_t mpeg2_mc_c = { {MC_put_o_16_c, MC_put_x_16_c, MC_put_y_16_c, MC_put_xy_16_c, MC_put_o_8_c, MC_put_x_8_c, MC_put_y_8_c, MC_put_xy_8_c}, {MC_avg_o_16_c, MC_avg_x_16_c, MC_avg_y_16_c, MC_avg_xy_16_c, MC_avg_o_8_c, MC_avg_x_8_c, MC_avg_y_8_c, MC_avg_xy_8_c} }

Referenced by mpeg2_mc_init(), and mpeg2_mc_init().