From 19d3d0c0570981ddc8a224f07d734ff75d76e234 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Sat, 10 Nov 2018 22:47:28 -0800 Subject: avutil/hwcontext_cuda: Define and use common CHECK_CU() We have a pattern of wrapping CUDA calls to print errors and normalise return values that is used in a couple of places. To avoid duplication and increase consistency, let's put the wrapper implementation in a shared place and use it everywhere. Affects: * avcodec/cuviddec * avcodec/nvdec * avcodec/nvenc * avfilter/vf_scale_cuda * avfilter/vf_scale_npp * avfilter/vf_thumbnail_cuda * avfilter/vf_transpose_npp * avfilter/vf_yadif_cuda --- libavutil/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libavutil/Makefile') diff --git a/libavutil/Makefile b/libavutil/Makefile index 9ed24cfc82..b772111695 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -157,7 +157,7 @@ OBJS = adler32.o \ xtea.o \ tea.o \ -OBJS-$(CONFIG_CUDA) += hwcontext_cuda.o +OBJS-$(CONFIG_CUDA) += hwcontext_cuda.o cuda_check.o OBJS-$(CONFIG_D3D11VA) += hwcontext_d3d11va.o OBJS-$(CONFIG_DXVA2) += hwcontext_dxva2.o OBJS-$(CONFIG_LIBDRM) += hwcontext_drm.o @@ -175,7 +175,8 @@ OBJS += $(COMPAT_OBJS:%=../compat/%) SLIBOBJS-$(HAVE_GNU_WINDRES) += avutilres.o SKIPHEADERS-$(HAVE_CUDA_H) += hwcontext_cuda.h -SKIPHEADERS-$(CONFIG_CUDA) += hwcontext_cuda_internal.h +SKIPHEADERS-$(CONFIG_CUDA) += hwcontext_cuda_internal.h \ + cuda_check.h SKIPHEADERS-$(CONFIG_D3D11VA) += hwcontext_d3d11va.h SKIPHEADERS-$(CONFIG_DXVA2) += hwcontext_dxva2.h SKIPHEADERS-$(CONFIG_QSV) += hwcontext_qsv.h -- cgit v1.2.3