xine-lib: xine-lib-1.2.13/src/video_out/video_out_pgx64.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
video_out_pgx64.c File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <pthread.h>`
`#include <fcntl.h>`
`#include <unistd.h>`
`#include <sys/fbio.h>`
`#include <sys/visual_io.h>`
`#include <sys/mman.h>`
`#include <X11/Xlib.h>`
`#include <X11/Xutil.h>`
`#include <X11/Xatom.h>`
`#include <dga/dga.h>`
`#include <xine/xine_internal.h>`
`#include "bswap.h"`
`#include <xine/vo_scale.h>`
`#include <xine/xineutils.h>`

## Data Structures
struct | pgx64_overlay_s
struct | pgx64_driver_class_t
struct | pgx64_frame_t
struct | pgx64_driver_t

## Macros
#define | MAX_MULTIBUF_FRAMES 15
#define | MAX_DETAINED_FRAMES 10
#define | M64_VRAM_MMAPBASE 0x00000000
#define | M64_VRAM_MMAPLEN 0x00800000
#define | M64_BUS_CNTL 0x128
#define | M64_BUS_EXT_REG_EN 0x08000000
#define | M64_OVERLAY_X_Y_START 0x000
#define | M64_OVERLAY_X_Y_END 0x001
#define | M64_OVERLAY_X_Y_LOCK 0x80000000
#define | M64_OVERLAY_GRAPHICS_KEY_CLR 0x004
#define | M64_OVERLAY_GRAPHICS_KEY_MSK 0x005
#define | M64_OVERLAY_KEY_CNTL 0x006
#define | M64_OVERLAY_KEY_EN 0x00000050
#define | M64_OVERLAY_SCALE_INC 0x008
#define | M64_OVERLAY_EXCLUSIVE_HORZ 0x016
#define | M64_OVERLAY_EXCLUSIVE_VERT 0x017
#define | M64_OVERLAY_EXCLUSIVE_EN 0x80000000
#define | M64_OVERLAY_SCALE_CNTL 0x009
#define | M64_OVERLAY_SCALE_EN 0xC0000000
#define | M64_SCALER_HEIGHT_WIDTH 0x00A
#define | M64_SCALER_COLOUR_CNTL 0x054
#define | M64_SCALER_H_COEFF0 0x055
#define | M64_SCALER_H_COEFF0_DEFAULT 0x00002000
#define | M64_SCALER_H_COEFF1 0x056
#define | M64_SCALER_H_COEFF1_DEFAULT 0x0D06200D
#define | M64_SCALER_H_COEFF2 0x057
#define | M64_SCALER_H_COEFF2_DEFAULT 0x0D0A1C0D
#define | M64_SCALER_H_COEFF3 0x058
#define | M64_SCALER_H_COEFF3_DEFAULT 0x0C0E1A0C
#define | M64_SCALER_H_COEFF4 0x059
#define | M64_SCALER_H_COEFF4_DEFAULT 0x0C14140C
#define | M64_SCALER_BUF0_OFFSET 0x00D
#define | M64_SCALER_BUF0_OFFSET_U 0x075
#define | M64_SCALER_BUF0_OFFSET_V 0x076
#define | M64_SCALER_BUF1_OFFSET 0x00E
#define | M64_SCALER_BUF1_OFFSET_U 0x077
#define | M64_SCALER_BUF1_OFFSET_V 0x078
#define | M64_SCALER_BUF_PITCH 0x00F
#define | M64_VIDEO_FORMAT 0x012
#define | M64_VIDEO_FORMAT_YUV12 0x000A0000
#define | M64_VIDEO_FORMAT_VYUY422 0x000B0000
#define | M64_CAPTURE_CONFIG 0x014
#define | M64_CAPTURE_CONFIG_BUF0 0x00000000
#define | M64_CAPTURE_CONFIG_BUF1 0x20000000
#define | PFB_VRAM_MMAPBASE 0x08000000
#define | PFB_VRAM_MMAPLEN 0x02000000
#define | PFB_REGS_MMAPBASE 0x10000000
#define | PFB_REGS_MMAPLEN 0x00040000
#define | PFB_CLOCK_CNTL_INDEX 0x002
#define | PFB_CLOCK_CNTL_DATA 0x003
#define | PFB_MC_FB_LOCATION 0x052
#define | PFB_OV0_Y_X_START 0x100
#define | PFB_OV0_Y_X_END 0x101
#define | PFB_OV0_REG_LOAD_CNTL 0x104
#define | PFB_OV0_REG_LOAD_LOCK 0x00000001
#define | PFB_OV0_REG_LOAD_LOCK_READBACK 0x00000008
#define | PFB_OV0_SCALE_CNTL 0x108
#define | PFB_OV0_SCALE_EN 0x417f0000
#define | PFB_OV0_SCALE_YUV12 0x00000A00
#define | PFB_OV0_SCALE_VYUY422 0x00000B00
#define | PFB_OV0_V_INC 0x109
#define | PFB_OV0_P1_V_ACCUM_INIT 0x10A
#define | PFB_OV0_P23_V_ACCUM_INIT 0x10B
#define | PFB_OV0_P1_BLANK_LINES_AT_TOP 0x10C
#define | PFB_OV0_P23_BLANK_LINES_AT_TOP 0x10D
#define | PFB_OV0_BASE_ADDR 0x10F
#define | PFB_OV0_BUF0_BASE_ADRS 0x110
#define | PFB_OV0_BUF1_BASE_ADRS 0x111
#define | PFB_OV0_BUF2_BASE_ADRS 0x112
#define | PFB_OV0_BUF3_BASE_ADRS 0x113
#define | PFB_OV0_BUF4_BASE_ADRS 0x114
#define | PFB_OV0_BUF5_BASE_ADRS 0x115
#define | PFB_OV0_VID_BUF_PITCH0_VALUE 0x118
#define | PFB_OV0_VID_BUF_PITCH1_VALUE 0x119
#define | PFB_OV0_AUTO_FLIP_CNTL 0x11C
#define | PFB_OV0_AUTO_FLIP_BUF0 0x00000200
#define | PFB_OV0_AUTO_FLIP_BUF3 0x00000243
#define | PFB_OV0_DEINTERLACE_PATTERN 0x11D
#define | PFB_OV0_H_INC 0x120
#define | PFB_OV0_STEP_BY 0x121
#define | PFB_OV0_P1_H_ACCUM_INIT 0x122
#define | PFB_OV0_P23_H_ACCUM_INIT 0x123
#define | PFB_OV0_P1_X_START_END 0x125
#define | PFB_OV0_P2_X_START_END 0x126
#define | PFB_OV0_P3_X_START_END 0x127
#define | PFB_OV0_FILTER_CNTL 0x128
#define | PFB_OV0_FILTER_EN 0x0000000f
#define | PFB_OV0_GRPH_KEY_CLR_LOW 0x13B
#define | PFB_OV0_GRPH_KEY_CLR_HIGH 0x13C
#define | PFB_OV0_KEY_CNTL 0x13D
#define | PFB_OV0_KEY_EN 0x00000121
#define | PFB_DISP_MERGE_CNTL 0x358
#define | PFB_DISP_MERGE_EN 0xffff0000
#define | scale_up(n) ((n) << 16)
#define | scale_down(n) ((n) >> 16)
#define | saturate(n, l, u) ((n) < (l) ? (l) : ((n) > (u) ? (u) : (n)))

