X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libavutil%2Fhwcontext_qsv.c;h=250091c4e85a26b16d018663a12c35ae3f403216;hb=b4ca32414ea28ad29b4bd387c298f5a676dace2a;hp=6228c04de527f4a1b5bc7cf003c462d673f8c165;hpb=ccef7a85d6491fb354a36970162fa0204217d8e7;p=ffmpeg diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index 6228c04de52..250091c4e85 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,12 +307,13 @@ 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; + surf->Info.PicStruct = MFX_PICSTRUCT_PROGRESSIVE; return 0; } @@ -1057,6 +1058,11 @@ static int qsv_device_derive_from_child(AVHWDeviceContext *ctx, goto fail; } + ret = MFXQueryVersion(hwctx->session,&ver); + if (ret == MFX_ERR_NONE) { + av_log(ctx, AV_LOG_VERBOSE, "MFX compile/runtime API: %d.%d/%d.%d\n", + MFX_VERSION_MAJOR, MFX_VERSION_MINOR, ver.Major, ver.Minor); + } return 0; fail: