@@ -278,18 +278,6 @@ if $NONFREE_AND_GPL; then
278278 echo " With GPL and non-free codecs"
279279fi
280280
281- # Check CUDA compute capability
282- if [[ " $OSTYPE " == " linux-gnu" ]]; then
283- if [ -n " $CUDA_COMPUTE_CAPABILITY " ]; then
284- echo " CUDA env variable provided, building with compute capability $CUDA_COMPUTE_CAPABILITY "
285- else
286- # Set default value if no compute capability was found
287- # Note that multi-architecture builds are not supported in ffmpeg
288- # see https://patchwork.ffmpeg.org/comment/62905/
289- export CUDA_COMPUTE_CAPABILITY=52
290- echo " CUDA env variable not provided, using default compute capability $CUDA_COMPUTE_CAPABILITY "
291- fi
292- fi
293281
294282if [ -n " $LDEXEFLAGS " ]; then
295283 echo " Start the build in full static mode."
@@ -929,6 +917,12 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
929917 if [ -z " $LDEXEFLAGS " ]; then
930918 CONFIGURE_OPTIONS+=(" --enable-libnpp" ) # Only libnpp cannot be statically linked.
931919 fi
920+ if [ -z " $CUDA_COMPUTE_CAPABILITY " ]; then
921+ # Set default value if no compute capability was found
922+ # Note that multi-architecture builds are not supported in ffmpeg
923+ # see https://patchwork.ffmpeg.org/comment/62905/
924+ export CUDA_COMPUTE_CAPABILITY=52
925+ fi
932926 CONFIGURE_OPTIONS+=(" --nvccflags=-gencode arch=compute_$CUDA_COMPUTE_CAPABILITY ,code=sm_$CUDA_COMPUTE_CAPABILITY -O2" )
933927 else
934928 CONFIGURE_OPTIONS+=(" --disable-ffnvcodec" )
0 commit comments