1. 06 Sep, 2019 2 commits
  2. 05 Sep, 2019 3 commits
    • U. Artie Eoff's avatar
      vaapipostproc: allow cropping via properties · 2f0f5e1e
      U. Artie Eoff authored
      Add crop-left, crop-right, crop-top and crop-bottom
      properties to vaapipostproc.
      2f0f5e1e
    • U. Artie Eoff's avatar
      vaapipostproc: rotate outbuf and crop meta if forwarding · 55654f29
      U. Artie Eoff authored
      When forwarding crop meta to downstream, the output
      buffer and crop meta need to be rotated, too.
      
      Test:
       for i in 90r 180 90l vert horiz ul-lr ur-ll
       do
        gst-launch-1.0 -vf videotestsrc num-buffers=500 \
         ! videocrop top=100 bottom=30 left=40 right=20 \
         ! vaapipostproc video-direction=$i \
         ! vaapisink & \
        gst-launch-1.0 -vf videotestsrc num-buffers=500 \
         ! videocrop top=100 bottom=30 left=40 right=20 \
         ! vaapipostproc video-direction=$i \
         ! identity drop-allocation=true \
         ! vaapisink
       done
      55654f29
    • U. Artie Eoff's avatar
      vaapipostproc: fix output buffer WxH for crop meta forwarding · c6ee20fa
      U. Artie Eoff authored
      Adding crop meta x,y to w,h only compensates for left,top
      cropping.  But we also need to compensate for right,bottom
      cropping.
      
      The video meta contains the appropriate w,h (uncropped)
      values, so use it instead.
      
      Test:
      
       gst-launch-1.0 -vf videotestsrc num-buffers=500 \
        ! videocrop top=50 bottom=30 left=40 right=20 \
        ! vaapipostproc ! vaapisink & \
       gst-launch-1.0 -vf videotestsrc num-buffers=500 \
        ! videocrop top=50 bottom=30 left=40 right=20 \
        ! vaapipostproc ! identity drop-allocation=1 \
        ! vaapisink
      c6ee20fa
  3. 04 Sep, 2019 1 commit
    • U. Artie Eoff's avatar
      vaapipostproc: handle size and direction together in src events · 9fd020a1
      U. Artie Eoff authored
      Mapping a pointer event needs to consider both size and
      video-direction operations together, not just one or the other.
      
      This fixes an issue where x,y were not being mapped correctly
      for 90r, 90l, ur-ll and ul-lr video-direction. In these directions,
      the WxH are swapped and GST_VAAPI_POSTPROC_FLAG_SIZE is set.  Thus,
      the first condition in the pointer event handling was entered and
      x,y scale factor were incorrectly computed due to srcpad WxH
      swap.
      
      This also fixes all cases where both video-direction and scaling
      are enabled at the same time.
      
      Test that all pointer events map appropriately:
      
      for i in `seq 0 7`
      do
       GST_DEBUG=vaapipostproc:5 gst-launch-1.0 -vf videotestsrc \
        ! vaapipostproc video-direction=${i} width=300 \
        ! vaapisink
       GST_DEBUG=vaapipostproc:5 gst-launch-1.0 -vf videotestsrc \
        ! vaapipostproc video-direction=${i} width=300 height=200 \
        ! vaapisink
       GST_DEBUG=vaapipostproc:5 gst-launch-1.0 -vf videotestsrc \
        ! vaapipostproc video-direction=${i} height=200 \
        ! vaapisink
       GST_DEBUG=vaapipostproc:5 gst-launch-1.0 -vf videotestsrc \
        ! vaapipostproc video-direction=${i} \
        ! vaapisink
      done
      9fd020a1
  4. 30 Aug, 2019 34 commits