changeset 4515:a2b14c6fccfd libavcodec

consistency renaming: rgba32 --> rgb32
author diego
date Mon, 12 Feb 2007 23:07:17 +0000
parents 790d1cb93686
children 8f6fd50d2f40
files imgconvert.c imgconvert_template.h png.c
diffstat 3 files changed, 32 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/imgconvert.c	Mon Feb 12 10:05:19 2007 +0000
+++ b/imgconvert.c	Mon Feb 12 23:07:17 2007 +0000
@@ -1709,10 +1709,10 @@
 
 #include "imgconvert_template.h"
 
-/* rgba32 handling */
+/* rgb32 handling */
 
-#define RGB_NAME rgba32
-#define FMT_RGBA32
+#define RGB_NAME rgb32
+#define FMT_RGB32
 
 #define RGB_IN(r, g, b, s)\
 {\
@@ -1958,7 +1958,7 @@
             .convert = yuv420p_to_rgb24
         },
         [PIX_FMT_RGB32] = {
-            .convert = yuv420p_to_rgba32
+            .convert = yuv420p_to_rgb32
         },
         [PIX_FMT_UYVY422] = {
             .convert = yuv420p_to_uyvy422,
@@ -1991,7 +1991,7 @@
             .convert = yuvj420p_to_rgb24
         },
         [PIX_FMT_RGB32] = {
-            .convert = yuvj420p_to_rgba32
+            .convert = yuvj420p_to_rgb32
         },
     },
     [PIX_FMT_YUVJ444P] = {
@@ -2026,7 +2026,7 @@
             .convert = rgb24_to_rgb555
         },
         [PIX_FMT_RGB32] = {
-            .convert = rgb24_to_rgba32
+            .convert = rgb24_to_rgb32
         },
         [PIX_FMT_BGR24] = {
             .convert = rgb24_to_bgr24
@@ -2049,30 +2049,30 @@
     },
     [PIX_FMT_RGB32] = {
         [PIX_FMT_RGB24] = {
-            .convert = rgba32_to_rgb24
+            .convert = rgb32_to_rgb24
         },
         [PIX_FMT_BGR24] = {
-            .convert = rgba32_to_bgr24
+            .convert = rgb32_to_bgr24
         },
         [PIX_FMT_RGB565] = {
-            .convert = rgba32_to_rgb565
+            .convert = rgb32_to_rgb565
         },
         [PIX_FMT_RGB555] = {
-            .convert = rgba32_to_rgb555
+            .convert = rgb32_to_rgb555
         },
         [PIX_FMT_PAL8] = {
-            .convert = rgba32_to_pal8
+            .convert = rgb32_to_pal8
         },
         [PIX_FMT_YUV420P] = {
-            .convert = rgba32_to_yuv420p
+            .convert = rgb32_to_yuv420p
         },
         [PIX_FMT_GRAY8] = {
-            .convert = rgba32_to_gray
+            .convert = rgb32_to_gray
         },
     },
     [PIX_FMT_BGR24] = {
         [PIX_FMT_RGB32] = {
-            .convert = bgr24_to_rgba32
+            .convert = bgr24_to_rgb32
         },
         [PIX_FMT_RGB24] = {
             .convert = bgr24_to_rgb24
@@ -2089,7 +2089,7 @@
             .convert = rgb555_to_rgb24
         },
         [PIX_FMT_RGB32] = {
-            .convert = rgb555_to_rgba32
+            .convert = rgb555_to_rgb32
         },
         [PIX_FMT_YUV420P] = {
             .convert = rgb555_to_yuv420p
@@ -2100,7 +2100,7 @@
     },
     [PIX_FMT_RGB565] = {
         [PIX_FMT_RGB32] = {
-            .convert = rgb565_to_rgba32
+            .convert = rgb565_to_rgb32
         },
         [PIX_FMT_RGB24] = {
             .convert = rgb565_to_rgb24
@@ -2142,7 +2142,7 @@
             .convert = gray_to_bgr24
         },
         [PIX_FMT_RGB32] = {
-            .convert = gray_to_rgba32
+            .convert = gray_to_rgb32
         },
         [PIX_FMT_MONOWHITE] = {
             .convert = gray_to_monowhite
@@ -2181,7 +2181,7 @@
             .convert = pal8_to_rgb24
         },
         [PIX_FMT_RGB32] = {
-            .convert = pal8_to_rgba32
+            .convert = pal8_to_rgb32
         },
     },
     [PIX_FMT_UYYVYY411] = {
@@ -2598,7 +2598,7 @@
         return 0;
     switch(pix_fmt) {
     case PIX_FMT_RGB32:
-        ret = get_alpha_info_rgba32(src, width, height);
+        ret = get_alpha_info_rgb32(src, width, height);
         break;
     case PIX_FMT_PAL8:
         ret = get_alpha_info_pal8(src, width, height);
--- a/imgconvert_template.h	Mon Feb 12 10:05:19 2007 +0000
+++ b/imgconvert_template.h	Mon Feb 12 23:07:17 2007 +0000
@@ -411,10 +411,10 @@
 }
 
 // RGB24 has optimised routines
-#if !defined(FMT_RGBA32) && !defined(FMT_RGB24)
+#if !defined(FMT_RGB32) && !defined(FMT_RGB24)
 /* alpha support */
 
-static void glue(rgba32_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src,
+static void glue(rgb32_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src,
                                       int width, int height)
 {
     const uint8_t *s;
@@ -451,7 +451,7 @@
     }
 }
 
-static void glue(RGB_NAME, _to_rgba32)(AVPicture *dst, const AVPicture *src,
+static void glue(RGB_NAME, _to_rgb32)(AVPicture *dst, const AVPicture *src,
                                        int width, int height)
 {
     const uint8_t *s;
@@ -485,7 +485,7 @@
     }
 }
 
-#endif /* !defined(FMT_RGBA32) */
+#endif /* !defined(FMT_RGB32) */
 
 #ifndef FMT_RGB24
 
@@ -788,7 +788,7 @@
 
 #endif /* FMT_RGB24 */
 
-#if defined(FMT_RGB24) || defined(FMT_RGBA32)
+#if defined(FMT_RGB24) || defined(FMT_RGB32)
 
 static void glue(RGB_NAME, _to_pal8)(AVPicture *dst, const AVPicture *src,
                                      int width, int height)
@@ -834,7 +834,7 @@
     build_rgb_palette(dst->data[1], has_alpha);
 }
 
-#endif /* defined(FMT_RGB24) || defined(FMT_RGBA32) */
+#endif /* defined(FMT_RGB24) || defined(FMT_RGB32) */
 
 #ifdef RGBA_IN
 
@@ -872,4 +872,4 @@
 #undef BPP
 #undef RGB_NAME
 #undef FMT_RGB24
-#undef FMT_RGBA32
+#undef FMT_RGB32
--- a/png.c	Mon Feb 12 10:05:19 2007 +0000
+++ b/png.c	Mon Feb 12 23:07:17 2007 +0000
@@ -344,7 +344,7 @@
 }
 
 #ifdef CONFIG_ENCODERS
