aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-27 17:08:50 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-27 17:09:21 +0100
commit21c2e201f6aa70fe8fdd1b3d87362f16220f4594 (patch)
tree2b7c8d1e1d7d9e86868567094f30d5f4b301e7da
parentc87c2d0d02874af7eb876cc8c90ffd44d98c08af (diff)
downloadffmpeg-21c2e201f6aa70fe8fdd1b3d87362f16220f4594.tar.gz
vf_lut: correct color/comp permutation
Fixes Ticket2225 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavfilter/vf_lut.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c
index 73f909d038..bdfe712cf4 100644
--- a/libavfilter/vf_lut.c
+++ b/libavfilter/vf_lut.c
@@ -178,7 +178,7 @@ static int config_props(AVFilterLink *inlink)
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
uint8_t rgba_map[4]; /* component index -> RGBA color index map */
int min[4], max[4];
- int val, comp, ret;
+ int val, color, ret;
lut->hsub = desc->log2_chroma_w;
lut->vsub = desc->log2_chroma_h;
@@ -213,9 +213,9 @@ static int config_props(AVFilterLink *inlink)
lut->step = av_get_bits_per_pixel(desc) >> 3;
}
- for (comp = 0; comp < desc->nb_components; comp++) {
+ for (color = 0; color < desc->nb_components; color++) {
double res;
- int color = lut->is_rgb ? rgba_map[comp] : comp;
+ int comp = lut->is_rgb ? rgba_map[color] : color;
/* create the parsed expression */
ret = av_expr_parse(&lut->comp_expr[color], lut->comp_expr_str[color],