[gst-cvs] gst-plugins-base: ffmpegcolorspace: Fix Y16 from/to GRAY8 conversion
Sebastian Dröge
slomo at kemper.freedesktop.org
Sat Jun 12 07:52:02 PDT 2010
Module: gst-plugins-base
Branch: master
Commit: cef0bc9657398c23ef1013432bbb57b7767e215f
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=cef0bc9657398c23ef1013432bbb57b7767e215f
Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date: Sat Jun 12 16:51:41 2010 +0200
ffmpegcolorspace: Fix Y16 from/to GRAY8 conversion
---
gst/ffmpegcolorspace/imgconvert.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/gst/ffmpegcolorspace/imgconvert.c b/gst/ffmpegcolorspace/imgconvert.c
index ee4ffdf..579df34 100644
--- a/gst/ffmpegcolorspace/imgconvert.c
+++ b/gst/ffmpegcolorspace/imgconvert.c
@@ -3119,7 +3119,8 @@ img_convert (AVPicture * dst, int dst_pix_fmt,
}
/* gray to YUV */
- if (is_yuv_planar (dst_pix) && src_pix_fmt == PIX_FMT_GRAY8) {
+ if (is_yuv_planar (dst_pix) && dst_pix_fmt != PIX_FMT_Y16
+ && src_pix_fmt == PIX_FMT_GRAY8) {
int w, h, y;
uint8_t *d;
@@ -3149,7 +3150,8 @@ img_convert (AVPicture * dst, int dst_pix_fmt,
}
/* YUV to gray */
- if (is_yuv_planar (src_pix) && dst_pix_fmt == PIX_FMT_GRAY8) {
+ if (is_yuv_planar (src_pix) && src_pix_fmt != PIX_FMT_Y16
+ && dst_pix_fmt == PIX_FMT_GRAY8) {
if (src_pix->color_type == FF_COLOR_YUV_JPEG) {
img_copy_plane (dst->data[0], dst->linesize[0],
src->data[0], src->linesize[0], dst_width, dst_height);
More information about the Gstreamer-commits
mailing list