"klass": "Codec/Encoder/Video/Hardware",
"pad-templates": {
"sink": {
- "caps": "video/x-raw(memory:D3D11Memory):\n format: { NV12, BGRA }\n width: [ 16, 16384 ]\n height: [ 16, 16384 ]\n\nvideo/x-raw(memory:VAMemory):\n format: { NV12, BGRA }\n width: [ 16, 16384 ]\n height: [ 16, 16384 ]\nvideo/x-raw:\n format: { NV12, BGRA }\n width: [ 16, 16384 ]\n height: [ 16, 16384 ]\n",
+ "caps": "video/x-raw(memory:D3D11Memory):\n format: { NV12, YUY2, BGRA }\n width: [ 16, 16384 ]\n height: [ 16, 16384 ]\n\nvideo/x-raw(memory:VAMemory):\n format: { NV12, YUY2, BGRA }\n width: [ 16, 16384 ]\n height: [ 16, 16384 ]\nvideo/x-raw:\n format: { NV12, YUY2, BGRA }\n width: [ 16, 16384 ]\n height: [ 16, 16384 ]\n",
"direction": "sink",
"presence": "always"
},
#define DEFAULT_JPEG_QUALITY 85
#define DOC_SINK_CAPS_COMM \
- "format = (string) { NV12, BGRA }, " \
+ "format = (string) { NV12, YUY2, BGRA }, " \
"width = (int) [ 16, 16384 ], height = (int) [ 16, 16384 ]"
#define DOC_SINK_CAPS \
frame_info->BitDepthLuma = 8;
frame_info->BitDepthChroma = 8;
break;
+ case GST_VIDEO_FORMAT_YUY2:
+ frame_info->ChromaFormat = MFX_CHROMAFORMAT_YUV422;
+ frame_info->FourCC = MFX_FOURCC_YUY2;
+ frame_info->BitDepthLuma = 8;
+ frame_info->BitDepthChroma = 8;
+ break;
case GST_VIDEO_FORMAT_BGRA:
frame_info->ChromaFormat = MFX_CHROMAFORMAT_YUV444;
frame_info->FourCC = MFX_FOURCC_RGB4;
supported_formats.push_back ("NV12");
+ mfx->FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV422;
+ mfx->FrameInfo.FourCC = MFX_FOURCC_YUY2;
+ status = MFXVideoENCODE_Query (session, ¶m, ¶m);
+ if (status == MFX_ERR_NONE)
+ supported_formats.push_back ("YUY2");
+
mfx->FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV444;
mfx->FrameInfo.FourCC = MFX_FOURCC_RGB4;
status = MFXVideoENCODE_Query (session, ¶m, ¶m);
- /* TODO: Add YUY2 support, d3d11 doesn't support the format yet */
if (status == MFX_ERR_NONE)
supported_formats.push_back ("BGRA");