[FFmpeg-cvslog] Merge commit 'f01f7a7846529b7c3ef343f117eaa2c0a1457af0'

Clément Bœsch git at videolan.org
Mon Mar 20 09:48:02 EET 2017


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Mon Mar 20 08:37:40 2017 +0100| [a5cf6628d68edd1c14d483e07bb5e68026eb707a] | committer: Clément Bœsch

Merge commit 'f01f7a7846529b7c3ef343f117eaa2c0a1457af0'

* commit 'f01f7a7846529b7c3ef343f117eaa2c0a1457af0':
  hwcontext_dxva2: use the special UC copy for downloading frames

Merged-by: Clément Bœsch <u at pkh.me>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a5cf6628d68edd1c14d483e07bb5e68026eb707a
---

 libavutil/hwcontext_dxva2.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavutil/hwcontext_dxva2.c b/libavutil/hwcontext_dxva2.c
index 4feb0a7..8d03c5a 100644
--- a/libavutil/hwcontext_dxva2.c
+++ b/libavutil/hwcontext_dxva2.c
@@ -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);


======================================================================




More information about the ffmpeg-cvslog mailing list