summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin KAY <komadori@users.sourceforge.net>2004-04-28 21:01:28 +0000
committerRobin KAY <komadori@users.sourceforge.net>2004-04-28 21:01:28 +0000
commit2194d45b5191f45c029a4bfffa98b88e8758ce5e (patch)
tree4e381d8473d6cb08c90c4f8c348691c4eb542186
parent072f0bc2b5705a5273fbfc37cecbfbc8eff41265 (diff)
downloadxine-lib-2194d45b5191f45c029a4bfffa98b88e8758ce5e.tar.gz
xine-lib-2194d45b5191f45c029a4bfffa98b88e8758ce5e.tar.bz2
Prevent flickering when updating overlay registers.
CVS patchset: 6457 CVS date: 2004/04/28 21:01:28
-rw-r--r--src/video_out/video_out_pgx64.c55
1 files changed, 30 insertions, 25 deletions
diff --git a/src/video_out/video_out_pgx64.c b/src/video_out/video_out_pgx64.c
index 50e9e9a43..af685792e 100644
--- a/src/video_out/video_out_pgx64.c
+++ b/src/video_out/video_out_pgx64.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_pgx64.c,v 1.59 2004/04/28 00:14:13 komadori Exp $
+ * $Id: video_out_pgx64.c,v 1.60 2004/04/28 21:01:28 komadori Exp $
*
* video_out_pgx64.c, Sun PGX64/PGX24 output plugin for xine
*
@@ -450,35 +450,15 @@ static void pgx64_display_frame(vo_driver_t *this_gen, vo_frame_t *frame_gen)
repaint_output_area(this);
this->chromakey_regen_needed = 1;
- vregs[BUS_CNTL] |= le2me_32(BUS_EXT_REG_EN);
- vregs[OVERLAY_SCALE_CNTL] = 0;
- vregs[OVERLAY_EXCLUSIVE_HORZ] = 0;
- vregs[SCALER_H_COEFF0] = le2me_32(SCALER_H_COEFF0_DEFAULT);
- vregs[SCALER_H_COEFF1] = le2me_32(SCALER_H_COEFF1_DEFAULT);
- vregs[SCALER_H_COEFF2] = le2me_32(SCALER_H_COEFF2_DEFAULT);
- vregs[SCALER_H_COEFF3] = le2me_32(SCALER_H_COEFF3_DEFAULT);
- vregs[SCALER_H_COEFF4] = le2me_32(SCALER_H_COEFF4_DEFAULT);
- vregs[CAPTURE_CONFIG] = le2me_32(CAPTURE_CONFIG_BUF0);
- vregs[SCALER_COLOUR_CNTL] = le2me_32((this->saturation<<16) | (this->saturation<<8) | (this->brightness&0x7F));
- vregs[OVERLAY_KEY_CNTL] = le2me_32(OVERLAY_KEY_EN);
- vregs[OVERLAY_GRAPHICS_KEY_CLR] = le2me_32(this->colour_key);
- vregs[OVERLAY_GRAPHICS_KEY_MSK] = le2me_32(0xffffffff >> (32 - this->fb_depth));
-
- vregs[VIDEO_FORMAT] = le2me_32(frame->native_format);
- vregs[SCALER_BUF_PITCH] = le2me_32(this->deinterlace_en ? frame->pitch *2 : frame->pitch);
- vregs[OVERLAY_X_Y_START] = le2me_32(((this->vo_scale.gui_win_x + this->vo_scale.output_xoffset) << 16) | (this->vo_scale.gui_win_y + this->vo_scale.output_yoffset) | OVERLAY_X_Y_LOCK);
- vregs[OVERLAY_X_Y_END] = le2me_32(((this->vo_scale.gui_win_x + this->vo_scale.output_xoffset + this->vo_scale.output_width - 1) << 16) | (this->vo_scale.gui_win_y + this->vo_scale.output_yoffset + this->vo_scale.output_height - 1));
- vregs[OVERLAY_SCALE_INC] = le2me_32((((frame->width << 12) / this->vo_scale.output_width) << 16) | (((this->deinterlace_en ? frame->height/2 : frame->height) << 12) / this->vo_scale.output_height));
- vregs[SCALER_HEIGHT_WIDTH] = le2me_32((frame->width << 16) | (this->deinterlace_en ? frame->height/2 : frame->height));
+ DGA_DRAW_LOCK(this->dgadraw, -1);
+ dgavis = DGA_VIS_FULLY_OBSCURED;
+ cliprects = dga_draw_clipinfo(this->dgadraw);
wx0 = this->vo_scale.gui_win_x + this->vo_scale.output_xoffset;
wy0 = this->vo_scale.gui_win_y + this->vo_scale.output_yoffset;
wx1 = wx0 + this->vo_scale.output_width;
wy1 = wy0 + this->vo_scale.output_height;
- DGA_DRAW_LOCK(this->dgadraw, -1);
- dgavis = DGA_VIS_FULLY_OBSCURED;
- cliprects = dga_draw_clipinfo(this->dgadraw);
while ((cy0 = *cliprects++) != DGA_Y_EOL) {
cy1 = *cliprects++;
while ((cx0 = *cliprects++) != DGA_X_EOL) {
@@ -492,6 +472,26 @@ static void pgx64_display_frame(vo_driver_t *this_gen, vo_frame_t *frame_gen)
}
}
}
+ DGA_DRAW_UNLOCK(this->dgadraw);
+
+ vregs[BUS_CNTL] |= le2me_32(BUS_EXT_REG_EN);
+ vregs[SCALER_H_COEFF0] = le2me_32(SCALER_H_COEFF0_DEFAULT);
+ vregs[SCALER_H_COEFF1] = le2me_32(SCALER_H_COEFF1_DEFAULT);
+ vregs[SCALER_H_COEFF2] = le2me_32(SCALER_H_COEFF2_DEFAULT);
+ vregs[SCALER_H_COEFF3] = le2me_32(SCALER_H_COEFF3_DEFAULT);
+ vregs[SCALER_H_COEFF4] = le2me_32(SCALER_H_COEFF4_DEFAULT);
+ vregs[CAPTURE_CONFIG] = le2me_32(CAPTURE_CONFIG_BUF0);
+ vregs[SCALER_COLOUR_CNTL] = le2me_32((this->saturation<<16) | (this->saturation<<8) | (this->brightness&0x7F));
+ vregs[OVERLAY_KEY_CNTL] = le2me_32(OVERLAY_KEY_EN);
+ vregs[OVERLAY_GRAPHICS_KEY_CLR] = le2me_32(this->colour_key);
+ vregs[OVERLAY_GRAPHICS_KEY_MSK] = le2me_32(0xffffffff >> (32 - this->fb_depth));
+
+ vregs[VIDEO_FORMAT] = le2me_32(frame->native_format);
+ vregs[SCALER_BUF_PITCH] = le2me_32(this->deinterlace_en ? frame->pitch *2 : frame->pitch);
+ vregs[OVERLAY_X_Y_START] = le2me_32(((this->vo_scale.gui_win_x + this->vo_scale.output_xoffset) << 16) | (this->vo_scale.gui_win_y + this->vo_scale.output_yoffset) | OVERLAY_X_Y_LOCK);
+ vregs[OVERLAY_X_Y_END] = le2me_32(((this->vo_scale.gui_win_x + this->vo_scale.output_xoffset + this->vo_scale.output_width - 1) << 16) | (this->vo_scale.gui_win_y + this->vo_scale.output_yoffset + this->vo_scale.output_height - 1));
+ vregs[OVERLAY_SCALE_INC] = le2me_32((((frame->width << 12) / this->vo_scale.output_width) << 16) | (((this->deinterlace_en ? frame->height/2 : frame->height) << 12) / this->vo_scale.output_height));
+ vregs[SCALER_HEIGHT_WIDTH] = le2me_32((frame->width << 16) | (this->deinterlace_en ? frame->height/2 : frame->height));
if ((dgavis == DGA_VIS_UNOBSCURED) && !this->chromakey_en) {
int horz_start = (this->vo_scale.gui_win_x + this->vo_scale.output_xoffset + 7) / 8;
@@ -500,11 +500,16 @@ static void pgx64_display_frame(vo_driver_t *this_gen, vo_frame_t *frame_gen)
vregs[OVERLAY_EXCLUSIVE_VERT] = le2me_32((this->vo_scale.gui_win_y + this->vo_scale.output_yoffset - 1) | ((this->vo_scale.gui_win_y + this->vo_scale.output_yoffset + this->vo_scale.output_height - 1) << 16));
vregs[OVERLAY_EXCLUSIVE_HORZ] = le2me_32(horz_start | (horz_end << 8) | ((this->fb_width/8 - horz_end) << 16) | OVERLAY_EXCLUSIVE_EN);
}
+ else {
+ vregs[OVERLAY_EXCLUSIVE_HORZ] = 0;
+ }
if (dgavis != DGA_VIS_FULLY_OBSCURED) {
vregs[OVERLAY_SCALE_CNTL] = le2me_32(OVERLAY_SCALE_EN);
}
- DGA_DRAW_UNLOCK(this->dgadraw);
+ else {
+ vregs[OVERLAY_SCALE_CNTL] = 0;
+ }
}
if (this->buf_mode == BUF_MODE_MULTI) {