Mercurial > mplayer.hg
comparison vidix/drivers/mga_vid.c @ 4144:501620ec9b40
fixed to get something - needs a major rewrite
author | arpi |
---|---|
date | Sun, 13 Jan 2002 22:14:06 +0000 |
parents | 13d6395e8daa |
children | d0678176b98c |
comparison
equal
deleted
inserted
replaced
4143:d416ca893952 | 4144:501620ec9b40 |
---|---|
1159 y = config->dest.y; | 1159 y = config->dest.y; |
1160 sw = config->src.w; | 1160 sw = config->src.w; |
1161 sh = config->src.h; | 1161 sh = config->src.h; |
1162 dw = config->dest.w; | 1162 dw = config->dest.w; |
1163 dh = config->dest.h; | 1163 dh = config->dest.h; |
1164 | |
1165 config->dest.pitch.y=32; | |
1166 config->dest.pitch.u= | |
1167 config->dest.pitch.v=16; | |
1164 | 1168 |
1165 printf("[mga] Setting up a %dx%d+%d+%d video window (src %dx%d) format %X\n", | 1169 printf("[mga] Setting up a %dx%d+%d+%d video window (src %dx%d) format %X\n", |
1166 dw, dh, x, y, sw, sh, config->fourcc); | 1170 dw, dh, x, y, sw, sh, config->fourcc); |
1167 | 1171 |
1168 if ((sw < 4) || (sh < 4) || (dw < 4) || (dh < 4)) | 1172 if ((sw < 4) || (sh < 4) || (dw < 4) || (dh < 4)) |
1191 } | 1195 } |
1192 | 1196 |
1193 // config->frame_size = config->src.h*config->src.w+(config->src.w*config->src.h)/2; | 1197 // config->frame_size = config->src.h*config->src.w+(config->src.w*config->src.h)/2; |
1194 | 1198 |
1195 frame_size = config->frame_size; | 1199 frame_size = config->frame_size; |
1196 | 1200 |
1201 config->offset.y=0; | |
1202 config->offset.v=((sw + 31) & ~31) * sh; | |
1203 config->offset.u=config->offset.v+((sw + 31) & ~31) * sh /4; | |
1204 | |
1197 mga_src_base = (mga_ram_size*0x100000-config->num_frames*config->frame_size); | 1205 mga_src_base = (mga_ram_size*0x100000-config->num_frames*config->frame_size); |
1198 if (mga_src_base < 0) | 1206 if (mga_src_base < 0) |
1199 { | 1207 { |
1200 printf("[mga] not enough memory for frames!\n"); | 1208 printf("[mga] not enough memory for frames!\n"); |
1201 return(EFAULT); | 1209 return(EFAULT); |