## Typedefs
typedef struct pgx64_overlay_s | pgx64_overlay_t

## Enumerations
enum | fb_type_t { FB_TYPE_M64 , FB_TYPE_PFB }
enum | buf_mode_t { BUF_MODE_MULTI , BUF_MODE_MULTI_FAILED , BUF_MODE_SINGLE , BUF_MODE_DOUBLE }

## Functions
static int | dummy_error_handler (Display *disp, XErrorEvent *errev)
static int | setup_dga (pgx64_driver_t *this)
static void | cleanup_dga (pgx64_driver_t *this)
static void | dispose_frame_internals (pgx64_frame_t *frame)
static void | update_colour_key_rgb (pgx64_driver_t *this)
static void | draw_overlays (pgx64_driver_t *this)
static void | repaint_output_area (pgx64_driver_t *this)
static void | vram_reset (pgx64_driver_t *this)
static int | vram_alloc (pgx64_driver_t *this, int size)
static void | pgx64_frame_proc_frame (vo_frame_t *frame_gen)
static void | pgx64_frame_proc_slice (vo_frame_t *frame_gen, uint8_t **src)
static void | pgx64_frame_field (vo_frame_t *frame_gen, int which_field)
static void | pgx64_frame_dispose (vo_frame_t *frame_gen)
static uint32_t | pgx64_get_capabilities (vo_driver_t *this_gen)
static vo_frame_t * | pgx64_alloc_frame (vo_driver_t *this_gen)
static void | pgx64_update_frame_format (vo_driver_t *this_gen, vo_frame_t *frame_gen, uint32_t width, uint32_t height, double ratio, int format, int flags)
static void | pgx64_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen)
static void | pgx64_overlay_begin (vo_driver_t *this_gen, vo_frame_t *frame_gen, int changed)
static void | pgx64_overlay_key_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay)
static void | pgx64_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay)
static void | pgx64_overlay_end (vo_driver_t *this_gen, vo_frame_t *frame_gen)
static int | pgx64_get_property (vo_driver_t *this_gen, int property)
static int | pgx64_set_property (vo_driver_t *this_gen, int property, int value)
static void | pgx64_get_property_min_max (vo_driver_t *this_gen, int property, int *min, int *max)
static int | pgx64_gui_data_exchange (vo_driver_t *this_gen, int data_type, void *data)
static int | pgx64_redraw_needed (vo_driver_t *this_gen)
static void | pgx64_dispose (vo_driver_t *this_gen)
static void | pgx64_config_changed (void *user_data, xine_cfg_entry_t *entry)
static vo_driver_t * | pgx64_init_driver (video_driver_class_t *class_gen, const void *visual_gen)
static void * | pgx64_init_class (xine_t *xine, const void *visual_gen)

## Variables
static const int | m64_bufaddr_regs_tbl [2][3]
static const int | pfb_bufaddr_regs_tbl [2][3]
static const vo_info_t | vo_info_pgx64
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ M64_BUS_CNTL

#define M64_BUS_CNTL 0x128

Referenced by pgx64_display_frame().

## ◆ M64_BUS_EXT_REG_EN

#define M64_BUS_EXT_REG_EN 0x08000000

Referenced by pgx64_display_frame().

## ◆ M64_CAPTURE_CONFIG

#define M64_CAPTURE_CONFIG 0x014

Referenced by pgx64_display_frame().

## ◆ M64_CAPTURE_CONFIG_BUF0

#define M64_CAPTURE_CONFIG_BUF0 0x00000000

Referenced by pgx64_display_frame().

## ◆ M64_CAPTURE_CONFIG_BUF1

#define M64_CAPTURE_CONFIG_BUF1 0x20000000

Referenced by pgx64_display_frame().

## ◆ M64_OVERLAY_EXCLUSIVE_EN

#define M64_OVERLAY_EXCLUSIVE_EN 0x80000000

Referenced by pgx64_display_frame().

## ◆ M64_OVERLAY_EXCLUSIVE_HORZ

#define M64_OVERLAY_EXCLUSIVE_HORZ 0x016

Referenced by pgx64_display_frame(), and pgx64_dispose().

## ◆ M64_OVERLAY_EXCLUSIVE_VERT

#define M64_OVERLAY_EXCLUSIVE_VERT 0x017

Referenced by pgx64_display_frame().

## ◆ M64_OVERLAY_GRAPHICS_KEY_CLR

#define M64_OVERLAY_GRAPHICS_KEY_CLR 0x004

Referenced by pgx64_display_frame().

## ◆ M64_OVERLAY_GRAPHICS_KEY_MSK

#define M64_OVERLAY_GRAPHICS_KEY_MSK 0x005

Referenced by pgx64_display_frame().

## ◆ M64_OVERLAY_KEY_CNTL

#define M64_OVERLAY_KEY_CNTL 0x006

Referenced by pgx64_display_frame().

## ◆ M64_OVERLAY_KEY_EN

#define M64_OVERLAY_KEY_EN 0x00000050

Referenced by pgx64_display_frame().

## ◆ M64_OVERLAY_SCALE_CNTL

#define M64_OVERLAY_SCALE_CNTL 0x009

Referenced by pgx64_display_frame(), and pgx64_dispose().

## ◆ M64_OVERLAY_SCALE_EN

#define M64_OVERLAY_SCALE_EN 0xC0000000

Referenced by pgx64_display_frame().

## ◆ M64_OVERLAY_SCALE_INC

#define M64_OVERLAY_SCALE_INC 0x008

Referenced by pgx64_display_frame().

## ◆ M64_OVERLAY_X_Y_END

#define M64_OVERLAY_X_Y_END 0x001

Referenced by pgx64_display_frame().

## ◆ M64_OVERLAY_X_Y_LOCK

#define M64_OVERLAY_X_Y_LOCK 0x80000000

Referenced by pgx64_display_frame().

## ◆ M64_OVERLAY_X_Y_START

#define M64_OVERLAY_X_Y_START 0x000

Referenced by pgx64_display_frame().

## ◆ M64_SCALER_BUF0_OFFSET

#define M64_SCALER_BUF0_OFFSET 0x00D

## ◆ M64_SCALER_BUF0_OFFSET_U

#define M64_SCALER_BUF0_OFFSET_U 0x075

## ◆ M64_SCALER_BUF0_OFFSET_V

#define M64_SCALER_BUF0_OFFSET_V 0x076

## ◆ M64_SCALER_BUF1_OFFSET

#define M64_SCALER_BUF1_OFFSET 0x00E

## ◆ M64_SCALER_BUF1_OFFSET_U

#define M64_SCALER_BUF1_OFFSET_U 0x077

## ◆ M64_SCALER_BUF1_OFFSET_V

#define M64_SCALER_BUF1_OFFSET_V 0x078

## ◆ M64_SCALER_BUF_PITCH

#define M64_SCALER_BUF_PITCH 0x00F

Referenced by pgx64_display_frame().

## ◆ M64_SCALER_COLOUR_CNTL

#define M64_SCALER_COLOUR_CNTL 0x054

Referenced by pgx64_display_frame().

## ◆ M64_SCALER_H_COEFF0

#define M64_SCALER_H_COEFF0 0x055

Referenced by pgx64_display_frame().

## ◆ M64_SCALER_H_COEFF0_DEFAULT

#define M64_SCALER_H_COEFF0_DEFAULT 0x00002000

Referenced by pgx64_display_frame().

## ◆ M64_SCALER_H_COEFF1

#define M64_SCALER_H_COEFF1 0x056

Referenced by pgx64_display_frame().

## ◆ M64_SCALER_H_COEFF1_DEFAULT

#define M64_SCALER_H_COEFF1_DEFAULT 0x0D06200D

Referenced by pgx64_display_frame().

## ◆ M64_SCALER_H_COEFF2

#define M64_SCALER_H_COEFF2 0x057

Referenced by pgx64_display_frame().

## ◆ M64_SCALER_H_COEFF2_DEFAULT

#define M64_SCALER_H_COEFF2_DEFAULT 0x0D0A1C0D

Referenced by pgx64_display_frame().

## ◆ M64_SCALER_H_COEFF3

#define M64_SCALER_H_COEFF3 0x058

Referenced by pgx64_display_frame().

## ◆ M64_SCALER_H_COEFF3_DEFAULT

#define M64_SCALER_H_COEFF3_DEFAULT 0x0C0E1A0C

Referenced by pgx64_display_frame().

## ◆ M64_SCALER_H_COEFF4

#define M64_SCALER_H_COEFF4 0x059

Referenced by pgx64_display_frame().

## ◆ M64_SCALER_H_COEFF4_DEFAULT

#define M64_SCALER_H_COEFF4_DEFAULT 0x0C14140C

Referenced by pgx64_display_frame().

## ◆ M64_SCALER_HEIGHT_WIDTH

#define M64_SCALER_HEIGHT_WIDTH 0x00A

Referenced by pgx64_display_frame().

## ◆ M64_VIDEO_FORMAT

#define M64_VIDEO_FORMAT 0x012

Referenced by pgx64_display_frame().

## ◆ M64_VIDEO_FORMAT_VYUY422

#define M64_VIDEO_FORMAT_VYUY422 0x000B0000

Referenced by pgx64_init_driver().

## ◆ M64_VIDEO_FORMAT_YUV12

#define M64_VIDEO_FORMAT_YUV12 0x000A0000

Referenced by pgx64_init_driver().

## ◆ M64_VRAM_MMAPBASE

#define M64_VRAM_MMAPBASE 0x00000000

## ◆ M64_VRAM_MMAPLEN

#define M64_VRAM_MMAPLEN 0x00800000

Referenced by pgx64_dispose(), and pgx64_init_driver().

## ◆ MAX_DETAINED_FRAMES

#define MAX_DETAINED_FRAMES 10

Referenced by pgx64_display_frame().

## ◆ MAX_MULTIBUF_FRAMES

#define MAX_MULTIBUF_FRAMES 15

Referenced by pgx64_display_frame().

## ◆ PFB_CLOCK_CNTL_DATA

#define PFB_CLOCK_CNTL_DATA 0x003

Referenced by pgx64_display_frame().

## ◆ PFB_CLOCK_CNTL_INDEX

#define PFB_CLOCK_CNTL_INDEX 0x002

Referenced by pgx64_display_frame().

## ◆ PFB_DISP_MERGE_CNTL

#define PFB_DISP_MERGE_CNTL 0x358

Referenced by pgx64_display_frame().

## ◆ PFB_DISP_MERGE_EN

#define PFB_DISP_MERGE_EN 0xffff0000

Referenced by pgx64_display_frame().

## ◆ PFB_MC_FB_LOCATION

#define PFB_MC_FB_LOCATION 0x052

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_AUTO_FLIP_BUF0

#define PFB_OV0_AUTO_FLIP_BUF0 0x00000200

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_AUTO_FLIP_BUF3

#define PFB_OV0_AUTO_FLIP_BUF3 0x00000243

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_AUTO_FLIP_CNTL

#define PFB_OV0_AUTO_FLIP_CNTL 0x11C

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_BASE_ADDR

#define PFB_OV0_BASE_ADDR 0x10F

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_BUF0_BASE_ADRS

#define PFB_OV0_BUF0_BASE_ADRS 0x110

## ◆ PFB_OV0_BUF1_BASE_ADRS

#define PFB_OV0_BUF1_BASE_ADRS 0x111

## ◆ PFB_OV0_BUF2_BASE_ADRS

#define PFB_OV0_BUF2_BASE_ADRS 0x112

## ◆ PFB_OV0_BUF3_BASE_ADRS

#define PFB_OV0_BUF3_BASE_ADRS 0x113

## ◆ PFB_OV0_BUF4_BASE_ADRS

#define PFB_OV0_BUF4_BASE_ADRS 0x114

## ◆ PFB_OV0_BUF5_BASE_ADRS

#define PFB_OV0_BUF5_BASE_ADRS 0x115

## ◆ PFB_OV0_DEINTERLACE_PATTERN

#define PFB_OV0_DEINTERLACE_PATTERN 0x11D

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_FILTER_CNTL

#define PFB_OV0_FILTER_CNTL 0x128

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_FILTER_EN

#define PFB_OV0_FILTER_EN 0x0000000f

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_GRPH_KEY_CLR_HIGH

#define PFB_OV0_GRPH_KEY_CLR_HIGH 0x13C

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_GRPH_KEY_CLR_LOW

#define PFB_OV0_GRPH_KEY_CLR_LOW 0x13B

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_H_INC

#define PFB_OV0_H_INC 0x120

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_KEY_CNTL

#define PFB_OV0_KEY_CNTL 0x13D

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_KEY_EN

#define PFB_OV0_KEY_EN 0x00000121

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_P1_BLANK_LINES_AT_TOP

#define PFB_OV0_P1_BLANK_LINES_AT_TOP 0x10C

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_P1_H_ACCUM_INIT

#define PFB_OV0_P1_H_ACCUM_INIT 0x122

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_P1_V_ACCUM_INIT

#define PFB_OV0_P1_V_ACCUM_INIT 0x10A

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_P1_X_START_END

#define PFB_OV0_P1_X_START_END 0x125

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_P23_BLANK_LINES_AT_TOP

#define PFB_OV0_P23_BLANK_LINES_AT_TOP 0x10D

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_P23_H_ACCUM_INIT

#define PFB_OV0_P23_H_ACCUM_INIT 0x123

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_P23_V_ACCUM_INIT

#define PFB_OV0_P23_V_ACCUM_INIT 0x10B

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_P2_X_START_END

#define PFB_OV0_P2_X_START_END 0x126

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_P3_X_START_END

#define PFB_OV0_P3_X_START_END 0x127

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_REG_LOAD_CNTL

#define PFB_OV0_REG_LOAD_CNTL 0x104

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_REG_LOAD_LOCK

#define PFB_OV0_REG_LOAD_LOCK 0x00000001

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_REG_LOAD_LOCK_READBACK

#define PFB_OV0_REG_LOAD_LOCK_READBACK 0x00000008

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_SCALE_CNTL

#define PFB_OV0_SCALE_CNTL 0x108

Referenced by pgx64_display_frame(), and pgx64_dispose().

## ◆ PFB_OV0_SCALE_EN

#define PFB_OV0_SCALE_EN 0x417f0000

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_SCALE_VYUY422

#define PFB_OV0_SCALE_VYUY422 0x00000B00

Referenced by pgx64_init_driver().

## ◆ PFB_OV0_SCALE_YUV12

#define PFB_OV0_SCALE_YUV12 0x00000A00

Referenced by pgx64_init_driver().

## ◆ PFB_OV0_STEP_BY

#define PFB_OV0_STEP_BY 0x121

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_V_INC

#define PFB_OV0_V_INC 0x109

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_VID_BUF_PITCH0_VALUE

#define PFB_OV0_VID_BUF_PITCH0_VALUE 0x118

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_VID_BUF_PITCH1_VALUE

#define PFB_OV0_VID_BUF_PITCH1_VALUE 0x119

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_Y_X_END

#define PFB_OV0_Y_X_END 0x101

Referenced by pgx64_display_frame().

## ◆ PFB_OV0_Y_X_START

#define PFB_OV0_Y_X_START 0x100

Referenced by pgx64_display_frame().

## ◆ PFB_REGS_MMAPBASE

#define PFB_REGS_MMAPBASE 0x10000000

Referenced by pgx64_init_driver().

## ◆ PFB_REGS_MMAPLEN

#define PFB_REGS_MMAPLEN 0x00040000

Referenced by pgx64_dispose(), and pgx64_init_driver().

## ◆ PFB_VRAM_MMAPBASE

#define PFB_VRAM_MMAPBASE 0x08000000

Referenced by pgx64_init_driver().

## ◆ PFB_VRAM_MMAPLEN

#define PFB_VRAM_MMAPLEN 0x02000000

Referenced by pgx64_dispose(), and pgx64_init_driver().

## ◆ saturate

#define saturate | ( |  | n,
|  |  | l,
|  |  | u ) ((n) < (l) ? (l) : ((n) > (u) ? (u) : (n)))

Referenced by lineNoise_MMX(), lineNoise_MMX2(), and pgx64_overlay_key_blend().

## ◆ scale_down

#define scale_down | ( |  | n | ) | ((n) >> 16)

Referenced by pgx64_overlay_key_blend().

## ◆ scale_up

#define scale_up | ( |  | n | ) | ((n) << 16)

Referenced by pgx64_overlay_key_blend().

## Typedef Documentation

## ◆ pgx64_overlay_t

typedef struct pgx64_overlay_s pgx64_overlay_t

## Enumeration Type Documentation

## ◆ buf_mode_t

enum buf_mode_t

Enumerator
BUF_MODE_MULTI |
BUF_MODE_MULTI_FAILED |
BUF_MODE_SINGLE |
BUF_MODE_DOUBLE |

## ◆ fb_type_t

enum fb_type_t

Enumerator
FB_TYPE_M64 |
FB_TYPE_PFB |

## Function Documentation

## ◆ cleanup_dga()

static void cleanup_dga | ( | pgx64_driver_t * | this | ) |
| static

Referenced by pgx64_dispose(), pgx64_gui_data_exchange(), and pgx64_init_driver().

## ◆ dispose_frame_internals()

static void dispose_frame_internals | ( | pgx64_frame_t * | frame | ) |
| static

References vo_frame_s::base, NULL, and pgx64_frame_t::vo_frame.

Referenced by pgx64_frame_dispose(), and pgx64_update_frame_format().

## ◆ draw_overlays()

static void draw_overlays | ( | pgx64_driver_t * | this | ) |
| static

References pgx64_overlay_s::height, pgx64_overlay_s::next, NULL, pgx64_overlay_s::p, pgx64_overlay_s::width, pgx64_overlay_s::x, and pgx64_overlay_s::y.

Referenced by pgx64_overlay_end(), and repaint_output_area().

## ◆ dummy_error_handler()

static int dummy_error_handler | ( | Display * | disp,
|  | XErrorEvent * | errev )
| static

Referenced by setup_dga().

## ◆ pgx64_alloc_frame()

static vo_frame_t * pgx64_alloc_frame | ( | vo_driver_t * | this_gen | ) |
| static

References vo_frame_s::dispose, vo_frame_s::field, vo_frame_s::mutex, NULL, pgx64_frame_dispose(), pgx64_frame_field(), vo_frame_s::proc_frame, vo_frame_s::proc_slice, and pgx64_frame_t::vo_frame.

Referenced by pgx64_init_driver().

## ◆ pgx64_config_changed()

static void pgx64_config_changed | ( | void * | user_data,
|  | xine_cfg_entry_t * | entry )
| static

References xine_cfg_entry_s::key, xine_cfg_entry_s::num_value, pgx64_set_property(), update_colour_key_rgb(), user_data(), and VO_PROP_COLORKEY.

Referenced by pgx64_init_driver().

## ◆ pgx64_display_frame()

static void pgx64_display_frame | ( | vo_driver_t * | this_gen,
|  | vo_frame_t * | frame_gen )
| static

References _, _x_assert, _x_vo_scale_compute_ideal_size(), _x_vo_scale_compute_output_size(), _x_vo_scale_redraw_needed(), vo_frame_s::base, BUF_MODE_DOUBLE, BUF_MODE_MULTI, BUF_MODE_MULTI_FAILED, BUF_MODE_SINGLE, pgx64_frame_t::buffer_ptrs, pgx64_frame_t::buffers, FB_TYPE_M64, FB_TYPE_PFB, pgx64_frame_t::format, vo_frame_s::free, pgx64_frame_t::height, le2me_32, pgx64_frame_t::lengths, m64_bufaddr_regs_tbl, M64_BUS_CNTL, M64_BUS_EXT_REG_EN, M64_CAPTURE_CONFIG, M64_CAPTURE_CONFIG_BUF0, M64_CAPTURE_CONFIG_BUF1, M64_OVERLAY_EXCLUSIVE_EN, M64_OVERLAY_EXCLUSIVE_HORZ, M64_OVERLAY_EXCLUSIVE_VERT, M64_OVERLAY_GRAPHICS_KEY_CLR, M64_OVERLAY_GRAPHICS_KEY_MSK, M64_OVERLAY_KEY_CNTL, M64_OVERLAY_KEY_EN, M64_OVERLAY_SCALE_CNTL, M64_OVERLAY_SCALE_EN, M64_OVERLAY_SCALE_INC, M64_OVERLAY_X_Y_END, M64_OVERLAY_X_Y_LOCK, M64_OVERLAY_X_Y_START, M64_SCALER_BUF_PITCH, M64_SCALER_COLOUR_CNTL, M64_SCALER_H_COEFF0, M64_SCALER_H_COEFF0_DEFAULT, M64_SCALER_H_COEFF1, M64_SCALER_H_COEFF1_DEFAULT, M64_SCALER_H_COEFF2, M64_SCALER_H_COEFF2_DEFAULT, M64_SCALER_H_COEFF3, M64_SCALER_H_COEFF3_DEFAULT, M64_SCALER_H_COEFF4, M64_SCALER_H_COEFF4_DEFAULT, M64_SCALER_HEIGHT_WIDTH, M64_VIDEO_FORMAT, MAX_DETAINED_FRAMES, MAX_MULTIBUF_FRAMES, pgx64_frame_t::native_format, NULL, pfb_bufaddr_regs_tbl, PFB_CLOCK_CNTL_DATA, PFB_CLOCK_CNTL_INDEX, PFB_DISP_MERGE_CNTL, PFB_DISP_MERGE_EN, PFB_MC_FB_LOCATION, PFB_OV0_AUTO_FLIP_BUF0, PFB_OV0_AUTO_FLIP_BUF3, PFB_OV0_AUTO_FLIP_CNTL, PFB_OV0_BASE_ADDR, PFB_OV0_DEINTERLACE_PATTERN, PFB_OV0_FILTER_CNTL, PFB_OV0_FILTER_EN, PFB_OV0_GRPH_KEY_CLR_HIGH, PFB_OV0_GRPH_KEY_CLR_LOW, PFB_OV0_H_INC, PFB_OV0_KEY_CNTL, PFB_OV0_KEY_EN, PFB_OV0_P1_BLANK_LINES_AT_TOP, PFB_OV0_P1_H_ACCUM_INIT, PFB_OV0_P1_V_ACCUM_INIT, PFB_OV0_P1_X_START_END, PFB_OV0_P23_BLANK_LINES_AT_TOP, PFB_OV0_P23_H_ACCUM_INIT, PFB_OV0_P23_V_ACCUM_INIT, PFB_OV0_P2_X_START_END, PFB_OV0_P3_X_START_END, PFB_OV0_REG_LOAD_CNTL, PFB_OV0_REG_LOAD_LOCK, PFB_OV0_REG_LOAD_LOCK_READBACK, PFB_OV0_SCALE_CNTL, PFB_OV0_SCALE_EN, PFB_OV0_STEP_BY, PFB_OV0_V_INC, PFB_OV0_VID_BUF_PITCH0_VALUE, PFB_OV0_VID_BUF_PITCH1_VALUE, PFB_OV0_Y_X_END, PFB_OV0_Y_X_START, pgx64_frame_proc_frame(), pgx64_frame_proc_slice(), pgx64_frame_t::pitch, vo_frame_s::pitches, pgx64_frame_t::planes, vo_frame_s::proc_frame, vo_frame_s::proc_slice, pgx64_frame_t::procs_en, pgx64_frame_t::ratio, repaint_output_area(), pgx64_frame_t::vo_frame, vram_alloc(), vram_reset(), pgx64_frame_t::width, XINE_VERBOSITY_LOG, and xprintf.

Referenced by pgx64_init_driver().

## ◆ pgx64_dispose()

static void pgx64_dispose | ( | vo_driver_t * | this_gen | ) |
| static

References _x_alphablend_free(), _x_vo_scale_cleanup(), cleanup_dga(), FB_TYPE_M64, FB_TYPE_PFB, M64_OVERLAY_EXCLUSIVE_HORZ, M64_OVERLAY_SCALE_CNTL, M64_VRAM_MMAPLEN, PFB_OV0_SCALE_CNTL, PFB_REGS_MMAPLEN, and PFB_VRAM_MMAPLEN.

Referenced by pgx64_init_driver().

## ◆ pgx64_frame_dispose()

static void pgx64_frame_dispose | ( | vo_frame_t * | frame_gen | ) |
| static

References dispose_frame_internals().

Referenced by pgx64_alloc_frame().

## ◆ pgx64_frame_field()

static void pgx64_frame_field | ( | vo_frame_t * | frame_gen,
|  | int | which_field )
| static

Referenced by pgx64_alloc_frame().

## ◆ pgx64_frame_proc_frame()

static void pgx64_frame_proc_frame | ( | vo_frame_t * | frame_gen | ) |
| static

References vo_frame_s::base, pgx64_frame_t::buffer_ptrs, pgx64_frame_t::lengths, NULL, pgx64_frame_t::planes, vo_frame_s::proc_called, vo_frame_s::proc_frame, vo_frame_s::proc_slice, pgx64_frame_t::procs_en, and pgx64_frame_t::vo_frame.

Referenced by pgx64_display_frame().

## ◆ pgx64_frame_proc_slice()

static void pgx64_frame_proc_slice | ( | vo_frame_t * | frame_gen,
|  | uint8_t ** | src )
| static

