Skip to content
Snippets Groups Projects
Commit b1773459 authored by Aras Pranckevicius's avatar Aras Pranckevicius Committed by Aras Pranckevicius
Browse files

Fix #125446: Video decoding artifacts on AVX512 CPU with some video widths

When a video width is a multiple of 8 but not 16 (i.e. line size
stride of RGBA frame is multiple of 32 bytes but not 64 bytes), then
on an AVX512 capable CPU the decoded video has a block of "wrapped"
artifacts on the left side.

This started happening in 4.1 with 4ef5d9f6, where the vertical flip
is done together with YUV->RGB conversion. The logic in there checks
whether ffmpeg frame line size (which might include necessary SIMD
alignment/padding) matches packed imbuf line stride. However, ffmpeg
arguably has a bug, where `av_frame_get_buffer` always uses 32 byte
alignment, instead of 64 byte when on AVX512 code path. Report
has been made to ffmpeg upstream: https://trac.ffmpeg.org/ticket/11116
and in the meantime, explicitly pass `av_cpu_max_align` to
`av_frame_get_buffer`.

Pull Request: https://projects.blender.org/blender/blender/pulls/125578
parent e0cdfb85
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment