ffmpegcolorspace: video/x-raw-gray is the same as the YUV Y800 format

This commit is contained in:
Sebastian Dröge 2009-03-28 09:43:23 +01:00
parent 96b9ec4da0
commit 77bc4ff763

View file

@ -362,10 +362,17 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context)
case PIX_FMT_AYUV4444: case PIX_FMT_AYUV4444:
fmt = GST_MAKE_FOURCC ('A', 'Y', 'U', 'V'); fmt = GST_MAKE_FOURCC ('A', 'Y', 'U', 'V');
break; break;
case PIX_FMT_GRAY8: case PIX_FMT_GRAY8:{
GstCaps *tmp;
bpp = depth = 8; bpp = depth = 8;
caps = gst_ff_vid_caps_new (context, "video/x-raw-gray", caps = gst_ff_vid_caps_new (context, "video/x-raw-gray",
"bpp", G_TYPE_INT, bpp, "depth", G_TYPE_INT, depth, NULL); "bpp", G_TYPE_INT, bpp, "depth", G_TYPE_INT, depth, NULL);
tmp = gst_ff_vid_caps_new (context, "video/x-raw-yuv",
"format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('Y', '8', '0', '0'),
NULL);
gst_caps_append (caps, tmp);
}
break; break;
default: default:
/* give up ... */ /* give up ... */
@ -632,6 +639,9 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
case GST_MAKE_FOURCC ('Y', '4', '4', '4'): case GST_MAKE_FOURCC ('Y', '4', '4', '4'):
context->pix_fmt = PIX_FMT_YUV444P; context->pix_fmt = PIX_FMT_YUV444P;
break; break;
case GST_MAKE_FOURCC ('Y', '8', '0', '0'):
context->pix_fmt = PIX_FMT_GRAY8;
break;
} }
} }
} else if (gst_structure_has_name (structure, "video/x-raw-rgb")) { } else if (gst_structure_has_name (structure, "video/x-raw-rgb")) {