References pgx64_frame_t::buffer_ptrs, pgx64_frame_t::lengths, NULL, pgx64_frame_t::planes, vo_frame_s::proc_called, vo_frame_s::proc_frame, vo_frame_s::proc_slice, pgx64_frame_t::procs_en, pgx64_frame_t::stripe_lengths, pgx64_frame_t::stripe_offsets, and pgx64_frame_t::vo_frame.

Referenced by pgx64_display_frame(), and pgx64_overlay_blend().

## ◆ pgx64_get_capabilities()

static uint32_t pgx64_get_capabilities | ( | vo_driver_t * | this_gen | ) |
| static

References VO_CAP_BRIGHTNESS, VO_CAP_SATURATION, VO_CAP_YUY2, and VO_CAP_YV12.

Referenced by pgx64_init_driver().

## ◆ pgx64_get_property()

static int pgx64_get_property | ( | vo_driver_t * | this_gen,
|  | int | property )
| static

References VO_PROP_ASPECT_RATIO, VO_PROP_BRIGHTNESS, VO_PROP_COLORKEY, VO_PROP_INTERLACED, and VO_PROP_SATURATION.

Referenced by pgx64_init_driver().

## ◆ pgx64_get_property_min_max()

static void pgx64_get_property_min_max | ( | vo_driver_t * | this_gen,
|  | int | property,
|  | int * | min,
|  | int * | max )
| static

References VO_PROP_BRIGHTNESS, VO_PROP_COLORKEY, and VO_PROP_SATURATION.

Referenced by pgx64_init_driver().

## ◆ pgx64_gui_data_exchange()

static int pgx64_gui_data_exchange | ( | vo_driver_t * | this_gen,
|  | int | data_type,
|  | void * | data )
| static

References _x_abort, _x_vo_scale_translate_gui2video(), cleanup_dga(), x11_rectangle_t::h, repaint_output_area(), setup_dga(), x11_rectangle_t::w, x11_rectangle_t::x, XINE_GUI_SEND_DRAWABLE_CHANGED, XINE_GUI_SEND_EXPOSE_EVENT, XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO, and x11_rectangle_t::y.

Referenced by pgx64_init_driver().

## ◆ pgx64_init_class()

static void * pgx64_init_class | ( | xine_t * | xine,
|  | const void * | visual_gen )
| static

References default_video_driver_class_dispose, N_, NULL, and pgx64_init_driver().

## ◆ pgx64_init_driver()

static vo_driver_t * pgx64_init_driver | ( | video_driver_class_t * | class_gen,
|  | const void * | visual_gen )
| static

References _, _x_alphablend_init(), _x_vo_scale_cleanup(), _x_vo_scale_init(), cleanup_dga(), xine_s::config, vo_frame_s::dispose, FB_TYPE_M64, FB_TYPE_PFB, M64_VIDEO_FORMAT_VYUY422, M64_VIDEO_FORMAT_YUV12, M64_VRAM_MMAPLEN, NULL, PFB_OV0_SCALE_VYUY422, PFB_OV0_SCALE_YUV12, PFB_REGS_MMAPBASE, PFB_REGS_MMAPLEN, PFB_VRAM_MMAPBASE, PFB_VRAM_MMAPLEN, pgx64_alloc_frame(), pgx64_config_changed(), pgx64_display_frame(), pgx64_dispose(), pgx64_get_capabilities(), pgx64_get_property(), pgx64_get_property_min_max(), pgx64_gui_data_exchange(), pgx64_overlay_begin(), pgx64_overlay_blend(), pgx64_overlay_end(), pgx64_redraw_needed(), pgx64_set_property(), pgx64_update_frame_format(), config_values_s::register_bool, config_values_s::register_num, setup_dga(), update_colour_key_rgb(), config_values_s::xine, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, XINE_VO_ASPECT_AUTO, and xprintf.

Referenced by pgx64_init_class().

## ◆ pgx64_overlay_begin()

static void pgx64_overlay_begin | ( | vo_driver_t * | this_gen,
|  | vo_frame_t * | frame_gen,
|  | int | changed )
| static

References pgx64_overlay_s::height, pgx64_overlay_s::next, NULL, vo_frame_s::overlay_offset_x, vo_frame_s::overlay_offset_y, pgx64_overlay_s::p, pgx64_overlay_s::width, pgx64_overlay_s::x, and pgx64_overlay_s::y.

Referenced by pgx64_init_driver().

## ◆ pgx64_overlay_blend()

static void pgx64_overlay_blend | ( | vo_driver_t * | this_gen,
|  | vo_frame_t * | frame_gen,
|  | vo_overlay_t * | overlay )
| static

References _x_blend_yuv(), _x_blend_yuy2(), vo_frame_s::base, pgx64_frame_t::buffer_ptrs, pgx64_frame_t::format, pgx64_frame_t::height, pgx64_frame_proc_slice(), pgx64_overlay_key_blend(), vo_frame_s::pitches, vo_frame_s::proc_slice, vo_overlay_s::rle, pgx64_frame_t::vo_frame, pgx64_frame_t::width, XINE_IMGFMT_YUY2, and XINE_IMGFMT_YV12.

Referenced by pgx64_init_driver().

## ◆ pgx64_overlay_end()

static void pgx64_overlay_end | ( | vo_driver_t * | this_gen,
|  | vo_frame_t * | frame_gen )
| static

References draw_overlays().

Referenced by pgx64_init_driver().

## ◆ pgx64_overlay_key_blend()

static void pgx64_overlay_key_blend | ( | vo_driver_t * | this_gen,
|  | vo_frame_t * | frame_gen,
|  | vo_overlay_t * | overlay )
| static

