diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2004-06-14 13:19:39 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2004-06-14 13:19:39 +0000 |
commit | f1a3a74db3f48cd4455cc433c4f30b2fa8297a03 (patch) | |
tree | 8725c5dbd41907a1f81bc008230d25e0537f00fc | |
parent | 88cf80dc19d17698f8189a5ebd1dcb7f4849bb65 (diff) |
gst/ffmpegcolorspace/imgconvert.c: Patch 1.3 broke the ordering of the colorspace info and made the plugin basically ...
Original commit message from CVS:
* gst/ffmpegcolorspace/imgconvert.c: (img_convert):
Patch 1.3 broke the ordering of the colorspace info and
made the plugin basically work by coincidence, reodered
the info.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | gst/ffmpegcolorspace/imgconvert.c | 138 |
2 files changed, 73 insertions, 72 deletions
@@ -1,3 +1,10 @@ +2004-06-14 Wim Taymans <wim@fluendo.com> + + * gst/ffmpegcolorspace/imgconvert.c: (img_convert): + Patch 1.3 broke the ordering of the colorspace info and + made the plugin basically work by coincidence, reodered + the info. + 2004-06-14 Thomas Vander Stichele <thomas at apestaart dot org> * ext/lame/gstlame.c: diff --git a/gst/ffmpegcolorspace/imgconvert.c b/gst/ffmpegcolorspace/imgconvert.c index 4352fbad2..4452647b6 100644 --- a/gst/ffmpegcolorspace/imgconvert.c +++ b/gst/ffmpegcolorspace/imgconvert.c @@ -80,26 +80,6 @@ static PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { /* .y_chroma_shift = */ 1, /* .depth = */ 8, }, - /* [PIX_FMT_YUV422P] = */ { - /* .name = */ "yuv422p", - /* .nb_channels = */ 3, - /* .color_type = */ FF_COLOR_YUV, - /* .pixel_type = */ FF_PIXEL_PLANAR, - /* .is_alpha = */ 0, - /* .x_chroma_shift = */ 1, - /* .y_chroma_shift = */ 0, - /* .depth = */ 8, - }, - /* [PIX_FMT_YUV444P] = */ { - /* .name = */ "yuv444p", - /* .nb_channels = */ 3, - /* .color_type = */ FF_COLOR_YUV, - /* .pixel_type = */ FF_PIXEL_PLANAR, - /* .is_alpha = */ 0, - /* .x_chroma_shift = */ 0, - /* .y_chroma_shift = */ 0, - /* .depth = */ 8, - }, /* [PIX_FMT_YUV422] = */ { /* .name = */ "yuv422", /* .nb_channels = */ 1, @@ -110,87 +90,73 @@ static PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { /* .y_chroma_shift = */ 0, /* .depth = */ 8, }, - /* [PIX_FMT_YUV410P] = */ { - /* .name = */ "yuv410p", - /* .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] = */ { - /* .name = */ "yuv411p", + /* [PIX_FMT_RGB24] = */ { + /* .name = */ "rgb24", /* .nb_channels = */ 3, - /* .color_type = */ FF_COLOR_YUV, - /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .color_type = */ FF_COLOR_RGB, + /* .pixel_type = */ FF_PIXEL_PACKED, /* .is_alpha = */ 0, - /* .x_chroma_shift = */ 2, + /* .x_chroma_shift = */ 0, /* .y_chroma_shift = */ 0, /* .depth = */ 8, }, - - /* JPEG YUV */ - /* [PIX_FMT_YUVJ420P] = */ { - /* .name = */ "yuvj420p", + /* [PIX_FMT_BGR24] = */ { + /* .name = */ "bgr24", /* .nb_channels = */ 3, - /* .color_type = */ FF_COLOR_YUV_JPEG, - /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .color_type = */ FF_COLOR_RGB, + /* .pixel_type = */ FF_PIXEL_PACKED, /* .is_alpha = */ 0, - /* .x_chroma_shift = */ 1, - /* .y_chroma_shift = */ 1, + /* .x_chroma_shift = */ 0, + /* .y_chroma_shift = */ 0, /* .depth = */ 8, }, - /* [PIX_FMT_YUVJ422P] = */ { - /* .name = */ "yuvj422p", + /* [PIX_FMT_YUV422P] = */ { + /* .name = */ "yuv422p", /* .nb_channels = */ 3, - /* .color_type = */ FF_COLOR_YUV_JPEG, + /* .color_type = */ FF_COLOR_YUV, /* .pixel_type = */ FF_PIXEL_PLANAR, /* .is_alpha = */ 0, /* .x_chroma_shift = */ 1, /* .y_chroma_shift = */ 0, /* .depth = */ 8, }, - /* [PIX_FMT_YUVJ444P] = */ { - /* .name = */ "yuvj444p", + /* [PIX_FMT_YUV444P] = */ { + /* .name = */ "yuv444p", /* .nb_channels = */ 3, - /* .color_type = */ FF_COLOR_YUV_JPEG, + /* .color_type = */ FF_COLOR_YUV, /* .pixel_type = */ FF_PIXEL_PLANAR, /* .is_alpha = */ 0, /* .x_chroma_shift = */ 0, /* .y_chroma_shift = */ 0, /* .depth = */ 8, }, - - /* RGB formats */ - /* [PIX_FMT_RGB24] = */ { - /* .name = */ "rgb24", - /* .nb_channels = */ 3, + /* [PIX_FMT_RGBA32] = */ { + /* .name = */ "rgba32", + /* .nb_channels = */ 4, /* .color_type = */ FF_COLOR_RGB, /* .pixel_type = */ FF_PIXEL_PACKED, - /* .is_alpha = */ 0, + /* .is_alpha = */ 1, /* .x_chroma_shift = */ 0, /* .y_chroma_shift = */ 0, /* .depth = */ 8, }, - /* [PIX_FMT_BGR24] = */ { - /* .name = */ "bgr24", + /* [PIX_FMT_YUV410P] = */ { + /* .name = */ "yuv410p", /* .nb_channels = */ 3, - /* .color_type = */ FF_COLOR_RGB, - /* .pixel_type = */ FF_PIXEL_PACKED, + /* .color_type = */ FF_COLOR_YUV, + /* .pixel_type = */ FF_PIXEL_PLANAR, /* .is_alpha = */ 0, - /* .x_chroma_shift = */ 0, - /* .y_chroma_shift = */ 0, + /* .x_chroma_shift = */ 2, + /* .y_chroma_shift = */ 2, /* .depth = */ 8, }, - /* [PIX_FMT_RGBA32] = */ { - /* .name = */ "rgba32", - /* .nb_channels = */ 4, - /* .color_type = */ FF_COLOR_RGB, - /* .pixel_type = */ FF_PIXEL_PACKED, - /* .is_alpha = */ 1, - /* .x_chroma_shift = */ 0, + /* [PIX_FMT_YUV411P] = */ { + /* .name = */ "yuv411p", + /* .nb_channels = */ 3, + /* .color_type = */ FF_COLOR_YUV, + /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 2, /* .y_chroma_shift = */ 0, /* .depth = */ 8, }, @@ -214,8 +180,6 @@ static PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { /* .y_chroma_shift = */ 0, /* .depth = */ 5, }, - - /* gray / mono formats */ /* [PIX_FMT_GRAY8] = */ { /* .name = */ "gray", /* .nb_channels = */ 1, @@ -246,8 +210,6 @@ static PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { /* .y_chroma_shift = */ 0, /* .depth = */ 1, }, - - /* paletted formats */ /* [PIX_FMT_PAL8] = */ { /* .name = */ "pal8", /* .nb_channels = */ 4, @@ -258,6 +220,37 @@ static PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { /* .y_chroma_shift = */ 0, /* .depth = */ 8, }, + /* JPEG YUV */ + /* [PIX_FMT_YUVJ420P] = */ { + /* .name = */ "yuvj420p", + /* .nb_channels = */ 3, + /* .color_type = */ FF_COLOR_YUV_JPEG, + /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 1, + /* .y_chroma_shift = */ 1, + /* .depth = */ 8, + }, + /* [PIX_FMT_YUVJ422P] = */ { + /* .name = */ "yuvj422p", + /* .nb_channels = */ 3, + /* .color_type = */ FF_COLOR_YUV_JPEG, + /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 1, + /* .y_chroma_shift = */ 0, + /* .depth = */ 8, + }, + /* [PIX_FMT_YUVJ444P] = */ { + /* .name = */ "yuvj444p", + /* .nb_channels = */ 3, + /* .color_type = */ FF_COLOR_YUV_JPEG, + /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 0, + /* .y_chroma_shift = */ 0, + /* .depth = */ 8, + }, }; void @@ -1635,6 +1628,7 @@ img_convert (AVPicture * dst, int dst_pix_fmt, dst_pix = &pix_fmt_info[dst_pix_fmt]; src_pix = &pix_fmt_info[src_pix_fmt]; + if (src_pix_fmt == dst_pix_fmt) { /* no conversion needed: just copy */ img_copy (dst, src, dst_pix_fmt, dst_width, dst_height); |