#9873: line stride does not appear to always match width in frei0r
-------------------------------------+-------------------------------------
             Reporter:  Brendan      |                     Type:  defect
  Hack                               |
               Status:  new          |                 Priority:  normal
            Component:  avfilter     |                  Version:  git-
                                     |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 I am trying to run a frei0r filter that transforms pixels around the frame
 (rather than just changing their colour) and on certain frame resolutions
 I get garbage output. It looks like the provided frame has a stride that
 does not match the frame width like frei0r requires. This is a regression
 as this functionality works for all resolutions in ffmpeg 5.0.1.

 Test data is an image of resolution 1800x1200 (test.jpg) and the same
 image at 400x266 (test-400.jpg).

 The bug was introduced in commit 17a59a634c39b00a680c6ebbaea58db95594d13d
 and affected all resolutions. I am testing using the simple flippo frei0r
 plugin that just flips the image horizontally or vertically. In these
 tests I flip horizontally.

 Checkout to commit 17a59a634c39b00a680c6ebbaea58db95594d13d and test as
 follows:

 {{{
 $ ffmpeg -i test.jpg -filter frei0r=flippo:y -y test-ff-flip-
 g17a59a634c.jpg
 $ ffmpeg -i test-400.jpg -filter frei0r=flippo:y -y test-ff-
 flip-400-g17a59a634c.jpg
 }}}

 Both of these images come out corrupted.

 Commit d353909e773ba8a8201fa13d6c35251351dd567a purports to fix this by
 copying to a frei0r compliant frame however this only fixes the problem
 for the 400 width image. The 1800 is still corrupt.

 Checkout to commit d353909e773ba8a8201fa13d6c35251351dd567a and test as
 follows:

 {{{
 $ ffmpeg -i test.jpg -filter frei0r=flippo:y -y test-ff-flip-
 gd353909e77.jpg
 $ ffmpeg -i test-400.jpg -filter frei0r=flippo:y -y test-ff-
 flip-400-gd353909e77.jpg
 }}}

 Here the 400 image is good but not the 1800.

 The same tests run in the current master
 c469c3c3b18fbacd6ee0165573034d2a0408b83f produce the same results.

 Checkout to commit c469c3c3b18fbacd6ee0165573034d2a0408b83f and test as
 follows:

 {{{
 $ ffmpeg -i test.jpg -filter frei0r=flippo:y -y test-ff-flip-HEAD.jpg
 $ ffmpeg -i test-400.jpg -filter frei0r=flippo:y -y test-ff-
 flip-400-HEAD.jpg
 }}}

 Here the 400 image is good but not the 1800.

 {{{
 $ ffmpeg -v 9 -loglevel 99 -i test.png
 ffmpeg version N-107787-gc469c3c3b1 Copyright (c) 2000-2022 the FFmpeg
 developers
   built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
   configuration: --prefix=/home/bendy/.local --arch=amd64 --enable-gpl
 --disable-stripping --enable-frei0r --enable-shared
   libavutil      57. 33.101 / 57. 33.101
   libavcodec     59. 42.101 / 59. 42.101
   libavformat    59. 30.100 / 59. 30.100
   libavdevice    59.  8.101 / 59.  8.101
   libavfilter     8. 46.103 /  8. 46.103
   libswscale      6.  8.102 /  6.  8.102
   libswresample   4.  8.100 /  4.  8.100
   libpostproc    56.  7.100 / 56.  7.100
 Input #0, image2, from 'test.jpg':
   Duration: 00:00:00.04, start: 0.000000, bitrate: 162876 kb/s
   Stream #0:0: Video: mjpeg (Baseline), yuvj444p(pc,
 bt470bg/unknown/unknown), 1800x1200 [SAR 1:1 DAR 3:2], 25 fps, 25 tbr, 25
 tbn
 At least one output file must be specified
 }}}
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9873>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to