[vlc-commits] qsv: clean the mfxFrameSurface1 initialization

Steve Lhomme git at videolan.org
Wed Apr 4 18:28:00 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Fri Sep  1 08:31:28 2017 +0200| [c1ef02d5ab3a8d6de02bb5a07cbbc6cf46af41ad] | committer: Steve Lhomme

qsv: clean the mfxFrameSurface1 initialization

to match what libavcodec does

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

 modules/codec/qsv.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/codec/qsv.c b/modules/codec/qsv.c
index 1cf72412f7..8c571a3dad 100644
--- a/modules/codec/qsv.c
+++ b/modules/codec/qsv.c
@@ -356,11 +356,13 @@ static mfxFrameSurface1 *qsv_frame_pool_Get(encoder_sys_t *sys, picture_t *pic)
             picture_Release((picture_t *)frame->Data.MemId);
 
         frame->Data.MemId     = pic;
+        frame->Data.PitchLow  = pic->p[0].i_pitch;
         frame->Data.Y         = pic->p[0].p_pixels;
-        frame->Data.U         = pic->p[1].p_pixels;
-        frame->Data.V         = pic->p[1].p_pixels + 1;
+        frame->Data.UV        = pic->p[1].p_pixels;
         frame->Data.TimeStamp = qsv_mtime_to_timestamp(pic->date - sys->offset_pts);
 
+        frame->Info = sys->params.mfx.FrameInfo;
+
         // Specify picture structure at runtime.
         if (pic->b_progressive)
             frame->Info.PicStruct = MFX_PICSTRUCT_PROGRESSIVE;



More information about the vlc-commits mailing list