comparison vidix/drivers/nvidia_vid.c @ 11902:6a49dea2c0e2

1000l
author faust3
date Sun, 01 Feb 2004 11:35:28 +0000
parents d9489d5581d0
children 8e859a01904f
comparison
equal deleted inserted replaced
11901:01bfcbd73986 11902:6a49dea2c0e2
1 /* 1 /*
2 nvidia_vid - VIDIX based video driver for NVIDIA chips 2 nvidia_vid - VIDIX based video driver for NVIDIA chips
3 Copyrights 2003 Sascha Sommer. This file is based on sources from 3 Copyrights 2003 - 2004 Sascha Sommer. This file is based on sources from
4 RIVATV (rivatv.sf.net) 4 RIVATV (rivatv.sf.net)
5 Licence: GPL 5 Licence: GPL
6 WARNING: THIS DRIVER IS IN BETA STAGE 6 WARNING: THIS DRIVER IS IN BETA STAGE
7 7
8 multi buffer support and TNT2 fixes by Dmitry Baryshkov 8 multi buffer support and TNT2 fixes by Dmitry Baryshkov
850 vinfo->dest.pitch.v = 0; 850 vinfo->dest.pitch.v = 0;
851 851
852 vinfo->offset.y = 0; 852 vinfo->offset.y = 0;
853 vinfo->offset.v = 0; 853 vinfo->offset.v = 0;
854 vinfo->offset.u = 0; 854 vinfo->offset.u = 0;
855 855 info->pitch = ((info->width << 1) + (vinfo->dest.pitch.y-1)) & ~(vinfo->dest.pitch.y-1);
856 info->pitch = info->width << 1;
857 vinfo->frame_size = info->pitch * info->height;
858 break;
859 case IMGFMT_YV12:
860 vinfo->dest.pitch.y = 1;
861 vinfo->dest.pitch.u = 1;
862 vinfo->dest.pitch.v = 1;
863
864 vinfo->offset.y = 0;
865 vinfo->offset.v = (info->width) * info->height;
866 vinfo->offset.u = vinfo->offset.v * 5 / 4;
867
868 info->pitch = info->width + (info->width >> 1);
869 vinfo->frame_size = info->pitch * info->height; 856 vinfo->frame_size = info->pitch * info->height;
870 break; 857 break;
871 } 858 }
872 info->buffer_size = vinfo->frame_size; 859 info->buffer_size = vinfo->frame_size;
873 info->num_frames = vinfo->num_frames= (info->chip.fbsize - info->picture_offset)/vinfo->frame_size; 860 info->num_frames = vinfo->num_frames= (info->chip.fbsize - info->picture_offset)/vinfo->frame_size;