diff options
author | Philip Gladstone <philipjsg@users.sourceforge.net> | 2002-07-27 03:08:04 +0000 |
---|---|---|
committer | Philip Gladstone <philipjsg@users.sourceforge.net> | 2002-07-27 03:08:04 +0000 |
commit | b71472eb62ec9317bfe119ede3222bf66dbbdb1a (patch) | |
tree | 86068aa491598cef51b5a9405199313556a2be1b /libavcodec/utils.c | |
parent | 64e105e051ca3e5088b0db64551244482b2836b4 (diff) | |
download | ffmpeg-b71472eb62ec9317bfe119ede3222bf66dbbdb1a.tar.gz |
Add conversions to and from RGBA32 and BGRA32.
Originally committed as revision 824 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 05fd6ab704..943614da65 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -199,6 +199,8 @@ const char *pix_fmt_str[] = { "bgr24", "yuv422p", "yuv444p", + "rgba32", + "bgra32", "yuv410p" }; @@ -299,7 +301,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) } break; default: - abort(); + av_abort(); } if (bitrate != 0) { snprintf(buf + strlen(buf), buf_size - strlen(buf), @@ -346,6 +348,13 @@ void avpicture_fill(AVPicture *picture, UINT8 *ptr, picture->data[2] = NULL; picture->linesize[0] = width * 3; break; + case PIX_FMT_RGBA32: + case PIX_FMT_BGRA32: + picture->data[0] = ptr; + picture->data[1] = NULL; + picture->data[2] = NULL; + picture->linesize[0] = width * 4; + break; case PIX_FMT_YUV422: picture->data[0] = ptr; picture->data[1] = NULL; @@ -379,6 +388,10 @@ int avpicture_get_size(int pix_fmt, int width, int height) case PIX_FMT_BGR24: size = (size * 3); break; + case PIX_FMT_RGBA32: + case PIX_FMT_BGRA32: + size = (size * 4); + break; case PIX_FMT_YUV422: size = (size * 2); break; |