summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs
diff options
context:
space:
mode:
authorChris Darroch <[email protected]>2020-01-11 20:42:53 -0800
committerBradley Sepos <[email protected]>2020-01-23 02:50:41 -0500
commitadc076e62dc1a448df5e83004238eec1a4d9ba4f (patch)
tree176c0b381fbaa7c290acf4785c8c4b83d3d35a11 /win/CS/HandBrakeWPF/Services/Queue/QueueService.cs
parent7b19d52de8790910bcad5f4d73e33bc19f14c047 (diff)
fix image plane copying in nlmeans prefilter setup
When nlmeans_prefilter() is preparing to apply a pre-filter to an image plane, it first attempts to make a copy of the mem image plane into the mem_pre plane which will hold the pre-filter's output. However, the existing logic, which mirrors the loop over all pixel rows in nlmeans_alloc(), improperly leaves the bottom 2*border rows of the mem_pre plane uninitialized. Where nlmeans_alloc() correctly copies the source image's rows into its plane, by adding the correct offset to the memcpy(3) destination to locate the image pixel data between the horizontal and vertical borders, in nlmeans_prefilter() the intention is to copy both the image and the borders. However, the current loop only iterates h times, i.e., the size of the image itself, and skips the last (bh - h) = 2*border rows. Instead, we replace the loop with a single memcpy(3) call which just duplicates the entire mem image plane, including the border data. (cherry picked from commit 92ea3b13f5c207598ada6c8e92dbe8d36a573f99)
Diffstat (limited to 'win/CS/HandBrakeWPF/Services/Queue/QueueService.cs')
0 files changed, 0 insertions, 0 deletions