Commit d2a2b08c authored by Stefano Sabatini's avatar Stefano Sabatini
Browse files

Use pixel format descriptors to check if the input format is paletted.

Originally committed as revision 21597 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 4ebaec79
......@@ -129,11 +129,7 @@ static int config_props(AVFilterLink *outlink)
av_log(ctx, AV_LOG_INFO, "w:%d h:%d fmt:%s\n",
outlink->w, outlink->h, av_pix_fmt_descriptors[outlink->format].name);
scale->input_is_pal = inlink->format == PIX_FMT_PAL8 ||
inlink->format == PIX_FMT_BGR4_BYTE ||
inlink->format == PIX_FMT_RGB4_BYTE ||
inlink->format == PIX_FMT_BGR8 ||
inlink->format == PIX_FMT_RGB8;
scale->input_is_pal = av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PAL;
return !scale->sws;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment