summaryrefslogtreecommitdiff
path: root/libavfilter/vf_colorspace.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2016-05-06 11:58:49 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2016-05-10 09:26:17 -0400
commit356c116536650ae015f914fda060203dd853cc5c (patch)
treeb11615d327acc58bf66f0eb7722dc21838323581 /libavfilter/vf_colorspace.c
parent9bbed8645a6b7137d520041d759f3cc0df0529b9 (diff)
vf_colorspace: fix range order.
Diffstat (limited to 'libavfilter/vf_colorspace.c')
-rw-r--r--libavfilter/vf_colorspace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
index 00d8889efa..3f299a7247 100644
--- a/libavfilter/vf_colorspace.c
+++ b/libavfilter/vf_colorspace.c
@@ -770,8 +770,8 @@ static int create_filtergraph(AVFilterContext *ctx,
s->yuv_offset[1][n] = off;
fill_rgb2yuv_table(s->out_lumacoef, rgb2yuv);
bits = 1 << (29 - out_desc->comp[0].depth);
- for (n = 0; n < 3; n++) {
- for (out_rng = s->out_y_rng, m = 0; m < 3; m++, out_rng = s->out_uv_rng) {
+ for (out_rng = s->out_y_rng, n = 0; n < 3; n++, out_rng = s->out_uv_rng) {
+ for (m = 0; m < 3; m++) {
s->rgb2yuv_coeffs[n][m][0] = lrint(bits * out_rng * rgb2yuv[n][m] / 28672);
for (o = 1; o < 8; o++)
s->rgb2yuv_coeffs[n][m][o] = s->rgb2yuv_coeffs[n][m][0];