mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 01:02:33 +00:00
Merge commit 'f01f7a7846529b7c3ef343f117eaa2c0a1457af0'
* commit 'f01f7a7846529b7c3ef343f117eaa2c0a1457af0': hwcontext_dxva2: use the special UC copy for downloading frames Merged-by: Clément Bœsch <u@pkh.me>
This commit is contained in:
commit
a5cf6628d6
@ -293,7 +293,12 @@ static int dxva2_transfer_data(AVHWFramesContext *ctx, AVFrame *dst,
|
|||||||
(uint8_t*)LockedRect.pBits, surf_linesize);
|
(uint8_t*)LockedRect.pBits, surf_linesize);
|
||||||
|
|
||||||
if (download) {
|
if (download) {
|
||||||
av_image_copy(dst->data, dst->linesize, surf_data, surf_linesize,
|
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);
|
ctx->sw_format, src->width, src->height);
|
||||||
} else {
|
} else {
|
||||||
av_image_copy(surf_data, surf_linesize, src->data, src->linesize,
|
av_image_copy(surf_data, surf_linesize, src->data, src->linesize,
|
||||||
|
Loading…
Reference in New Issue
Block a user