Skip to content
Commit cc4ea662 authored by Pascal Nowack's avatar Pascal Nowack Committed by Jonas Ådahl
Browse files

cuda: Fix out-of-bounds source read in BGRX_TO_YUV420 kernel

Compute operations on the GPU run in blocks. Each block consists of a
certain amount of threads.
Since these blocks are always a multiples of the warp size, additional
out-of-bounds checks are required when reading or writing memory on the
GPU.
For the NV12 buffer this is done in all cases. For the source data too,
except in one case, when reading the pixel x = 0, y = 1, in a 2x2
rectangle.
In that case, an invalid memory access can happen and all subsequent
CUDA operations will fail.

Fix this by adding the missing out-of-bounds check.
parent 285f7306
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment