xsf = (width*scaledtwidth)/swidth; geo->hscale =  ((totalwidth*4096UL)/xsf-4096); geo->hdelay =  tvnorm->hdelayx1; geo->hdelay =  (geo->hdelay*width)/swidth; geo->hdelay &= 0x3fe; sr = ((tvnorm->sheight >> (interleaved?0:1))*512)/height - 512; geo->vscale =  (0x10000UL-sr) & 0x1fff; geo->crop   =  ((width>>8)&0x03) | ((geo->hdelay>>6)&0x0c) | ((tvnorm->sheight>>4)&0x30) | ((vdelay>>2)&0xc0); geo->vscale |= interleaved ? (BT848_VSCALE_INT<<8) : 0; geo->vdelay  =  vdelay; geo->width   =  width; geo->sheight =  tvnorm->sheight; 
xsf = (width*scaledtwidth)/swidth; geo->hscale =  ((totalwidth*4096UL)/xsf-4096); geo->hdelay =  tvnorm->hdelayx1; geo->hdelay =  (geo->hdelay*width)/swidth; geo->hdelay &= 0x3fe; sr = ((tvnorm->sheight >> (interleaved?0:1))*512)/height - 512; geo->vscale =  (0x10000UL-sr) & 0x1fff; geo->crop   =  ((width>>8)&0x03) | ((geo->hdelay>>6)&0x0c) | ((tvnorm->sheight>>4)&0x30) | ((vdelay>>2)&0xc0); geo->vscale |= interleaved ? (BT848_VSCALE_INT<<8) : 0; geo->vdelay  =  vdelay; geo->width   =  width; geo->sheight =  tvnorm->sheight; 
bttv_calc_geo(struct bttv *btv, struct bttv_geometry *geo,	      int width, int height, int interleaved, int norm){	const struct bttv_tvnorm *tvnorm = &bttv_tvnorms[norm];        u32 xsf, sr;	int vdelay;	int swidth       = tvnorm->swidth;	int totalwidth   = tvnorm->totalwidth;	int scaledtwidth = tvnorm->scaledtwidth;	if (bttv_tvcards[btv->c.type].muxsel[btv->input] < 0) {		swidth       = 720;		totalwidth   = 858;		scaledtwidth = 858;	}	vdelay = tvnorm->vdelay;        xsf = (width*scaledtwidth)/swidth;        geo->hscale =  ((totalwidth*4096UL)/xsf-4096);        geo->hdelay =  tvnorm->hdelayx1;        geo->hdelay =  (geo->hdelay*width)/swidth;        geo->hdelay &= 0x3fe;        sr = ((tvnorm->sheight >> (interleaved?0:1))*512)/height - 512;        geo->vscale =  (0x10000UL-sr) & 0x1fff;        geo->crop   =  ((width>>8)&0x03) | ((geo->hdelay>>6)&0x0c) |                ((tvnorm->sheight>>4)&0x30) | ((vdelay>>2)&0xc0);        geo->vscale |= interleaved ? (BT848_VSCALE_INT<<8) : 0;        geo->vdelay  =  vdelay;        geo->width   =  width;        geo->sheight =  tvnorm->sheight;	geo->vtotal  =  tvnorm->vtotal;        if (btv->opt_combfilter) {                geo->vtc  = (width < 193) ? 2 : ((width < 385) ? 1 : 0);                geo->comb = (width < 769) ? 1 : 0;        } else {                geo->vtc  = 0;                geo->comb = 0;        }}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4ac97914c6c35f6bf132071c718e034d0846b9f5/bttv-risc.c/buggy/drivers/media/video/bttv-risc.c