changeset 9223:53f2c0f6e71d libavcodec

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.
author stefano
date Sat, 21 Mar 2009 23:08:20 +0000
parents e314914641bc
children aed92dbae82e
files imgconvert.c pixdesc.c
diffstat 2 files changed, 40 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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,
--- 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,