# HG changeset patch # User stefano # Date 1237676900 0 # Node ID 53f2c0f6e71d9151236e88fcc11ae71ab19b75b2 # Parent e314914641bc8cb4f5c78e9f7064d2c057ce45e0 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. diff -r e314914641bc -r 53f2c0f6e71d imgconvert.c --- a/imgconvert.c Sat Mar 21 22:43:46 2009 +0000 +++ b/imgconvert.c Sat Mar 21 23:08:20 2009 +0000 @@ -216,16 +216,32 @@ .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 @@ .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_BGR555] = { - .name = "bgr555", + [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_BGR555LE] = { + .name = "bgr555le", .nb_channels = 3, .color_type = FF_COLOR_RGB, .pixel_type = FF_PIXEL_PACKED, diff -r e314914641bc -r 53f2c0f6e71d pixdesc.c --- a/pixdesc.c Sat Mar 21 22:43:46 2009 +0000 +++ b/pixdesc.c Sat Mar 21 23:08:20 2009 +0000 @@ -154,8 +154,6 @@ }, .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 @@ }, .flags = PIX_FMT_BE, }, -#endif [PIX_FMT_MONOBLACK] = { .name = "monoblack", .nb_channels = 1,