summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2019-05-13 19:15:41 -0700
committerPhilip Langdale <philipl@overt.org>2019-05-15 11:40:50 -0700
commit89bd7554b209a447062c306129d3f36d673cbd4d (patch)
tree6a92b227aa4a6dfe8010720a4d5910165afb6572
parentb79b29ddb15c4e0ff9f041997e5562555d3ac81d (diff)
avfilter/vf_scale_cuda: Fix incorrect scaling of > 8bit content
When i converted the filter to use texture objects instead of texture references, I incorrect dropped the `pixel_size` scaling factor when setting `pitchInBytes`. `src_pitch` is in pixels and so must be scaled up.
-rw-r--r--libavfilter/vf_scale_cuda.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_scale_cuda.c b/libavfilter/vf_scale_cuda.c
index c97a802ddc..ecfd6a1c92 100644
--- a/libavfilter/vf_scale_cuda.c
+++ b/libavfilter/vf_scale_cuda.c
@@ -357,7 +357,7 @@ static int call_resize_kernel(AVFilterContext *ctx, CUfunction func, int channel
.res.pitch2D.numChannels = channels,
.res.pitch2D.width = src_width,
.res.pitch2D.height = src_height,
- .res.pitch2D.pitchInBytes = src_pitch,
+ .res.pitch2D.pitchInBytes = src_pitch * pixel_size,
.res.pitch2D.devPtr = (CUdeviceptr)src_dptr,
};