Commit a5cf6628 authored by Clément Bœsch's avatar Clément Bœsch

Merge commit 'f01f7a78'

* commit 'f01f7a78':
  hwcontext_dxva2: use the special UC copy for downloading frames
Merged-by: 's avatarClément Bœsch <u@pkh.me>
parents 8200b16a f01f7a78
......@@ -293,8 +293,13 @@ static int dxva2_transfer_data(AVHWFramesContext *ctx, AVFrame *dst,
(uint8_t*)LockedRect.pBits, surf_linesize);
if (download) {
av_image_copy(dst->data, dst->linesize, surf_data, surf_linesize,
ctx->sw_format, src->width, src->height);
ptrdiff_t src_linesize1[4], dst_linesize1[4];
for (i = 0; i < 4; i++) {
dst_linesize1[i] = dst->linesize[i];
src_linesize1[i] = surf_linesize[i];
}
av_image_copy_uc_from(dst->data, dst_linesize1, surf_data, src_linesize1,
ctx->sw_format, src->width, src->height);
} else {
av_image_copy(surf_data, surf_linesize, src->data, src->linesize,
ctx->sw_format, src->width, src->height);
......
Markdown is supported
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