[FFmpeg-trac] #3236(avfilter:new): lut3d video filter swaps color channels

FFmpeg trac at avcodec.org
Tue Dec 24 11:28:27 CET 2013


#3236: lut3d video filter swaps color channels
------------------------------------+------------------------------------
             Reporter:  FredTester  |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avfilter
              Version:  git-master  |               Resolution:
             Keywords:  lut         |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by ubitux):

 Replying to [comment:11 FredTester]:
 > I tested your updated diff patch.
 >
 > The '''plain.cube''' would produce correct colors with the patch, but
 the '''lowR_normalG_highB.cube''' would produce a reddish output, although
 red must be very low (see the attached '''lowR_normalG_highB.png''' which
 illustrates it).

 Ah interesting. What about this?

 {{{
 diff --git a/libavfilter/vf_lut3d.c b/libavfilter/vf_lut3d.c
 index 79566be..d280618 100644
 --- a/libavfilter/vf_lut3d.c
 +++ b/libavfilter/vf_lut3d.c
 @@ -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);
 }}}

 But in that case, I really would like some tests with the other supposely
 supported formats. I wrote most parsers with various assumptions, which I
 probably wrong.

 If you want support for other formats, now is the time as well.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3236#comment:12>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list