mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
consistency renaming: rgba32 --> rgb32
Originally committed as revision 7957 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
5a4f1328ef
commit
3cf5b6bed7
@ -1709,10 +1709,10 @@ static inline unsigned int bitcopy_n(unsigned int a, int n)
|
|||||||
|
|
||||||
#include "imgconvert_template.h"
|
#include "imgconvert_template.h"
|
||||||
|
|
||||||
/* rgba32 handling */
|
/* rgb32 handling */
|
||||||
|
|
||||||
#define RGB_NAME rgba32
|
#define RGB_NAME rgb32
|
||||||
#define FMT_RGBA32
|
#define FMT_RGB32
|
||||||
|
|
||||||
#define RGB_IN(r, g, b, s)\
|
#define RGB_IN(r, g, b, s)\
|
||||||
{\
|
{\
|
||||||
@ -1958,7 +1958,7 @@ static const ConvertEntry convert_table[PIX_FMT_NB][PIX_FMT_NB] = {
|
|||||||
.convert = yuv420p_to_rgb24
|
.convert = yuv420p_to_rgb24
|
||||||
},
|
},
|
||||||
[PIX_FMT_RGB32] = {
|
[PIX_FMT_RGB32] = {
|
||||||
.convert = yuv420p_to_rgba32
|
.convert = yuv420p_to_rgb32
|
||||||
},
|
},
|
||||||
[PIX_FMT_UYVY422] = {
|
[PIX_FMT_UYVY422] = {
|
||||||
.convert = yuv420p_to_uyvy422,
|
.convert = yuv420p_to_uyvy422,
|
||||||
@ -1991,7 +1991,7 @@ static const ConvertEntry convert_table[PIX_FMT_NB][PIX_FMT_NB] = {
|
|||||||
.convert = yuvj420p_to_rgb24
|
.convert = yuvj420p_to_rgb24
|
||||||
},
|
},
|
||||||
[PIX_FMT_RGB32] = {
|
[PIX_FMT_RGB32] = {
|
||||||
.convert = yuvj420p_to_rgba32
|
.convert = yuvj420p_to_rgb32
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
[PIX_FMT_YUVJ444P] = {
|
[PIX_FMT_YUVJ444P] = {
|
||||||
@ -2026,7 +2026,7 @@ static const ConvertEntry convert_table[PIX_FMT_NB][PIX_FMT_NB] = {
|
|||||||
.convert = rgb24_to_rgb555
|
.convert = rgb24_to_rgb555
|
||||||
},
|
},
|
||||||
[PIX_FMT_RGB32] = {
|
[PIX_FMT_RGB32] = {
|
||||||
.convert = rgb24_to_rgba32
|
.convert = rgb24_to_rgb32
|
||||||
},
|
},
|
||||||
[PIX_FMT_BGR24] = {
|
[PIX_FMT_BGR24] = {
|
||||||
.convert = rgb24_to_bgr24
|
.convert = rgb24_to_bgr24
|
||||||
@ -2049,30 +2049,30 @@ static const ConvertEntry convert_table[PIX_FMT_NB][PIX_FMT_NB] = {
|
|||||||
},
|
},
|
||||||
[PIX_FMT_RGB32] = {
|
[PIX_FMT_RGB32] = {
|
||||||
[PIX_FMT_RGB24] = {
|
[PIX_FMT_RGB24] = {
|
||||||
.convert = rgba32_to_rgb24
|
.convert = rgb32_to_rgb24
|
||||||
},
|
},
|
||||||
[PIX_FMT_BGR24] = {
|
[PIX_FMT_BGR24] = {
|
||||||
.convert = rgba32_to_bgr24
|
.convert = rgb32_to_bgr24
|
||||||
},
|
},
|
||||||
[PIX_FMT_RGB565] = {
|
[PIX_FMT_RGB565] = {
|
||||||
.convert = rgba32_to_rgb565
|
.convert = rgb32_to_rgb565
|
||||||
},
|
},
|
||||||
[PIX_FMT_RGB555] = {
|
[PIX_FMT_RGB555] = {
|
||||||
.convert = rgba32_to_rgb555
|
.convert = rgb32_to_rgb555
|
||||||
},
|
},
|
||||||
[PIX_FMT_PAL8] = {
|
[PIX_FMT_PAL8] = {
|
||||||
.convert = rgba32_to_pal8
|
.convert = rgb32_to_pal8
|
||||||
},
|
},
|
||||||
[PIX_FMT_YUV420P] = {
|
[PIX_FMT_YUV420P] = {
|
||||||
.convert = rgba32_to_yuv420p
|
.convert = rgb32_to_yuv420p
|
||||||
},
|
},
|
||||||
[PIX_FMT_GRAY8] = {
|
[PIX_FMT_GRAY8] = {
|
||||||
.convert = rgba32_to_gray
|
.convert = rgb32_to_gray
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
[PIX_FMT_BGR24] = {
|
[PIX_FMT_BGR24] = {
|
||||||
[PIX_FMT_RGB32] = {
|
[PIX_FMT_RGB32] = {
|
||||||
.convert = bgr24_to_rgba32
|
.convert = bgr24_to_rgb32
|
||||||
},
|
},
|
||||||
[PIX_FMT_RGB24] = {
|
[PIX_FMT_RGB24] = {
|
||||||
.convert = bgr24_to_rgb24
|
.convert = bgr24_to_rgb24
|
||||||
@ -2089,7 +2089,7 @@ static const ConvertEntry convert_table[PIX_FMT_NB][PIX_FMT_NB] = {
|
|||||||
.convert = rgb555_to_rgb24
|
.convert = rgb555_to_rgb24
|
||||||
},
|
},
|
||||||
[PIX_FMT_RGB32] = {
|
[PIX_FMT_RGB32] = {
|
||||||
.convert = rgb555_to_rgba32
|
.convert = rgb555_to_rgb32
|
||||||
},
|
},
|
||||||
[PIX_FMT_YUV420P] = {
|
[PIX_FMT_YUV420P] = {
|
||||||
.convert = rgb555_to_yuv420p
|
.convert = rgb555_to_yuv420p
|
||||||
@ -2100,7 +2100,7 @@ static const ConvertEntry convert_table[PIX_FMT_NB][PIX_FMT_NB] = {
|
|||||||
},
|
},
|
||||||
[PIX_FMT_RGB565] = {
|
[PIX_FMT_RGB565] = {
|
||||||
[PIX_FMT_RGB32] = {
|
[PIX_FMT_RGB32] = {
|
||||||
.convert = rgb565_to_rgba32
|
.convert = rgb565_to_rgb32
|
||||||
},
|
},
|
||||||
[PIX_FMT_RGB24] = {
|
[PIX_FMT_RGB24] = {
|
||||||
.convert = rgb565_to_rgb24
|
.convert = rgb565_to_rgb24
|
||||||
@ -2142,7 +2142,7 @@ static const ConvertEntry convert_table[PIX_FMT_NB][PIX_FMT_NB] = {
|
|||||||
.convert = gray_to_bgr24
|
.convert = gray_to_bgr24
|
||||||
},
|
},
|
||||||
[PIX_FMT_RGB32] = {
|
[PIX_FMT_RGB32] = {
|
||||||
.convert = gray_to_rgba32
|
.convert = gray_to_rgb32
|
||||||
},
|
},
|
||||||
[PIX_FMT_MONOWHITE] = {
|
[PIX_FMT_MONOWHITE] = {
|
||||||
.convert = gray_to_monowhite
|
.convert = gray_to_monowhite
|
||||||
@ -2181,7 +2181,7 @@ static const ConvertEntry convert_table[PIX_FMT_NB][PIX_FMT_NB] = {
|
|||||||
.convert = pal8_to_rgb24
|
.convert = pal8_to_rgb24
|
||||||
},
|
},
|
||||||
[PIX_FMT_RGB32] = {
|
[PIX_FMT_RGB32] = {
|
||||||
.convert = pal8_to_rgba32
|
.convert = pal8_to_rgb32
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
[PIX_FMT_UYYVYY411] = {
|
[PIX_FMT_UYYVYY411] = {
|
||||||
@ -2598,7 +2598,7 @@ int img_get_alpha_info(const AVPicture *src,
|
|||||||
return 0;
|
return 0;
|
||||||
switch(pix_fmt) {
|
switch(pix_fmt) {
|
||||||
case PIX_FMT_RGB32:
|
case PIX_FMT_RGB32:
|
||||||
ret = get_alpha_info_rgba32(src, width, height);
|
ret = get_alpha_info_rgb32(src, width, height);
|
||||||
break;
|
break;
|
||||||
case PIX_FMT_PAL8:
|
case PIX_FMT_PAL8:
|
||||||
ret = get_alpha_info_pal8(src, width, height);
|
ret = get_alpha_info_pal8(src, width, height);
|
||||||
|
@ -411,10 +411,10 @@ static void glue(pal8_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// RGB24 has optimised routines
|
// RGB24 has optimised routines
|
||||||
#if !defined(FMT_RGBA32) && !defined(FMT_RGB24)
|
#if !defined(FMT_RGB32) && !defined(FMT_RGB24)
|
||||||
/* alpha support */
|
/* 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)
|
int width, int height)
|
||||||
{
|
{
|
||||||
const uint8_t *s;
|
const uint8_t *s;
|
||||||
@ -451,7 +451,7 @@ static void glue(rgba32_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
int width, int height)
|
||||||
{
|
{
|
||||||
const uint8_t *s;
|
const uint8_t *s;
|
||||||
@ -485,7 +485,7 @@ static void glue(RGB_NAME, _to_rgba32)(AVPicture *dst, const AVPicture *src,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !defined(FMT_RGBA32) */
|
#endif /* !defined(FMT_RGB32) */
|
||||||
|
|
||||||
#ifndef FMT_RGB24
|
#ifndef FMT_RGB24
|
||||||
|
|
||||||
@ -788,7 +788,7 @@ static void rgb24_to_yuvj444p(AVPicture *dst, const AVPicture *src,
|
|||||||
|
|
||||||
#endif /* FMT_RGB24 */
|
#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,
|
static void glue(RGB_NAME, _to_pal8)(AVPicture *dst, const AVPicture *src,
|
||||||
int width, int height)
|
int width, int height)
|
||||||
@ -834,7 +834,7 @@ static void glue(RGB_NAME, _to_pal8)(AVPicture *dst, const AVPicture *src,
|
|||||||
build_rgb_palette(dst->data[1], has_alpha);
|
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
|
#ifdef RGBA_IN
|
||||||
|
|
||||||
@ -872,4 +872,4 @@ static int glue(get_alpha_info_, RGB_NAME)(const AVPicture *src,
|
|||||||
#undef BPP
|
#undef BPP
|
||||||
#undef RGB_NAME
|
#undef RGB_NAME
|
||||||
#undef FMT_RGB24
|
#undef FMT_RGB24
|
||||||
#undef FMT_RGBA32
|
#undef FMT_RGB32
|
||||||
|
@ -344,7 +344,7 @@ static void png_filter_row(uint8_t *dst, int filter_type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#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;
|
uint8_t *d;
|
||||||
int j;
|
int j;
|
||||||
@ -363,7 +363,7 @@ static void convert_from_rgba32(uint8_t *dst, const uint8_t *src, int width)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DECODERS
|
#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;
|
int j;
|
||||||
unsigned int r, g, b, a;
|
unsigned int r, g, b, a;
|
||||||
@ -392,7 +392,7 @@ static void png_handle_row(PNGContext *s)
|
|||||||
png_filter_row(s->tmp_row, s->crow_buf[0], s->crow_buf + 1,
|
png_filter_row(s->tmp_row, s->crow_buf[0], s->crow_buf + 1,
|
||||||
s->last_row, s->row_size, s->bpp);
|
s->last_row, s->row_size, s->bpp);
|
||||||
memcpy(s->last_row, s->tmp_row, s->row_size);
|
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 {
|
} else {
|
||||||
/* in normal case, we avoid one copy */
|
/* in normal case, we avoid one copy */
|
||||||
if (s->y == 0)
|
if (s->y == 0)
|
||||||
@ -422,7 +422,7 @@ static void png_handle_row(PNGContext *s)
|
|||||||
got_line = 1;
|
got_line = 1;
|
||||||
}
|
}
|
||||||
if ((png_pass_dsp_ymask[s->pass] << (s->y & 7)) & 0x80) {
|
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,
|
png_put_interlaced_row(ptr, s->width, s->bits_per_pixel, s->pass,
|
||||||
s->color_type, s->last_row);
|
s->color_type, s->last_row);
|
||||||
}
|
}
|
||||||
@ -882,7 +882,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
|
|||||||
if ((png_pass_ymask[pass] << (y & 7)) & 0x80) {
|
if ((png_pass_ymask[pass] << (y & 7)) & 0x80) {
|
||||||
ptr = p->data[0] + y * p->linesize[0];
|
ptr = p->data[0] + y * p->linesize[0];
|
||||||
if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) {
|
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;
|
ptr1 = tmp_buf;
|
||||||
} else {
|
} else {
|
||||||
ptr1 = ptr;
|
ptr1 = ptr;
|
||||||
@ -900,7 +900,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
|
|||||||
for(y = 0; y < avctx->height; y++) {
|
for(y = 0; y < avctx->height; y++) {
|
||||||
ptr = p->data[0] + y * p->linesize[0];
|
ptr = p->data[0] + y * p->linesize[0];
|
||||||
if (color_type == PNG_COLOR_TYPE_RGB_ALPHA)
|
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
|
else
|
||||||
memcpy(crow_buf + 1, ptr, row_size);
|
memcpy(crow_buf + 1, ptr, row_size);
|
||||||
crow_buf[0] = PNG_FILTER_VALUE_NONE;
|
crow_buf[0] = PNG_FILTER_VALUE_NONE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user