[FFmpeg-trac] #7226(avfilter:new): Generic vf_blend implementation contains unaligned memory access

FFmpeg trac at avcodec.org
Wed May 23 20:44:18 EEST 2018


#7226: Generic vf_blend implementation contains unaligned memory access
------------------------------------+------------------------------------
             Reporter:  Lastique    |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avfilter
              Version:  git-master  |               Resolution:
             Keywords:  vf_blend    |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by jamrial):

 We have AV_R* and AV_W* macros in libavutil/intreadwrite.h for unaligned
 reads and writes. You can see examples of their usage in several other
 filters.
 All those memcpys in your patch are pretty ugly and can be avoided with
 the aforementioned convenience macros.

 That being said, the fact the build system forcefully disables
 vectorization should serve as a hint that it's done for a reason.

 Replying to [comment:3 Lastique]:
 > I'm not sure it will be reproducible with `ffmpeg` command line tool
 because there are asm versions that will likely be used on modern CPUs.
 The problem is in the generic C version, which is explicitly used by the
 test. Maybe it'll reproduce if you build ffmpeg without asm optimizations.

 The -cpuflags option lets you choose which intruction sets you want to
 enable, so "-cpuflags none" will make sure no asm optimized function is
 used, outside of stuff hardcoded at compile time.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7226#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list