summaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>2013-08-31 03:30:16 -0700
committerLuca Barbato <lu_zero@gentoo.org>2013-08-31 16:13:42 +0200
commitfaa8245bd45c1a6dd220ba9407ea1c82132aa1ce (patch)
tree90babf7696def4131d13bd7d2f4a2a73af3264b0 /libavfilter
parenta42e3a6700547e4e49445bda81d3a89ec3e081a9 (diff)
downloadffmpeg-streaming-faa8245bd45c1a6dd220ba9407ea1c82132aa1ce.zip
ffmpeg-streaming-faa8245bd45c1a6dd220ba9407ea1c82132aa1ce.tar.gz
vf_lut: Constantize
The pixel format tables are never modified, mark them as constant. Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_lut.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c
index 348ef32..e02f113 100644
--- a/libavfilter/vf_lut.c
+++ b/libavfilter/vf_lut.c
@@ -140,16 +140,17 @@ static av_cold void uninit(AVFilterContext *ctx)
AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, \
AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24
-static enum AVPixelFormat yuv_pix_fmts[] = { YUV_FORMATS, AV_PIX_FMT_NONE };
-static enum AVPixelFormat rgb_pix_fmts[] = { RGB_FORMATS, AV_PIX_FMT_NONE };
-static enum AVPixelFormat all_pix_fmts[] = { RGB_FORMATS, YUV_FORMATS, AV_PIX_FMT_NONE };
+static const enum AVPixelFormat yuv_pix_fmts[] = { YUV_FORMATS, AV_PIX_FMT_NONE };
+static const enum AVPixelFormat rgb_pix_fmts[] = { RGB_FORMATS, AV_PIX_FMT_NONE };
+static const enum AVPixelFormat all_pix_fmts[] = { RGB_FORMATS, YUV_FORMATS, AV_PIX_FMT_NONE };
static int query_formats(AVFilterContext *ctx)
{
LutContext *s = ctx->priv;
- enum AVPixelFormat *pix_fmts = s->is_rgb ? rgb_pix_fmts :
- s->is_yuv ? yuv_pix_fmts : all_pix_fmts;
+ const enum AVPixelFormat *pix_fmts = s->is_rgb ? rgb_pix_fmts :
+ s->is_yuv ? yuv_pix_fmts :
+ all_pix_fmts;
ff_set_common_formats(ctx, ff_make_format_list(pix_fmts));
return 0;
OpenPOWER on IntegriCloud