mirror of https://git.ffmpeg.org/ffmpeg.git
Use pixel format descriptors to check if the input format is paletted.
Originally committed as revision 21597 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
4ebaec791c
commit
d2a2b08cfe
|
@ -129,11 +129,7 @@ static int config_props(AVFilterLink *outlink)
|
||||||
av_log(ctx, AV_LOG_INFO, "w:%d h:%d fmt:%s\n",
|
av_log(ctx, AV_LOG_INFO, "w:%d h:%d fmt:%s\n",
|
||||||
outlink->w, outlink->h, av_pix_fmt_descriptors[outlink->format].name);
|
outlink->w, outlink->h, av_pix_fmt_descriptors[outlink->format].name);
|
||||||
|
|
||||||
scale->input_is_pal = inlink->format == PIX_FMT_PAL8 ||
|
scale->input_is_pal = av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PAL;
|
||||||
inlink->format == PIX_FMT_BGR4_BYTE ||
|
|
||||||
inlink->format == PIX_FMT_RGB4_BYTE ||
|
|
||||||
inlink->format == PIX_FMT_BGR8 ||
|
|
||||||
inlink->format == PIX_FMT_RGB8;
|
|
||||||
|
|
||||||
return !scale->sws;
|
return !scale->sws;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue