1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 15:52:25 +00:00

yvu9 and if09 support. fixed i420,iyuv handling

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6528 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
alex 2002-06-23 16:03:08 +00:00
parent 35dc99b12e
commit 0768891d2d
4 changed files with 34 additions and 4 deletions

View File

@ -74,9 +74,10 @@ static ct check[] = {
{12, fccIYUV, &MEDIASUBTYPE_IYUV, CAP_IYUV},
{16, fccUYVY, &MEDIASUBTYPE_UYVY, CAP_UYVY},
{12, fccYV12, &MEDIASUBTYPE_YV12, CAP_YV12},
{16, fccYV12, &MEDIASUBTYPE_YV12, CAP_YV12},
//{16, fccYV12, &MEDIASUBTYPE_YV12, CAP_YV12},
{16, fccYVYU, &MEDIASUBTYPE_YVYU, CAP_YVYU},
//{12, fccI420, &MEDIASUBTYPE_I420, CAP_I420},
{12, fccI420, &MEDIASUBTYPE_I420, CAP_I420},
{9, fccYVU9, &MEDIASUBTYPE_YVU9, CAP_YVU9},
{0},
};
@ -192,6 +193,7 @@ DS_VideoDecoder * DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEAD
switch (this->iv.m_bh->biCompression)
{
#if 0
case fccDIV3:
case fccDIV4:
case fccDIV5:
@ -206,10 +208,12 @@ DS_VideoDecoder * DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEAD
//m_Caps = CAP_I420;
this->m_Caps = (CAP_YUY2 | CAP_UYVY);
break;
#endif
default:
this->m_Caps = CAP_NONE;
printf("Decoder supports the following YUV formats: ");
for (c = check; c->bits; c++)
{
this->m_sVhdr2->bmiHeader.biBitCount = c->bits;
@ -217,12 +221,16 @@ DS_VideoDecoder * DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEAD
this->m_sDestType.subtype = *c->subtype;
result = this->m_pDS_Filter->m_pOutputPin->vt->QueryAccept(this->m_pDS_Filter->m_pOutputPin, &this->m_sDestType);
if (!result)
{
this->m_Caps = (this->m_Caps | c->cap);
printf("%.4s ", &c->fcc);
}
}
printf("\n");
}
if (this->m_Caps != CAP_NONE)
printf("Decoder is capable of YUV output ( flags 0x%x)\n", (int)this->m_Caps);
printf("Decoder is capable of YUV output (flags 0x%x)\n", (int)this->m_Caps);
this->m_sVhdr2->bmiHeader.biBitCount = 24;
this->m_sVhdr2->bmiHeader.biCompression = 0;
@ -480,12 +488,17 @@ int DS_VideoDecoder_SetDestFmt(DS_VideoDecoder *this, int bits, unsigned int csp
case fccIYUV:
this->m_sDestType.subtype = MEDIASUBTYPE_IYUV;
break;
case fccI420:
this->m_sDestType.subtype = MEDIASUBTYPE_I420;
break;
case fccUYVY:
this->m_sDestType.subtype = MEDIASUBTYPE_UYVY;
break;
case fccYVYU:
this->m_sDestType.subtype = MEDIASUBTYPE_YVYU;
break;
case fccYVU9:
this->m_sDestType.subtype = MEDIASUBTYPE_YVU9;
default:
ok = false;
break;
@ -524,6 +537,10 @@ int DS_VideoDecoder_SetDestFmt(DS_VideoDecoder *this, int bits, unsigned int csp
if(!(this->m_Caps & CAP_IYUV))
should_test=false;
break;
case fccI420:
if(!(this->m_Caps & CAP_I420))
should_test=false;
break;
case fccUYVY:
if(!(this->m_Caps & CAP_UYVY))
should_test=false;
@ -532,6 +549,10 @@ int DS_VideoDecoder_SetDestFmt(DS_VideoDecoder *this, int bits, unsigned int csp
if(!(this->m_Caps & CAP_YVYU))
should_test=false;
break;
case fccYVU9:
if(!(this->m_Caps & CAP_YVU9))
should_test=false;
break;
}
if(should_test)
result = this->m_pDS_Filter->m_pOutputPin->vt->QueryAccept(this->m_pDS_Filter->m_pOutputPin, &this->m_sDestType);

View File

@ -55,6 +55,10 @@ GUID MEDIASUBTYPE_Y211={0x31313259, 0x0000, 0x0010,
{0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
GUID MEDIASUBTYPE_YV12={0x32315659, 0x0000, 0x0010,
{0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
GUID MEDIASUBTYPE_I420={0x30323449, 0x0000, 0x0010,
{0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
GUID MEDIASUBTYPE_IF09={0x39304649, 0x0000, 0x0010,
{0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
GUID CLSID_MemoryAllocator={0x1e651cc0, 0xb199, 0x11d0,
{0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45}};
GUID IID_DivxHidden={0x598eba01, 0xb49a, 0x11d2,

View File

@ -92,5 +92,6 @@ extern GUID MEDIASUBTYPE_YVYU;
extern GUID MEDIASUBTYPE_UYVY;
extern GUID MEDIASUBTYPE_Y211;
extern GUID MEDIASUBTYPE_YV12;
extern GUID MEDIASUBTYPE_I420;
#endif

View File

@ -88,6 +88,8 @@ struct IAudioEncoder
CAP_UYVY = 8,
CAP_YVYU = 16,
CAP_I420 = 32,
CAP_YVU9 = 64,
CAP_IF09 = 128,
};
enum DecodingMode
{
@ -230,7 +232,7 @@ struct IRtConfig
#define fccVCR2 mmioFOURCC('V', 'C', 'R', '2')
#define fccVCR1 mmioFOURCC('V', 'C', 'R', '1')
#define fccVYUY mmioFOURCC('V', 'Y', 'U', 'Y')
#define fccYVU9 mmioFOURCC('I', 'Y', 'U', '9')
#define fccIYU9 mmioFOURCC('I', 'Y', 'U', '9') // it was defined as fccYVU9
/* Asus codecs */
#define fccASV1 mmioFOURCC('A', 'S', 'V', '1')
@ -255,5 +257,7 @@ struct IRtConfig
#define fccIYUV mmioFOURCC('I', 'Y', 'U', 'V')/* Planar mode: Y + U + V (3 planes) */
#define fccUYVY mmioFOURCC('U', 'Y', 'V', 'Y')/* Packed mode: U0+Y0+V0+Y1 (1 plane) */
#define fccYVYU mmioFOURCC('Y', 'V', 'Y', 'U')/* Packed mode: Y0+V0+Y1+U0 (1 plane) */
#define fccYVU9 mmioFOURCC('Y', 'V', 'U', '9')/* Planar 4:1:0 */
#define fccIF09 mmioFOURCC('I', 'F', '0', '9')/* Planar 4:1:0 + delta */
#endif