Browse Source

Mark GRAY8 format as pseudo-paletted.

This fixes that the GIF encoder crashes with it because
it has no palette.
And the arguments for the pseudopalette apply to gray8 as
much as to RGB8 etc.
In addition the changes required in lavfi should be needed anyway
when adding support for RGB8 etc.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
tags/n0.11
Reimar Döffinger 13 years ago
parent
commit
24eac3cff5
3 changed files with 3 additions and 2 deletions
  1. +1
    -1
      libavfilter/drawutils.c
  2. +1
    -1
      libavfilter/vf_pad.c
  3. +1
    -0
      libavutil/pixdesc.c

+ 1
- 1
libavfilter/drawutils.c View File

@@ -134,7 +134,7 @@ int ff_draw_init(FFDrawContext *draw, enum PixelFormat format, unsigned flags)


if (!desc->name) if (!desc->name)
return AVERROR(EINVAL); return AVERROR(EINVAL);
if (desc->flags & ~(PIX_FMT_PLANAR | PIX_FMT_RGB))
if (desc->flags & ~(PIX_FMT_PLANAR | PIX_FMT_RGB | PIX_FMT_PSEUDOPAL))
return AVERROR(ENOSYS); return AVERROR(ENOSYS);
for (i = 0; i < desc->nb_components; i++) { for (i = 0; i < desc->nb_components; i++) {
c = &desc->comp[i]; c = &desc->comp[i];


+ 1
- 1
libavfilter/vf_pad.c View File

@@ -262,7 +262,7 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
AVFilterBufferRef *outpicref = avfilter_ref_buffer(inpicref, ~0); AVFilterBufferRef *outpicref = avfilter_ref_buffer(inpicref, ~0);
int plane; int plane;


for (plane = 0; plane < 4 && outpicref->data[plane]; plane++) {
for (plane = 0; plane < 4 && outpicref->data[plane] && pad->draw.pixelstep[plane]; plane++) {
int hsub = pad->draw.hsub[plane]; int hsub = pad->draw.hsub[plane];
int vsub = pad->draw.vsub[plane]; int vsub = pad->draw.vsub[plane];




+ 1
- 0
libavutil/pixdesc.c View File

@@ -220,6 +220,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
.comp = { .comp = {
{ 0, 0, 1, 0, 7 }, /* Y */ { 0, 0, 1, 0, 7 }, /* Y */
}, },
.flags = PIX_FMT_PSEUDOPAL,
}, },
[PIX_FMT_MONOWHITE] = { [PIX_FMT_MONOWHITE] = {
.name = "monow", .name = "monow",


Loading…
Cancel
Save