comparison loader/dshow/DS_VideoDec.c @ 468:4b91c9120d6a

other YUV formats support
author arpi_esp
date Mon, 16 Apr 2001 02:55:57 +0000
parents fb67a2aa61fe
children 9355b2ae634e
comparison
equal deleted inserted replaced
467:e53a9edbee98 468:4b91c9120d6a
130 130
131 dsf=new DS_Filter(); 131 dsf=new DS_Filter();
132 132
133 dsf->Create(dllname, guid, &m_sOurType, &m_sDestType); 133 dsf->Create(dllname, guid, &m_sOurType, &m_sDestType);
134 134
135 #if 0
135 m_sVhdr2->bmiHeader.biBitCount=16; 136 m_sVhdr2->bmiHeader.biBitCount=16;
136 m_sVhdr2->bmiHeader.biCompression=fccYUY2; 137 m_sVhdr2->bmiHeader.biCompression=fccYUY2;
137 m_sDestType.subtype=MEDIASUBTYPE_YUY2; 138 m_sDestType.subtype=MEDIASUBTYPE_YUY2;
138 result=dsf->m_pOutputPin->vt->QueryAccept(dsf->m_pOutputPin, &m_sDestType); 139 result=dsf->m_pOutputPin->vt->QueryAccept(dsf->m_pOutputPin, &m_sDestType);
139 // if(!result) caps=(CAPS)(caps | CAP_YUY2); 140 // if(!result) caps=(CAPS)(caps | CAP_YUY2);
141 #endif
140 142
141 m_sVhdr2->bmiHeader.biBitCount=24; 143 m_sVhdr2->bmiHeader.biBitCount=24;
142 m_sVhdr2->bmiHeader.biCompression=0; 144 m_sVhdr2->bmiHeader.biCompression=0;
143 m_sDestType.subtype=MEDIASUBTYPE_RGB24; 145 m_sDestType.subtype=MEDIASUBTYPE_RGB24;
144 m_decoder=m_obh; 146 m_decoder=m_obh;
273 m_obh.setBits(bits); 275 m_obh.setBits(bits);
274 // .biSizeImage=abs(temp.biWidth*temp.biHeight*((temp.biBitCount+7)/8)); 276 // .biSizeImage=abs(temp.biWidth*temp.biHeight*((temp.biBitCount+7)/8));
275 } 277 }
276 else 278 else
277 { 279 {
278 m_obh.setSpace(csp); 280 m_obh.setSpace(csp,bits);
279 switch(csp) 281 switch(csp)
280 { 282 {
281 case fccYUY2: 283 case fccYUY2:
282 m_sDestType.subtype=MEDIASUBTYPE_YUY2; 284 m_sDestType.subtype=MEDIASUBTYPE_YUY2;
285 printf("DShow: using YUY2 colorspace\n");
283 break; 286 break;
284 case fccYV12: 287 case fccYV12:
285 m_sDestType.subtype=MEDIASUBTYPE_YV12; 288 m_sDestType.subtype=MEDIASUBTYPE_YV12;
289 printf("DShow: using YV12 colorspace\n");
286 break; 290 break;
287 case fccIYUV: 291 case fccIYUV:
288 m_sDestType.subtype=MEDIASUBTYPE_IYUV; 292 m_sDestType.subtype=MEDIASUBTYPE_IYUV;
293 printf("DShow: using IYUV colorspace\n");
289 break; 294 break;
290 case fccUYVY: 295 case fccUYVY:
291 m_sDestType.subtype=MEDIASUBTYPE_UYVY; 296 m_sDestType.subtype=MEDIASUBTYPE_UYVY;
297 printf("DShow: using UYVY colorspace\n");
292 break; 298 break;
293 case fccYVYU: 299 case fccYVYU:
294 m_sDestType.subtype=MEDIASUBTYPE_YVYU; 300 m_sDestType.subtype=MEDIASUBTYPE_YVYU;
301 printf("DShow: using YVYU colorspace\n");
295 break; 302 break;
296 } 303 }
297 } 304 }
298 305
299 m_sDestType.lSampleSize=m_obh.biSizeImage; 306 m_sDestType.lSampleSize=m_obh.biSizeImage;