vaapipostproc: fix output buffer WxH for crop meta forwarding
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Fri, 30 Aug 2019 21:14:30 +0000 (14:14 -0700)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Thu, 5 Sep 2019 11:03:34 +0000 (11:03 +0000)
commitc6ee20fab319a92a71a9fecf10703f1d211e3fba
tree9a52fa61eee4433a3072b08231350d809eb0266c
parent9fd020a1177160f5368e62e58daf8194a936eb3a
vaapipostproc: fix output buffer WxH for crop meta forwarding

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
gst/vaapi/gstvaapipostproc.c