summaryrefslogtreecommitdiff
path: root/libavutil/hwcontext_qsv.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2018-03-29 21:02:02 -0300
committerJames Almer <jamrial@gmail.com>2018-03-29 21:02:02 -0300
commitbe6749c7190e8dd4a5fc44b1efef6cfac3209b5f (patch)
tree4031d8ffffa3b0caac3feeddf474b903e4795ad7 /libavutil/hwcontext_qsv.c
parent23f447294487958e0c7e8c01b9f9abedb1c7ba78 (diff)
parent86499771d1228d8303c8eb6509e20c0caaa02da5 (diff)
downloadffmpeg-be6749c7190e8dd4a5fc44b1efef6cfac3209b5f.tar.gz
Merge commit '86499771d1228d8303c8eb6509e20c0caaa02da5'
* commit '86499771d1228d8303c8eb6509e20c0caaa02da5': qsv: align surface width/height to 16. Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil/hwcontext_qsv.c')
-rw-r--r--libavutil/hwcontext_qsv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
index 0fefec341f..d58461b226 100644
--- a/libavutil/hwcontext_qsv.c
+++ b/libavutil/hwcontext_qsv.c
@@ -234,8 +234,8 @@ static int qsv_init_child_ctx(AVHWFramesContext *ctx)
child_frames_ctx->format = device_priv->child_pix_fmt;
child_frames_ctx->sw_format = ctx->sw_format;
child_frames_ctx->initial_pool_size = ctx->initial_pool_size;
- child_frames_ctx->width = ctx->width;
- child_frames_ctx->height = ctx->height;
+ child_frames_ctx->width = FFALIGN(ctx->width, 16);
+ child_frames_ctx->height = FFALIGN(ctx->height, 16);
#if CONFIG_DXVA2
if (child_device_ctx->type == AV_HWDEVICE_TYPE_DXVA2) {
@@ -307,9 +307,9 @@ static int qsv_init_surface(AVHWFramesContext *ctx, mfxFrameSurface1 *surf)
surf->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV444;
surf->Info.FourCC = fourcc;
- surf->Info.Width = ctx->width;
+ surf->Info.Width = FFALIGN(ctx->width, 16);
surf->Info.CropW = ctx->width;
- surf->Info.Height = ctx->height;
+ surf->Info.Height = FFALIGN(ctx->height, 16);
surf->Info.CropH = ctx->height;
surf->Info.FrameRateExtN = 25;
surf->Info.FrameRateExtD = 1;