diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-02-01 19:50:17 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-02-01 19:50:17 +0000 |
commit | d2a2b08cfe2ab382a4ad756c0a08ff78eb284ef9 (patch) | |
tree | 3d9b129fc2eda96e6ceb87a000fa87bc5a0bcf92 | |
parent | 4ebaec791cbd6b7a50c8278249bbc776e007b561 (diff) | |
download | ffmpeg-d2a2b08cfe2ab382a4ad756c0a08ff78eb284ef9.tar.gz |
Use pixel format descriptors to check if the input format is paletted.
Originally committed as revision 21597 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavfilter/vf_scale.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index e0f37685fb..4d109adcc6 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -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; } |