1. 15 Oct, 2019 1 commit
    • Julien Isorce's avatar
      msdkenc: close encoder upon bitrate change · 5de00b9f
      Julien Isorce authored
      Upon bitrate change, make sure to close the encoder otherwise
      the encoder is not re-initialized and the target bitrate is
      never reached, and the encoder was flushed at each frame
      from this moment.
      Regression introduced in f2b35abc which replaced the call
      that was closing the encoder by an early return to avoid
  2. 14 Oct, 2019 1 commit
  3. 11 Oct, 2019 1 commit
    • Haihao Xiang's avatar
      msdk: return the right pointer · e5279cd9
      Haihao Xiang authored
      The first channel in memory for MFX_FOURCC_RGB4 (VA_FOURCC_ARGB or
      GST_VIDEO_FORMAT_BGRA) is B, not A. In MSDK, channle B is used to access
      data for RGB4 surface. In addition, the returned pointers for
      MFX_FOURCC_AYUV and MFX_FOURCC_Y410 in gst_msdk_video_memory_map_full
      were wrong too before this fix.
  4. 08 Oct, 2019 2 commits
  5. 03 Oct, 2019 1 commit
  6. 30 Sep, 2019 5 commits
    • Haihao Xiang's avatar
      msdkdec: set lockable flag · 71ff8236
      Haihao Xiang authored
      When postpone_free_surface is TRUE, the output buffer is not writable,
      however the base decoder needs a writable buffer as output buffer,
      otherwise it will make a copy of the output buffer. As the underlying
      memory is always lockable, so we may set the LOCKABLE flag for this buffer
      to avoid buffer copy in the base class.
      The refcount of the output buffer is 1 when postpone_free_surface is
      FALSE, so needn't set the LOCKABLE flag for this case.
    • Haihao Xiang's avatar
      msdkh265enc: add support for Y410 in sink pad · 83100b35
      Haihao Xiang authored
      Sample pipeline:
      gst-launch-1.0 videotestsrc ! video/x-raw,format=Y410 !
      msdkh265enc low-power=1 ! filesink location=output.h265
    • Haihao Xiang's avatar
      msdkh265enc: add support for VUYA in sink pad · 05075476
      Haihao Xiang authored
      sample pipelie:
      gst-launch-1.0 videotestsrc ! video/x-raw,format=VUYA !
      msdkh265enc low-power=1 ! filesink location=output.h265
    • Haihao Xiang's avatar
      msdkenc: clean up code by using switch · 85914997
      Haihao Xiang authored
      It is convenient for us to add support for new formats in future, there
      is no change in functionality.
    • Haihao Xiang's avatar
      msdk: remove some dead code · 0c1c2ce4
      Haihao Xiang authored
  7. 23 Sep, 2019 1 commit
    • Haihao Xiang's avatar
      msdk: fix for mfx frame alloc response · ce4f9ae5
      Haihao Xiang authored
      Both MSDK and this plugin use mfxFrameAllocResponse for video and DMABuf
      memory, it is possible that some GST buffers are still in use when calling
      gst_msdk_frame_free, so add a reference count in the wrapper of
      mfxFrameAllocResponse (GstMsdkAllocResponse) to make sure the underlying
      mfx resources are still available if the corresponding buffer pool is in
      In addtion, currently all allocators for input or output share the same
      mfxFrameAllocResponse pointer in an element, so it is possible that
      the content of mfxFrameAllocResponse is updated for a new caps then all
      GST buffers allocated from an old allocator will use this new content of
      mfxFrameAllocResponse, which will result in unexpected behavior. In this
      fix, we save the the content of mfxFrameAllocResponse in the corresponding
      tructure to avoid such issue
      Sample pipeline:
      gst-launch-1.0 filesrc location=vp9_multi_resolutions.ivf ! ivfparse ! msdkvp9dec !
      msdkvpp ! video/x-raw\(memory:DMABuf\),format=NV12 ! glimagesink
  8. 21 Sep, 2019 4 commits
    • Haihao Xiang's avatar
      msdk: don't cache mfxFrameAllocResponse pointer · e50011c0
      Haihao Xiang authored
      Otherwise it is possible that different wrappers share the same
      mfxFrameAllocResponse pointer, so instead of caching the pointer, we may
      cache the content of mfxFrameAllocResponse
    • Haihao Xiang's avatar
      msdkdec: postpone surface free for VC1 · f840e304
      Haihao Xiang authored
      For a skipped frame in VC1, MSDK returns the mfx surface of the reference
      frame, so we have to make sure the corresponding surface for the
      reference frame is not freed. In this fix, we postpone surface free because
      we don't know whether a surface is referenced
      Before this fix, the error is like as below:
      New clock: GstSystemClock
      0:00:00.181793130 23098 0x55f8a9d622d0 ERROR                msdkdec
      gstmsdkdec.c:622:gst_msdkdec_finish_task:<msdkvc1dec0> Couldn't find the
      cached MSDK surface
      Sample pipeline:
      gst-launch-1.0 filesrc location=input_has_skipped_frame.wmv ! asfdemux !
      vc1parse ! msdkvc1dec ! glimagesink
    • Haihao Xiang's avatar
      msdkdec: release the surface if this surface is not in use · c689c944
      Haihao Xiang authored
      If the surface is not in use, we may release it even if GST_FLOW_OK is going
      to be returned, which may avoid the issue of failing to get surface
      This fixes the regression caused by commit c05acf40
    • Haihao Xiang's avatar
      msdk: adjust the stride align · 8daac1c0
      Haihao Xiang authored
      GstAllocationParams::align is set to 31 in msdkdec/msdken/msdkvpp, hence
      the stride align should be greater than or equal to 31, otherwise it
      will result in issue
      (msdk: "GStreamer-CRITICAL: gst_buffer_resize_range failed" SPAM),
      In addition, the stride should match the pitch alignment in the media driver,
      otherwise it will result in some issues when a buffer is shared between
      different elements, e.g. the NV12 issue mentioned in commit 3f2314a1, which
      can be reproduced by `gst-launch-1.0 vidoetestsrc ! msdkvpp !
      video/x-raw\(memory:DMABuf\),format=NV12 ! glimagesink`
      Fixed #861
  9. 16 Sep, 2019 1 commit
  10. 13 Sep, 2019 7 commits
  11. 12 Sep, 2019 1 commit
    • fuweitax's avatar
      msdkenc: add an extra surface for hevc encoding · 11bbd6f7
      fuweitax authored
      For some hevc 10bit 4K encoding cases, the encoding process may be
      slow, and MediaSDK surface can't be released in time before one other
      available surface is needed. So add an extra surface for hevc encoding
      to avoid this issue.
  12. 11 Sep, 2019 1 commit
  13. 10 Sep, 2019 4 commits
    • Seungha Yang's avatar
      msdk: Remove all DMABuf caps features on Windows · 54c5ebbd
      Seungha Yang authored
      Add new macro for sink/src pad template to ensure no DMABuf caps
      features are exposed on Windows. Some DMABuf caps features
      were not handled by the commit 9ec62418
    • Seungha Yang's avatar
      msdkdec: Do not use video memory on Windows · eb3a1175
      Seungha Yang authored
      Like msdkenc, do not use video memory by default on Windows.
    • Seungha Yang's avatar
      msdk: Allow video and system memory share among buffers · d4112d3d
      Seungha Yang authored
      gst_buffer_make_writable() requires exclusive reference to the
      GstMemory so the _make_writable() for the msdk buffer will result
      to fallback system memory copy, because the msdk memory were initialized
      with GST_MEMORY_FLAG_NO_SHARE flag.
      Note that, disable sharing GstMemory brings high overhead but actually
      the msdk memory objects can be shared over multiple buffers.
      If the memory is not shareable, newly added GstAllocator::mem_copy will
      create copied msdk memory.
    • Haihao Xiang's avatar
      msdkh265dec: remove the requirement on profile · 04b77a8c
      Haihao Xiang authored
      Sometimes a HEVC/H265 stream doesn't have a valid profile but MSDK can
      handle this stream. Like vaapih265dec, msdkh265dec may advertise the sink
      caps without profile
  14. 04 Sep, 2019 1 commit
  15. 28 Aug, 2019 2 commits
  16. 26 Aug, 2019 2 commits
    • Haihao Xiang's avatar
      msdkvpp: support video-direction property · d5fd9bc2
      Haihao Xiang authored
      video-direction property is common property in gstreamer. In addition,
      both mirroring & rotation properties are marked as deprecated,
      video-direction will override mirroring & rotation properties when they
      are set explicitly
      Fix gstreamer/gst-plugins-bad#1058
    • Yan Wang's avatar
      msdkdec: Fix buffer allocation based on frame. · f92b5614
      Yan Wang authored
      gst_msdkdec_finish_task() may release all frames in
      GstVideoDecoder object. In this case, allocate_output_buffer()
      cannot get the oldest frame to allocate buffer.
      So gst_msdkdec_handle_frame() should return GST_FLOW_OK for
      letting gst_video_decoder_decode_frame() to send a new frame
      for decoding.
      Fixes #664.
      Fixes #665.
  17. 25 Aug, 2019 1 commit
  18. 22 Aug, 2019 1 commit
    • U. Artie Eoff's avatar
      msdk: vpp: rotate output frame · bd3caf0c
      U. Artie Eoff authored
      When vpp rotation is 90 or 270, the output frame
      should be rotated, too.
        gst-launch-1.0 -vf videotestsrc \
         ! video/x-raw,width=720,height=480 \
         ! msdkvpp rotation=90 ! vaapisink
  19. 07 Aug, 2019 2 commits
  20. 06 Aug, 2019 1 commit