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

xine-lib 1.2.12

Macros | Functions | Variables
motion_comp.c File Reference
`#include "config.h"`
`#include <inttypes.h>`
`#include "../include/mpeg2.h"`
`#include "../include/attributes.h"`
`#include "mpeg2_internal.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 accel)
static void | MC_put_o_16_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
static void | MC_put_o_8_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
static void | MC_avg_o_16_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
static void | MC_avg_o_8_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
static void | MC_put_x_16_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
static void | MC_put_x_8_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
static void | MC_avg_x_16_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
static void | MC_avg_x_8_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
static void | MC_put_y_16_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
static void | MC_put_y_8_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
static void | MC_avg_y_16_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
static void | MC_avg_y_8_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
static void | MC_put_xy_16_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
static void | MC_put_xy_8_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
static void | MC_avg_xy_16_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
static void | MC_avg_xy_8_c (uint8_t *dest, const uint8_t *ref, const 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])

## ◆ 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)

## Function Documentation

## ◆ MC_avg_o_16_c()

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

## ◆ MC_avg_o_8_c()

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

## ◆ MC_avg_x_16_c()

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

## ◆ MC_avg_x_8_c()

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

## ◆ MC_avg_xy_16_c()

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

## ◆ MC_avg_xy_8_c()

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

## ◆ MC_avg_y_16_c()

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

## ◆ MC_avg_y_8_c()

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

## ◆ MC_put_o_16_c()

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

## ◆ MC_put_o_8_c()

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

## ◆ MC_put_x_16_c()

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

## ◆ MC_put_x_8_c()

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

## ◆ MC_put_xy_16_c()

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

## ◆ MC_put_xy_8_c()

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

## ◆ MC_put_y_16_c()

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

## ◆ MC_put_y_8_c()

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

## ◆ mpeg2_mc_init()

void mpeg2_mc_init | ( | uint32_t | accel | ) |

References MPEG2_ACCEL_ALPHA, MPEG2_ACCEL_PPC_ALTIVEC, MPEG2_ACCEL_SPARC_VIS, MPEG2_ACCEL_X86_3DNOW, MPEG2_ACCEL_X86_MMX, MPEG2_ACCEL_X86_MMXEXT, mpeg2_mc, mpeg2_mc_3dnow, mpeg2_mc_alpha, mpeg2_mc_altivec, mpeg2_mc_c, mpeg2_mc_mmx, mpeg2_mc_mmxext, and mpeg2_mc_vis.

## Variable Documentation

## ◆ mpeg2_mc

mpeg2_mc_t mpeg2_mc

## ◆ 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 } }