comparison imgconvert.c @ 1020:617e3531d3fb libavcodec

fixing yuv422 -> yuv420p (i need that for the vceq videos ...)
author michaelni
date Mon, 20 Jan 2003 20:33:08 +0000
parents 48349e11c9b2
children d651df667898
comparison
equal deleted inserted replaced
1019:ef905ded19fe 1020:617e3531d3fb
240 cr = dst->data[2]; 240 cr = dst->data[2];
241 p = src->data[0]; 241 p = src->data[0];
242 242
243 for(y=0;y<height;y+=2) { 243 for(y=0;y<height;y+=2) {
244 for(x=0;x<width;x+=2) { 244 for(x=0;x<width;x+=2) {
245 lum[0] = p[0]; 245 cb[0] = p[0];
246 cb[0] = p[1]; 246 lum[0] = p[1];
247 lum[1] = p[2]; 247 cr[0] = p[2];
248 cr[0] = p[3]; 248 lum[1] = p[3];
249 p += 4; 249 p += 4;
250 lum += 2; 250 lum += 2;
251 cb++; 251 cb++;
252 cr++; 252 cr++;
253 } 253 }
254 for(x=0;x<width;x+=2) { 254 for(x=0;x<width;x+=2) {
255 lum[0] = p[0]; 255 lum[0] = p[1];
256 lum[1] = p[2]; 256 lum[1] = p[3];
257 p += 4; 257 p += 4;
258 lum += 2; 258 lum += 2;
259 } 259 }
260 } 260 }
261 } 261 }