From f82674e584d0550f3000658c6a579c4b9db139fe Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sat, 21 Mar 2009 23:08:20 +0000 Subject: Change the RGB5X5/BGR5X5 pixel format defines so that we have little endian and big endian variants instead of native-endian ones. This patch breaks API/ABI backward-compatibility. Originally committed as revision 18133 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/imgconvert.c | 48 ++++++++++++++++++++++++++++++++++++++++-------- libavcodec/pixdesc.c | 3 --- 2 files changed, 40 insertions(+), 11 deletions(-) (limited to 'libavcodec') diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index 8619b40336..0abefbadc7 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -216,16 +216,32 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { .depth = 16, .x_chroma_shift = 0, .y_chroma_shift = 0, }, - [PIX_FMT_RGB565] = { - .name = "rgb565", + [PIX_FMT_RGB565BE] = { + .name = "rgb565be", .nb_channels = 3, .color_type = FF_COLOR_RGB, .pixel_type = FF_PIXEL_PACKED, .depth = 5, .x_chroma_shift = 0, .y_chroma_shift = 0, }, - [PIX_FMT_RGB555] = { - .name = "rgb555", + [PIX_FMT_RGB565LE] = { + .name = "rgb565le", + .nb_channels = 3, + .color_type = FF_COLOR_RGB, + .pixel_type = FF_PIXEL_PACKED, + .depth = 5, + .x_chroma_shift = 0, .y_chroma_shift = 0, + }, + [PIX_FMT_RGB555BE] = { + .name = "rgb555be", + .nb_channels = 3, + .color_type = FF_COLOR_RGB, + .pixel_type = FF_PIXEL_PACKED, + .depth = 5, + .x_chroma_shift = 0, .y_chroma_shift = 0, + }, + [PIX_FMT_RGB555LE] = { + .name = "rgb555le", .nb_channels = 3, .color_type = FF_COLOR_RGB, .pixel_type = FF_PIXEL_PACKED, @@ -327,16 +343,32 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { .depth = 8, .x_chroma_shift = 0, .y_chroma_shift = 0, }, - [PIX_FMT_BGR565] = { - .name = "bgr565", + [PIX_FMT_BGR565BE] = { + .name = "bgr565be", + .nb_channels = 3, + .color_type = FF_COLOR_RGB, + .pixel_type = FF_PIXEL_PACKED, + .depth = 5, + .x_chroma_shift = 0, .y_chroma_shift = 0, + }, + [PIX_FMT_BGR565LE] = { + .name = "bgr565le", + .nb_channels = 3, + .color_type = FF_COLOR_RGB, + .pixel_type = FF_PIXEL_PACKED, + .depth = 5, + .x_chroma_shift = 0, .y_chroma_shift = 0, + }, + [PIX_FMT_BGR555BE] = { + .name = "bgr555be", .nb_channels = 3, .color_type = FF_COLOR_RGB, .pixel_type = FF_PIXEL_PACKED, .depth = 5, .x_chroma_shift = 0, .y_chroma_shift = 0, }, - [PIX_FMT_BGR555] = { - .name = "bgr555", + [PIX_FMT_BGR555LE] = { + .name = "bgr555le", .nb_channels = 3, .color_type = FF_COLOR_RGB, .pixel_type = FF_PIXEL_PACKED, diff --git a/libavcodec/pixdesc.c b/libavcodec/pixdesc.c index b4157fc5e7..5851ab0869 100644 --- a/libavcodec/pixdesc.c +++ b/libavcodec/pixdesc.c @@ -154,8 +154,6 @@ static const AVPixFmtDescriptor pix_fmt_desc[PIX_FMT_NB] = { }, .flags = PIX_FMT_BE, }, -//FIXME change pix fmt defines so that we have a LE & BE instead of a native-endian -#if 0 [PIX_FMT_RGB565LE] = { .name = "rgb565le", .nb_channels = 3, @@ -179,7 +177,6 @@ static const AVPixFmtDescriptor pix_fmt_desc[PIX_FMT_NB] = { }, .flags = PIX_FMT_BE, }, -#endif [PIX_FMT_MONOBLACK] = { .name = "monoblack", .nb_channels = 1, -- cgit v1.2.3