unsigned long gfx_vid_offset = 0;
unsigned long gfx_vid_uoffset = 0;
unsigned long gfx_vid_voffset = 0;
unsigned long gfx_vid_srcw = 300;
unsigned long gfx_vid_srch = 300;
unsigned long gfx_vid_dstw = 300;
unsigned long gfx_vid_dsth = 300;
short gfx_vid_xpos = 0;
short gfx_vid_ypos = 0;
unsigned short gfx_vid_width = 0;
unsigned short gfx_vid_height = 0;
int gfx_alpha_select = 0;
int gfx_set_screen_enable(int enable);
#if GFX_VIDEO_CS5530
#include "vid_5530.c"
#endif
#if GFX_VIDEO_SC1200
#include "vid_1200.c"
#endif
#if GFX_VIDEO_REDCLOUD
#include "vid_rdcl.c"
#endif
int
gfx_select_alpha_region(int region)
{
if (region > 2)
return (GFX_STATUS_BAD_PARAMETER);
gfx_alpha_select = region;
return (GFX_STATUS_OK);
}
#if GFX_VIDEO_DYNAMIC
void
gfx_reset_video(void)
{
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
cs5530_reset_video();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
sc1200_reset_video();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_reset_video();
# endif
}
int
gfx_set_display_control(int sync_polarities)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
status = cs5530_set_display_control(sync_polarities);
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_display_control(sync_polarities);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_display_control(sync_polarities);
# endif
return (status);
}
void
gfx_set_clock_frequency(unsigned long frequency)
{
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
cs5530_set_clock_frequency(frequency);
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
sc1200_set_clock_frequency(frequency);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_set_clock_frequency(frequency);
# endif
}
int
gfx_set_crt_enable(int enable)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_crt_enable(enable);
# endif
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
status = cs5530_set_crt_enable(enable);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_crt_enable(enable);
# endif
return (status);
}
int
gfx_set_video_enable(int enable)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
status = cs5530_set_video_enable(enable);
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_enable(enable);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_enable(enable);
# endif
return (status);
}
int
gfx_set_screen_enable(int enable)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_screen_enable(enable);
# endif
return (status);
}
int
gfx_set_video_format(unsigned long format)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
status = cs5530_set_video_format(format);
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_format(format);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_format(format);
# endif
return (status);
}
int
gfx_set_video_size(unsigned short width, unsigned short height)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
status = cs5530_set_video_size(width, height);
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_size(width, height);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_size(width, height);
# endif
return (status);
}
int
gfx_set_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_yuv_pitch(ypitch, uvpitch);
# endif
return (status);
}
int
gfx_set_video_offset(unsigned long offset)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
status = cs5530_set_video_offset(offset);
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_offset(offset);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_offset(offset);
# endif
return (status);
}
int
gfx_set_video_yuv_offsets(unsigned long yoffset, unsigned long uoffset,
unsigned long voffset)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_yuv_offsets(yoffset, uoffset, voffset);
# endif
return (status);
}
int
gfx_set_video_scale(unsigned short srcw, unsigned short srch,
unsigned short dstw, unsigned short dsth)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
status = cs5530_set_video_scale(srcw, srch, dstw, dsth);
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_scale(srcw, srch, dstw, dsth);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_scale(srcw, srch, dstw, dsth);
# endif
return (status);
}
int
gfx_set_video_upscale(unsigned short srcw, unsigned short srch,
unsigned short dstw, unsigned short dsth)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_upscale(srcw, srch, dstw, dsth);
# endif
return (status);
}
int
gfx_set_video_vertical_downscale(unsigned short srch, unsigned short dsth)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_vertical_downscale(srch, dsth);
# endif
return (status);
}
void
gfx_set_video_vertical_downscale_enable(int enable)
{
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_set_video_vertical_downscale_enable(enable);
# endif
}
int
gfx_set_video_downscale_config(unsigned short type, unsigned short m)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_downscale_config(type, m);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_downscale_config(type, m);
# endif
return (status);
}
int
gfx_set_video_downscale_coefficients(unsigned short coef1,
unsigned short coef2,
unsigned short coef3,
unsigned short coef4)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status =
sc1200_set_video_downscale_coefficients(coef1, coef2, coef3,
coef4);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status =
redcloud_set_video_downscale_coefficients(coef1, coef2, coef3,
coef4);
# endif
return (status);
}
int
gfx_set_video_downscale_enable(int enable)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_downscale_enable(enable);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_downscale_enable(enable);
# endif
return (status);
}
int
gfx_set_video_window(short x, short y, unsigned short w, unsigned short h)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
status = cs5530_set_video_window(x, y, w, h);
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_window(x, y, w, h);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_window(x, y, w, h);
# endif
return (status);
}
int
gfx_set_video_left_crop(unsigned short x)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_left_crop(x);
# endif
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
status = cs5530_set_video_left_crop(x);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_left_crop(x);
# endif
return (status);
}
int
gfx_set_video_color_key(unsigned long key, unsigned long mask, int graphics)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
status = cs5530_set_video_color_key(key, mask, graphics);
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_color_key(key, mask, graphics);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_color_key(key, mask, graphics);
# endif
return (status);
}
int
gfx_set_video_filter(int xfilter, int yfilter)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
status = cs5530_set_video_filter(xfilter, yfilter);
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_filter(xfilter, yfilter);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_filter(xfilter, yfilter);
# endif
return (status);
}
int
gfx_set_video_palette(unsigned long *palette)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
status = cs5530_set_video_palette(palette);
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_palette(palette);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_palette(palette);
# endif
return (status);
}
int
gfx_set_video_palette_entry(unsigned long index, unsigned long palette)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
status = cs5530_set_video_palette_entry(index, palette);
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_palette_entry(index, palette);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_palette_entry(index, palette);
# endif
return (status);
}
int
gfx_set_video_request(short x, short y)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_request(x, y);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_request(x, y);
# endif
return (status);
}
int
gfx_set_video_source(VideoSourceType source)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_source(source);
# endif
return (status);
}
int
gfx_set_vbi_source(VbiSourceType source)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_vbi_source(source);
# endif
return (status);
}
int
gfx_set_vbi_lines(unsigned long even, unsigned long odd)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_vbi_lines(even, odd);
# endif
return (status);
}
int
gfx_set_vbi_total(unsigned long even, unsigned long odd)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_vbi_total(even, odd);
# endif
return (status);
}
int
gfx_set_video_interlaced(int enable)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_video_interlaced(enable);
# endif
return (status);
}
int
gfx_set_color_space_YUV(int enable)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_color_space_YUV(enable);
# endif
return (status);
}
int
gfx_set_vertical_scaler_offset(char offset)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_vertical_scaler_offset(offset);
# endif
return (status);
}
int
gfx_set_top_line_in_odd(int enable)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_top_line_in_odd(enable);
# endif
return (status);
}
int
gfx_set_genlock_delay(unsigned long delay)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_genlock_delay(delay);
# endif
return (status);
}
int
gfx_set_genlock_enable(int flags)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_genlock_enable(flags);
# endif
return (status);
}
int
gfx_set_video_cursor(unsigned long key, unsigned long mask,
unsigned short select_color2, unsigned long color1,
unsigned long color2)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status =
sc1200_set_video_cursor(key, mask, select_color2, color1, color2);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status =
redcloud_set_video_cursor(key, mask, select_color2, color1,
color2);
# endif
return (status);
}
int
gfx_set_video_cursor_enable(int enable)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_video_cursor_enable(enable);
# endif
return (status);
}
int
gfx_set_alpha_enable(int enable)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_alpha_enable(enable);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_alpha_enable(enable);
# endif
return (status);
}
int
gfx_set_alpha_window(short x, short y,
unsigned short width, unsigned short height)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_alpha_window(x, y, width, height);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_alpha_window(x, y, width, height);
# endif
return (status);
}
int
gfx_set_alpha_value(unsigned char alpha, char delta)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_alpha_value(alpha, delta);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_alpha_value(alpha, delta);
# endif
return (status);
}
int
gfx_set_alpha_priority(int priority)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_alpha_priority(priority);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_alpha_priority(priority);
# endif
return (status);
}
int
gfx_set_alpha_color(unsigned long color)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_alpha_color(color);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_alpha_color(color);
# endif
return (status);
}
int
gfx_set_alpha_color_enable(int enable)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_alpha_color_enable(enable);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_alpha_color_enable(enable);
# endif
return (status);
}
int
gfx_set_no_ck_outside_alpha(int enable)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_no_ck_outside_alpha(enable);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_set_no_ck_outside_alpha(enable);
# endif
return (status);
}
int
gfx_set_macrovision_enable(int enable)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_set_macrovision_enable(enable);
# endif
return (status);
}
int
gfx_disable_softvga(void)
{
int status = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
status = cs5530_disable_softvga();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_disable_softvga();
# endif
return (status);
}
int
gfx_enable_softvga(void)
{
int status = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
status = cs5530_enable_softvga();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_enable_softvga();
# endif
return (status);
}
unsigned long
gfx_get_clock_frequency(void)
{
unsigned long frequency = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
frequency = cs5530_get_clock_frequency();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
frequency = sc1200_get_clock_frequency();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
frequency = redcloud_get_clock_frequency();
# endif
return (frequency);
}
#if GFX_READ_ROUTINES
int
gfx_get_vsa2_softvga_enable(void)
{
int enable = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
enable = cs5530_get_vsa2_softvga_enable();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
enable = sc1200_get_vsa2_softvga_enable();
# endif
return enable;
}
int
gfx_get_sync_polarities(void)
{
int polarities = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
polarities = cs5530_get_sync_polarities();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
polarities = sc1200_get_sync_polarities();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
polarities = redcloud_get_sync_polarities();
# endif
return (polarities);
}
int
gfx_get_video_palette_entry(unsigned long index, unsigned long *palette)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
status = cs5530_get_video_palette_entry(index, palette);
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_get_video_palette_entry(index, palette);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_get_video_palette_entry(index, palette);
# endif
return (status);
}
int
gfx_get_video_enable(void)
{
int enable = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
enable = cs5530_get_video_enable();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
enable = sc1200_get_video_enable();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
enable = redcloud_get_video_enable();
# endif
return (enable);
}
int
gfx_get_video_format(void)
{
int format = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
format = cs5530_get_video_format();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
format = sc1200_get_video_format();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
format = redcloud_get_video_format();
# endif
return (format);
}
unsigned long
gfx_get_video_src_size(void)
{
unsigned long size = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
size = cs5530_get_video_src_size();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
size = sc1200_get_video_src_size();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
size = redcloud_get_video_src_size();
# endif
return (size);
}
unsigned long
gfx_get_video_line_size(void)
{
unsigned long size = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
size = cs5530_get_video_line_size();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
size = sc1200_get_video_line_size();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
size = redcloud_get_video_line_size();
# endif
return (size);
}
unsigned long
gfx_get_video_xclip(void)
{
unsigned long size = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
size = cs5530_get_video_xclip();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
size = sc1200_get_video_xclip();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
size = redcloud_get_video_xclip();
# endif
return (size);
}
unsigned long
gfx_get_video_offset(void)
{
unsigned long offset = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
offset = cs5530_get_video_offset();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
offset = sc1200_get_video_offset();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
offset = redcloud_get_video_offset();
# endif
return (offset);
}
void
gfx_get_video_yuv_offsets(unsigned long *yoffset, unsigned long *uoffset,
unsigned long *voffset)
{
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_get_video_yuv_offsets(yoffset, uoffset, voffset);
# endif
}
void
gfx_get_video_yuv_pitch(unsigned long *ypitch, unsigned long *uvpitch)
{
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_get_video_yuv_pitch(ypitch, uvpitch);
# endif
}
unsigned long
gfx_get_video_upscale(void)
{
unsigned long scale = 0;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
scale = sc1200_get_video_upscale();
# endif
return (scale);
}
unsigned long
gfx_get_video_scale(void)
{
unsigned long scale = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
scale = cs5530_get_video_scale();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
scale = sc1200_get_video_scale();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
scale = redcloud_get_video_scale();
# endif
return (scale);
}
unsigned long
gfx_get_video_downscale_delta(void)
{
unsigned long delta = 0;
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
delta = redcloud_get_video_downscale_delta();
# endif
return (delta);
}
int
gfx_get_video_vertical_downscale_enable(void)
{
int enable = 0;
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
enable = redcloud_get_video_vertical_downscale_enable();
# endif
return (enable);
}
int
gfx_get_video_downscale_config(unsigned short *type, unsigned short *m)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_get_video_downscale_config(type, m);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_get_video_downscale_config(type, m);
# endif
return (status);
}
void
gfx_get_video_downscale_coefficients(unsigned short *coef1,
unsigned short *coef2,
unsigned short *coef3,
unsigned short *coef4)
{
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
sc1200_get_video_downscale_coefficients(coef1, coef2, coef3, coef4);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_get_video_downscale_coefficients(coef1, coef2, coef3, coef4);
# endif
}
void
gfx_get_video_downscale_enable(int *enable)
{
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
sc1200_get_video_downscale_enable(enable);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_get_video_downscale_enable(enable);
# endif
}
unsigned long
gfx_get_video_dst_size(void)
{
unsigned long size = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
size = cs5530_get_video_dst_size();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
size = sc1200_get_video_dst_size();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
size = redcloud_get_video_dst_size();
# endif
return (size);
}
unsigned long
gfx_get_video_position(void)
{
unsigned long position = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
position = cs5530_get_video_position();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
position = sc1200_get_video_position();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
position = redcloud_get_video_position();
# endif
return (position);
}
unsigned long
gfx_get_video_color_key(void)
{
unsigned long key = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
key = cs5530_get_video_color_key();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
key = sc1200_get_video_color_key();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
key = redcloud_get_video_color_key();
# endif
return (key);
}
unsigned long
gfx_get_video_color_key_mask(void)
{
unsigned long mask = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
mask = cs5530_get_video_color_key_mask();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
mask = sc1200_get_video_color_key_mask();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
mask = redcloud_get_video_color_key_mask();
# endif
return (mask);
}
int
gfx_get_video_color_key_src(void)
{
int src = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
src = cs5530_get_video_color_key_src();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
src = sc1200_get_video_color_key_src();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
src = redcloud_get_video_color_key_src();
# endif
return (src);
}
int
gfx_get_video_filter(void)
{
int filter = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
filter = cs5530_get_video_filter();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
filter = sc1200_get_video_filter();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
filter = redcloud_get_video_filter();
# endif
return (filter);
}
int
gfx_get_video_request(short *x, short *y)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_get_video_request(x, y);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
status = redcloud_get_video_request(x, y);
# endif
return (status);
}
int
gfx_get_video_source(VideoSourceType * source)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_get_video_source(source);
# endif
return (status);
}
int
gfx_get_vbi_source(VbiSourceType * source)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_get_vbi_source(source);
# endif
return (status);
}
unsigned long
gfx_get_vbi_lines(int odd)
{
unsigned long lines = (unsigned long)GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
lines = sc1200_get_vbi_lines(odd);
# endif
return (lines);
}
unsigned long
gfx_get_vbi_total(int odd)
{
unsigned long total = (unsigned long)GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
total = sc1200_get_vbi_total(odd);
# endif
return (total);
}
int
gfx_get_video_interlaced(void)
{
int interlaced = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
interlaced = sc1200_get_video_interlaced();
# endif
return (interlaced);
}
int
gfx_get_color_space_YUV(void)
{
int color_space = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
color_space = sc1200_get_color_space_YUV();
# endif
return (color_space);
}
int
gfx_get_vertical_scaler_offset(char *offset)
{
int status = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
status = sc1200_get_vertical_scaler_offset(offset);
# endif
return (status);
}
unsigned long
gfx_get_genlock_delay(void)
{
unsigned long delay = (unsigned long)GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
delay = sc1200_get_genlock_delay();
# endif
return (delay);
}
int
gfx_get_genlock_enable(void)
{
int enable = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
enable = sc1200_get_genlock_enable();
# endif
return (enable);
}
int
gfx_get_video_cursor(unsigned long *key, unsigned long *mask,
unsigned short *select_color2, unsigned long *color1,
unsigned short *color2)
{
int enable = GFX_STATUS_UNSUPPORTED;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
enable =
sc1200_get_video_cursor(key, mask, select_color2, color1, color2);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
enable =
redcloud_get_video_cursor(key, mask, select_color2, color1,
color2);
# endif
return (enable);
}
unsigned long
gfx_read_crc(void)
{
unsigned long crc = 0;
# if GFX_VIDEO_CS5530
if (gfx_video_type == GFX_VIDEO_TYPE_CS5530)
crc = cs5530_read_crc();
# endif
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
crc = sc1200_read_crc();
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
crc = redcloud_read_crc();
# endif
return (crc);
}
unsigned long
gfx_read_crc32(void)
{
unsigned long crc = 0;
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
crc = redcloud_read_crc32();
# endif
return (crc);
}
unsigned long
gfx_read_window_crc(int source, unsigned short x, unsigned short y,
unsigned short width, unsigned short height, int crc32)
{
unsigned long crc = 0;
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
crc = redcloud_read_window_crc(source, x, y, width, height, crc32);
# endif
return (crc);
}
int
gfx_get_macrovision_enable(void)
{
int enable = 0;
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
enable = sc1200_get_video_enable();
# endif
return (enable);
}
void
gfx_get_alpha_enable(int *enable)
{
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
sc1200_get_alpha_enable(enable);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_get_alpha_enable(enable);
# endif
return;
}
void
gfx_get_alpha_size(unsigned short *x, unsigned short *y,
unsigned short *width, unsigned short *height)
{
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
sc1200_get_alpha_size(x, y, width, height);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_get_alpha_size(x, y, width, height);
# endif
return;
}
void
gfx_get_alpha_value(unsigned char *alpha, char *delta)
{
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
sc1200_get_alpha_value(alpha, delta);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_get_alpha_value(alpha, delta);
# endif
return;
}
void
gfx_get_alpha_priority(int *priority)
{
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
sc1200_get_alpha_priority(priority);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_get_alpha_priority(priority);
# endif
return;
}
void
gfx_get_alpha_color(unsigned long *color)
{
# if GFX_VIDEO_SC1200
if (gfx_video_type == GFX_VIDEO_TYPE_SC1200)
sc1200_get_alpha_color(color);
# endif
# if GFX_VIDEO_REDCLOUD
if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD)
redcloud_get_alpha_color(color);
# endif
return;
}
#endif
#endif