-static void convert_from_rgba32(uint8_t *dst, const uint8_t *src, int width)
+static void convert_from_rgb32(uint8_t *dst, const uint8_t *src, int width)
 {
     uint8_t *d;
     int j;
@@ -363,7 +363,7 @@
 #endif
 
 #ifdef CONFIG_DECODERS
-static void convert_to_rgba32(uint8_t *dst, const uint8_t *src, int width)
+static void convert_to_rgb32(uint8_t *dst, const uint8_t *src, int width)
 {
     int j;
     unsigned int r, g, b, a;
@@ -392,7 +392,7 @@
             png_filter_row(s->tmp_row, s->crow_buf[0], s->crow_buf + 1,
                            s->last_row, s->row_size, s->bpp);
             memcpy(s->last_row, s->tmp_row, s->row_size);
-            convert_to_rgba32(ptr, s->tmp_row, s->width);
+            convert_to_rgb32(ptr, s->tmp_row, s->width);
         } else {
             /* in normal case, we avoid one copy */
             if (s->y == 0)
@@ -422,7 +422,7 @@
                 got_line = 1;
             }
             if ((png_pass_dsp_ymask[s->pass] << (s->y & 7)) & 0x80) {
-                /* NOTE: rgba32 is handled directly in png_put_interlaced_row */
+                /* NOTE: RGB32 is handled directly in png_put_interlaced_row */
                 png_put_interlaced_row(ptr, s->width, s->bits_per_pixel, s->pass,
                                        s->color_type, s->last_row);
             }
@@ -882,7 +882,7 @@
                     if ((png_pass_ymask[pass] << (y & 7)) & 0x80) {
                         ptr = p->data[0] + y * p->linesize[0];
                         if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) {
-                            convert_from_rgba32(tmp_buf, ptr, avctx->width);
+                            convert_from_rgb32(tmp_buf, ptr, avctx->width);
                             ptr1 = tmp_buf;
                         } else {
                             ptr1 = ptr;
@@ -900,7 +900,7 @@
         for(y = 0; y < avctx->height; y++) {
             ptr = p->data[0] + y * p->linesize[0];
             if (color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-                convert_from_rgba32(crow_buf + 1, ptr, avctx->width);
+                convert_from_rgb32(crow_buf + 1, ptr, avctx->width);
             else
                 memcpy(crow_buf + 1, ptr, row_size);
             crow_buf[0] = PNG_FILTER_VALUE_NONE;