avfilter/overlay_cuda: add hsub and vsub compute x and y positions
authorSteven Liu <liuqi05@kuaishou.com>
Mon, 31 May 2021 07:16:43 +0000 (15:16 +0800)
committerTimo Rothenpieler <timo@rothenpieler.org>
Mon, 7 Jun 2021 15:02:36 +0000 (17:02 +0200)
commit282b9f4cba7ca361c43ac9f94031a43109df0a4f
treefbf0230e967b29f1742e69d4a8cb87dfe9fa5809
parent8bcce5673a267ed371140bf3228ffb420ca2f69b
avfilter/overlay_cuda: add hsub and vsub compute x and y positions

fix problem when set x to odd number in nv12 by cuda

test step:
1. ffmpeg -f lavfi testsrc2=s=176x144 -pix_fmt nv12 -t 1 output_overlay.yuv
2. ffmpeg -f lavfi testsrc2=s=352x288 -pix_fmt nv12 -t 1 output_main.yuv
before this patch:
overlay_cuda=x=0:y=0 will right,
overlay_cuda=x=3:y=0 will wrong,

both will right after patch.

Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
libavfilter/vf_overlay_cuda.c