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

xine-lib 1.2.12

Macros | Functions | Variables
idct.c File Reference
`#include "config.h"`
`#include <stdlib.h>`
`#include <inttypes.h>`
`#include "../include/mpeg2.h"`
`#include "../include/attributes.h"`
`#include "mpeg2_internal.h"`

## Macros
#define | W1 2841 /* 2048 * sqrt (2) * cos (1 * pi / 16) */
#define | W2 2676 /* 2048 * sqrt (2) * cos (2 * pi / 16) */
#define | W3 2408 /* 2048 * sqrt (2) * cos (3 * pi / 16) */
#define | W5 1609 /* 2048 * sqrt (2) * cos (5 * pi / 16) */
#define | W6 1108 /* 2048 * sqrt (2) * cos (6 * pi / 16) */
#define | W7 565 /* 2048 * sqrt (2) * cos (7 * pi / 16) */
#define | CLIP(i) ((mpeg2_clip + 3840)[i])
#define | BUTTERFLY(t0, t1, W0, W1, d0, d1)

## Functions
static void | idct_row (int16_t *const block)
static void | idct_col (int16_t *const block)
static void | mpeg2_idct_copy_c (int16_t *block, uint8_t *dest, const int stride)
static void | mpeg2_idct_add_c (const int last, int16_t *block, uint8_t *dest, const int stride)
void | mpeg2_idct_init (uint32_t accel)

## Variables
void(* | mpeg2_idct_copy )(int16_t *block, uint8_t *dest, int stride)
void(* | mpeg2_idct_add )(int last, int16_t *block, uint8_t *dest, int stride)
uint8_t | mpeg2_clip [3840 *2+256]

## Macro Definition Documentation

## ◆ BUTTERFLY

#define BUTTERFLY | ( |  | t0,
|  |  | t1,
|  |  | W0,
|  |  | W1,
|  |  | d0,
|  |  | d1
| ) |  |

Value:
do { \
int tmp = W0 * (d0 + d1); \
t0 = tmp + (W1 - W0) * d1; \
t1 = tmp - (W1 + W0) * d0; \
} while (0)
W1
#define W1
Definition: idct.c:51

## ◆ CLIP

#define CLIP | ( |  | i | ) | ((mpeg2_clip + 3840)[i])

## ◆ W1

#define W1 2841 /* 2048 * sqrt (2) * cos (1 * pi / 16) */

## ◆ W2

#define W2 2676 /* 2048 * sqrt (2) * cos (2 * pi / 16) */

## ◆ W3

#define W3 2408 /* 2048 * sqrt (2) * cos (3 * pi / 16) */

## ◆ W5

#define W5 1609 /* 2048 * sqrt (2) * cos (5 * pi / 16) */

## ◆ W6

#define W6 1108 /* 2048 * sqrt (2) * cos (6 * pi / 16) */

## ◆ W7

#define W7 565 /* 2048 * sqrt (2) * cos (7 * pi / 16) */

## Function Documentation

## ◆ idct_col()

static void idct_col | ( | int16_t *const | block | ) |
| inlinestatic

References BUTTERFLY, W1, W2, W3, W5, W6, and W7.

## ◆ idct_row()

static void idct_row | ( | int16_t *const | block | ) |
| inlinestatic

References BUTTERFLY, likely, W1, W2, W3, W5, W6, and W7.

## ◆ mpeg2_idct_add_c()

static void mpeg2_idct_add_c | ( | const int | last,
|  | int16_t * | block,
|  | uint8_t * | dest,
|  | const int | stride
| ) |  |
| static

References CLIP, idct_col(), and idct_row().

## ◆ mpeg2_idct_copy_c()

static void mpeg2_idct_copy_c | ( | int16_t * | block,
|  | uint8_t * | dest,
|  | const int | stride
| ) |  |
| static

References CLIP, idct_col(), and idct_row().

## ◆ mpeg2_idct_init()

void mpeg2_idct_init | ( | uint32_t | accel | ) |

References CLIP, MPEG2_ACCEL_ALPHA, MPEG2_ACCEL_ALPHA_MVI, MPEG2_ACCEL_PPC_ALTIVEC, MPEG2_ACCEL_X86_MMX, MPEG2_ACCEL_X86_MMXEXT, mpeg2_idct_add, mpeg2_idct_add_alpha(), mpeg2_idct_add_altivec(), mpeg2_idct_add_c(), mpeg2_idct_add_mmx(), mpeg2_idct_add_mmxext(), mpeg2_idct_add_mvi(), mpeg2_idct_alpha_init(), mpeg2_idct_altivec_init(), mpeg2_idct_copy, mpeg2_idct_copy_alpha(), mpeg2_idct_copy_altivec(), mpeg2_idct_copy_c(), mpeg2_idct_copy_mmx(), mpeg2_idct_copy_mmxext(), mpeg2_idct_copy_mvi(), mpeg2_idct_mmx_init(), mpeg2_scan_alt, and mpeg2_scan_norm.

## Variable Documentation

## ◆ mpeg2_clip

uint8_t mpeg2_clip[3840 *2+256]

## ◆ mpeg2_idct_add

void(* mpeg2_idct_add) (int last, int16_t *block, uint8_t *dest, int stride) | ( | int | last,
|  | int16_t * | block,
|  | uint8_t * | dest,
|  | int | stride
| ) |  |

## ◆ mpeg2_idct_copy

void(* mpeg2_idct_copy) (int16_t *block, uint8_t *dest, int stride) | ( | int16_t * | block,
|  | uint8_t * | dest,
|  | int | stride
| ) |  |