rem: BESW(NV10_0SRCREF, ((moi.v1srcstv << 4) & 0xffff0000) | ((moi.hsrcstv >> 12) & 0x0000ffff));
context: static void eng_bes_program_move_overlay(move_overlay_info moi){	/*************************************	 *** sync to BES (Back End Scaler) ***	 *************************************/	/* Done in card hardware:	 * double buffered registers + trigger if programming complete feature. */	/**************************************	 *** actually program the registers ***	 **************************************/	if (si->ps.card_arch < NV10A)	{		/* unknown, but needed (otherwise high-res distortions and only half the frames */		BESW(NV04_OE_STATE, 0x00000000);		/* select buffer 0 as active (b16) */		BESW(NV04_SU_STATE, 0x00000000);		/* unknown (no effect?) */		BESW(NV04_RM_STATE, 0x00000000);		/* setup clipped(!) buffer startadress in RAM */		/* RIVA128 - TNT bes doesn't have clipping registers, so no subpixelprecise clipping		 * either. We do pixelprecise vertical and 'two pixel' precise horizontal clipping here. */		/* (program both buffers to prevent sync distortions) */		/* first include 'pixel precise' left clipping... (top clipping was already included) */		moi.a1orgv += ((moi.hsrcstv >> 16) * 2);		/* we need to step in 4-byte (2 pixel) granularity due to the nature of yuy2 */		BESW(NV04_0BUFADR, (moi.a1orgv & ~0x03));		BESW(NV04_1BUFADR, (moi.a1orgv & ~0x03));		/* setup output window position */		BESW(NV04_DSTREF, ((moi.vcoordv & 0xffff0000) | ((moi.hcoordv & 0xffff0000) >> 16)));		/* setup output window size */		BESW(NV04_DSTSIZE, (			(((moi.vcoordv & 0x0000ffff) - ((moi.vcoordv & 0xffff0000) >> 16) + 1) << 16) |			((moi.hcoordv & 0x0000ffff) - ((moi.hcoordv & 0xffff0000) >> 16) + 1)			));		/* select buffer 1 as active (b16) */		BESW(NV04_SU_STATE, 0x00010000);	}	else	{		/* >= NV10A */			/* setup buffer origin: GeForce uses subpixel precise clipping on left and top! (12.4 values) */		BESW(NV10_0SRCREF, ((moi.v1srcstv << 4) & 0xffff0000) | ((moi.hsrcstv >> 12) & 0x0000ffff));		/* setup output window position */		BESW(NV10_0DSTREF, ((moi.vcoordv & 0xffff0000) | ((moi.hcoordv & 0xffff0000) >> 16)));		/* setup output window size */		BESW(NV10_0DSTSIZE, (			(((moi.vcoordv & 0x0000ffff) - ((moi.vcoordv & 0xffff0000) >> 16) + 1) << 16) |			((moi.hcoordv & 0x0000ffff) - ((moi.hcoordv & 0xffff0000) >> 16) + 1)			));		/* We only use buffer buffer 0: select it. (0x01 = buffer 0, 0x10 = buffer 1) */		/* This also triggers activation of programmed values (double buffered registers feature) */		BESW(NV10_BUFSEL, 0x00000001);	}}