References rle_elem_s::color, vo_overlay_s::color, height, pgx64_frame_t::height, pgx64_overlay_s::height, vo_overlay_s::height, vo_overlay_s::hili_color, vo_overlay_s::hili_left, vo_overlay_s::hili_right, vo_overlay_s::hili_top, vo_overlay_s::hili_trans, rle_elem_s::len, pgx64_overlay_s::next, NULL, vo_overlay_s::num_rle, OVL_PALETTE_SIZE, pgx64_overlay_s::p, vo_overlay_s::rle, saturate, scale_down, scale_up, vo_overlay_s::trans, v, pgx64_frame_t::width, pgx64_overlay_s::width, vo_overlay_s::width, width, pgx64_overlay_s::x, vo_overlay_s::x, XINE_VERBOSITY_DEBUG, xprintf, pgx64_overlay_s::y, and vo_overlay_s::y.

Referenced by pgx64_overlay_blend().

## ◆ pgx64_redraw_needed()

static int pgx64_redraw_needed | ( | vo_driver_t * | this_gen | ) |
| static

References _x_vo_scale_redraw_needed().

Referenced by pgx64_init_driver().

## ◆ pgx64_set_property()

static int pgx64_set_property | ( | vo_driver_t * | this_gen,
|  | int | property,
|  | int | value )
| static

References _x_vo_scale_compute_ideal_size(), VO_PROP_ASPECT_RATIO, VO_PROP_BRIGHTNESS, VO_PROP_COLORKEY, VO_PROP_INTERLACED, VO_PROP_SATURATION, XINE_VO_ASPECT_AUTO, and XINE_VO_ASPECT_NUM_RATIOS.

Referenced by pgx64_config_changed(), and pgx64_init_driver().

## ◆ pgx64_update_frame_format()

static void pgx64_update_frame_format | ( | vo_driver_t * | this_gen,
|  | vo_frame_t * | frame_gen,
|  | uint32_t | width,
|  | uint32_t | height,
|  | double | ratio,
|  | int | format,
|  | int | flags )
| static

References _x_abort, vo_frame_s::base, dispose_frame_internals(), pgx64_frame_t::format, height, pgx64_frame_t::height, pgx64_frame_t::lengths, pgx64_frame_t::native_format, pgx64_frame_t::pitch, vo_frame_s::pitches, pgx64_frame_t::planes, pgx64_frame_t::procs_en, pgx64_frame_t::ratio, pgx64_frame_t::stripe_lengths, pgx64_frame_t::stripe_offsets, pgx64_frame_t::vo_frame, pgx64_frame_t::width, width, XINE_IMGFMT_YUY2, XINE_IMGFMT_YV12, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by pgx64_init_driver().

## ◆ repaint_output_area()

static void repaint_output_area | ( | pgx64_driver_t * | this | ) |
| static

References draw_overlays().

Referenced by pgx64_display_frame(), and pgx64_gui_data_exchange().

## ◆ setup_dga()

static int setup_dga | ( | pgx64_driver_t * | this | ) |
| static

References _, dummy_error_handler(), FB_TYPE_M64, FB_TYPE_PFB, NULL, xine_open_cloexec(), XINE_VERBOSITY_LOG, and xprintf.

Referenced by pgx64_gui_data_exchange(), and pgx64_init_driver().

## ◆ update_colour_key_rgb()

static void update_colour_key_rgb | ( | pgx64_driver_t * | this | ) |
| static

Referenced by pgx64_config_changed(), and pgx64_init_driver().

## ◆ vram_alloc()

static int vram_alloc | ( | pgx64_driver_t * | this,
|  | int | size )
| static

Referenced by pgx64_display_frame().

## ◆ vram_reset()

static void vram_reset | ( | pgx64_driver_t * | this | ) |
| static

Referenced by pgx64_display_frame().

## Variable Documentation

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{PLUGIN_VIDEO_OUT, 22, "pgx64", XINE_VERSION_CODE, &vo_info_pgx64, pgx64_init_class},
{PLUGIN_NONE, 0, NULL, 0, NULL, NULL}
}
vo_info_pgx64
static const vo_info_t vo_info_pgx64
Definition video_out_pgx64.c:1334
pgx64_init_class
static void * pgx64_init_class(xine_t *xine, const void *visual_gen)
Definition video_out_pgx64.c:1475
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition xine_internal.h:57
NULL
NULL
Definition xine_plugin.c:78
PLUGIN_NONE
#define PLUGIN_NONE
Definition xine_plugin.h:29
PLUGIN_VIDEO_OUT
#define PLUGIN_VIDEO_OUT
Definition xine_plugin.h:36

## ◆ m64_bufaddr_regs_tbl

const int m64_bufaddr_regs_tbl[2][3]
| static

Initial value:
= {
{ 0x00D , 0x075 , 0x076 },
{ 0x00E , 0x077 , 0x078 }
}

Referenced by pgx64_display_frame().

## ◆ pfb_bufaddr_regs_tbl

const int pfb_bufaddr_regs_tbl[2][3]
| static

Initial value:
= {
{ 0x110 , 0x111 , 0x112 },
{ 0x113 , 0x114 , 0x115 },
}

Referenced by pgx64_display_frame().

## ◆ vo_info_pgx64

const vo_info_t vo_info_pgx64
| static

Initial value:
= {
.priority = 10,
.visual_type = XINE_VISUAL_TYPE_X11,
}
XINE_VISUAL_TYPE_X11
#define XINE_VISUAL_TYPE_X11
Definition xine.h:154