[FFmpeg-devel] [PATCH] XPM encoder nad decoder
Stefano Sabatini
stefasab at gmail.com
Sat Jun 30 00:18:35 CEST 2012
Typo in subject: nad -> and
On date Thursday 2012-06-28 17:28:47 +0000, Paul B Mahol encoded:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
> doc/general.texi | 2 +
> libavcodec/Makefile | 2 +
> libavcodec/allcodecs.c | 1 +
> libavcodec/avcodec.h | 1 +
> libavcodec/xpmdec.c | 180 ++++++++++++++++
> libavcodec/xpmenc.c | 154 ++++++++++++++
> libavformat/img2.c | 1 +
> libavformat/img2enc.c | 2 +-
> libavutil/parseutils.c | 544 +++++++++++++++++++++++++++++++++++++++++++++++-
> 9 files changed, 881 insertions(+), 6 deletions(-)
> create mode 100644 libavcodec/xpmdec.c
> create mode 100644 libavcodec/xpmenc.c
Nice! :-)
[...]
> diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c
> index 795236c..983538f 100644
> --- a/libavutil/parseutils.c
> +++ b/libavutil/parseutils.c
> @@ -184,89 +184,483 @@ typedef struct {
> static const ColorEntry color_table[] = {
> { "AliceBlue", { 0xF0, 0xF8, 0xFF } },
[...]
> { "Yellow", { 0xFF, 0xFF, 0x00 } },
> + { "Yellow1", { 0xFF, 0xFF, 0x00 } },
> + { "Yellow2", { 0xEE, 0xEE, 0x00 } },
> + { "Yellow3", { 0xCD, 0xCD, 0x00 } },
> + { "Yellow4", { 0x8B, 0x8B, 0x00 } },
> { "YellowGreen", { 0x9A, 0xCD, 0x32 } },
> };
I think added colors should go to a separate patch.
(Note: I have an ancient patch listing the supported colors from ff*
tools, any interest?)
> @@ -358,6 +887,11 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen,
> rgba_color[1] = rgba >> 16;
> rgba_color[2] = rgba >> 8;
> rgba_color[3] = rgba;
> + } else if (!av_strcasecmp(color_string2, "none")) {
> + rgba_color[0] = 0;
> + rgba_color[1] = 0;
> + rgba_color[2] = 0;
> + rgba_color[3] = 0;
Separate patch, and I don't know if it is a good idea but I'm not
against if there is a reason for that, this is an alias for
"black at 0.0", anyway it should be documented (parseutils.h and possibly
doc/syntax.texi).
--
FFmpeg = Fundamentalist & Freak Mastering Political Erroneous Governor
More information about the ffmpeg-devel
mailing list