+2006-03-23 Wim Taymans <wim@fluendo.com>
+
+ Patch by: Fabrizio Gennari <fabrizio dot ge at tiscali dot it>
+
+ * gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
+ (gst_riff_create_video_template_caps):
+ * gst/ffmpegcolorspace/avcodec.h:
+ * gst/ffmpegcolorspace/gstffmpegcodecmap.c:
+ (gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_pixfmt),
+ (gst_ffmpegcsp_avpicture_fill):
+ * gst/ffmpegcolorspace/imgconvert.c:
+ Patch for support of YVU9 AVI files (#334822)
+
2006-03-22 Edward Hervey <edward@fluendo.com>
* docs/design/design-decodebin.txt:
*codec_name = g_strdup ("Uncompressed packed YUV 4:2:2");
break;
+ case GST_MAKE_FOURCC ('Y', 'V', 'U', '9'):
+ caps = gst_caps_new_simple ("video/x-raw-yuv",
+ "format", GST_TYPE_FOURCC, codec_fcc, NULL);
+ if (codec_name)
+ *codec_name = g_strdup ("Uncompressed packed YVU 4:1:0");
+ break;
+
case GST_MAKE_FOURCC ('M', 'J', 'P', 'G'): /* YUY2 MJPEG */
case GST_MAKE_FOURCC ('A', 'V', 'R', 'n'):
case GST_MAKE_FOURCC ('I', 'J', 'P', 'G'):
guint32 tags[] = {
GST_MAKE_FOURCC ('I', '4', '2', '0'),
GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'),
+ GST_MAKE_FOURCC ('Y', 'V', 'U', '9'),
GST_MAKE_FOURCC ('M', 'J', 'P', 'G'),
GST_MAKE_FOURCC ('D', 'V', 'S', 'D'),
GST_MAKE_FOURCC ('W', 'M', 'V', '1'),
PIX_FMT_RGB32, ///< Packed pixel, 4 bytes per pixel, BGRXBGRX..., stored in cpu endianness
PIX_FMT_BGR32, ///< Packed pixel, 4 bytes per pixel, XRGBXRGB...
PIX_FMT_YUV410P, ///< Planar YUV 4:1:0 (1 Cr & Cb sample per 4x4 Y samples)
+ PIX_FMT_YVU410P, ///< Planar YVU 4:1:0 (1 Cr & Cb sample per 4x4 Y samples)
PIX_FMT_YUV411P, ///< Planar YUV 4:1:1 (1 Cr & Cb sample per 4x1 Y samples)
PIX_FMT_RGB565, ///< always stored in cpu endianness
PIX_FMT_RGB555, ///< always stored in cpu endianness, most significant bit to 1
case PIX_FMT_YUV410P:
fmt = GST_MAKE_FOURCC ('Y', 'U', 'V', '9');
break;
+ case PIX_FMT_YVU410P:
+ fmt = GST_MAKE_FOURCC ('Y', 'V', 'U', '9');
+ break;
case PIX_FMT_YUV411P:
fmt = GST_MAKE_FOURCC ('Y', '4', '1', 'B');
break;
case GST_MAKE_FOURCC ('Y', 'U', 'V', '9'):
context->pix_fmt = PIX_FMT_YUV410P;
break;
+ case GST_MAKE_FOURCC ('Y', 'V', 'U', '9'):
+ context->pix_fmt = PIX_FMT_YVU410P;
+ break;
case GST_MAKE_FOURCC ('A', 'Y', 'U', 'V'):
context->pix_fmt = PIX_FMT_AYUV4444;
break;
return size + 2 * size2;
/* PIX_FMT_YVU420P = YV12: same as PIX_FMT_YUV420P, but
* with U and V plane swapped. Strides as in videotestsrc */
+ case PIX_FMT_YVU410P:
case PIX_FMT_YVU420P:
stride = GST_ROUND_UP_4 (width);
- h2 = GST_ROUND_UP_2 (height);
+ h2 = ROUND_UP_X (height, pinfo->y_chroma_shift);
size = stride * h2;
- stride2 = GST_ROUND_UP_8 (stride) / 2;
- h2 = GST_ROUND_UP_2 (height) / 2;
+ w2 = DIV_ROUND_UP_X (width, pinfo->x_chroma_shift);
+ stride2 = GST_ROUND_UP_4 (w2);
+ h2 = DIV_ROUND_UP_X (height, pinfo->y_chroma_shift);
size2 = stride2 * h2;
picture->data[0] = ptr;
picture->data[2] = picture->data[0] + size;
picture->data[1] = picture->data[2] + size2;
picture->linesize[0] = stride;
- picture->linesize[1] = GST_ROUND_UP_8 (stride) / 2;
- picture->linesize[2] = GST_ROUND_UP_8 (stride) / 2;
+ picture->linesize[1] = stride2;
+ picture->linesize[2] = stride2;
return size + 2 * size2;
case PIX_FMT_RGB24:
case PIX_FMT_BGR24:
/* .y_chroma_shift = */ 2,
/* .depth = */ 8,
},
+ /* [PIX_FMT_YVU410P] = */ {
+ /* .format = */ PIX_FMT_YVU410P,
+ /* .name = */ "yvu410p",
+ /* .nb_channels = */ 3,
+ /* .color_type = */ FF_COLOR_YUV,
+ /* .pixel_type = */ FF_PIXEL_PLANAR,
+ /* .is_alpha = */ 0,
+ /* .x_chroma_shift = */ 2,
+ /* .y_chroma_shift = */ 2,
+ /* .depth = */ 8,
+ },
/* [PIX_FMT_YUV411P] = */ {
/* .format = */ PIX_FMT_YUV411P,
/* .name = */ "yuv411p",