ffmpegcolorspace: Map "Y8 " and "GREY" to "Y800" and add it to the template caps

This commit is contained in:
Sebastian Dröge 2010-06-07 08:31:25 +02:00
parent 4c0b39b680
commit 39b68dc2a8

View File

@ -340,9 +340,22 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context)
case PIX_FMT_YUV411P: case PIX_FMT_YUV411P:
fmt = GST_MAKE_FOURCC ('Y', '4', '1', 'B'); fmt = GST_MAKE_FOURCC ('Y', '4', '1', 'B');
break; break;
case PIX_FMT_Y800: case PIX_FMT_Y800:{
fmt = GST_MAKE_FOURCC ('Y', '8', '0', '0'); GstCaps *tmp;
caps = gst_ff_vid_caps_new (context, "video/x-raw-yuv",
"format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('Y', '8', '0', '0'),
NULL);
tmp =
gst_ff_vid_caps_new (context, "video/x-raw-yuv", "format",
GST_TYPE_FOURCC, GST_MAKE_FOURCC ('Y', '8', ' ', ' '), NULL);
gst_caps_append (caps, tmp);
tmp = gst_ff_vid_caps_new (context, "video/x-raw-yuv",
"format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('G', 'R', 'E', 'Y'),
NULL);
gst_caps_append (caps, tmp);
break; break;
}
case PIX_FMT_Y16: case PIX_FMT_Y16:
fmt = GST_MAKE_FOURCC ('Y', '1', '6', ' '); fmt = GST_MAKE_FOURCC ('Y', '1', '6', ' ');
break; break;
@ -371,17 +384,10 @@ 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;
case PIX_FMT_GRAY16_L: case PIX_FMT_GRAY16_L:
bpp = depth = 16; bpp = depth = 16;