]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/lut3d: fix channel order in Iridas format parsing.
authorClément Bœsch <u@pkh.me>
Sat, 4 Jan 2014 08:31:40 +0000 (09:31 +0100)
committerClément Bœsch <u@pkh.me>
Sat, 4 Jan 2014 08:42:31 +0000 (09:42 +0100)
According to http://doc.iridas.com/index.php?title=LUT_Formats

    for 3D textures, the data is also RGB, and ordered in such a way
    that the red coordinate changes fastest, then the green coordinate,
    and finally, the blue coordinate changes slowest:

Fixes Ticket #3236.

libavfilter/vf_lut3d.c

index 79566be8ce621956fb63591fcc74f035a062348a..d28061815f7fc3332ee79289f65e919ba0bd19b2 100644 (file)
@@ -273,7 +273,7 @@ static int parse_cube(AVFilterContext *ctx, FILE *f)
             for (k = 0; k < size; k++) {
                 for (j = 0; j < size; j++) {
                     for (i = 0; i < size; i++) {
-                        struct rgbvec *vec = &lut3d->lut[k][j][i];
+                        struct rgbvec *vec = &lut3d->lut[i][j][k];
 
                         do {
                             NEXT_LINE(0);