@@ -278,18 +278,6 @@ if $NONFREE_AND_GPL; then
278
278
echo " With GPL and non-free codecs"
279
279
fi
280
280
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
293
281
294
282
if [ -n " $LDEXEFLAGS " ]; then
295
283
echo " Start the build in full static mode."
@@ -929,6 +917,12 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
929
917
if [ -z " $LDEXEFLAGS " ]; then
930
918
CONFIGURE_OPTIONS+=(" --enable-libnpp" ) # Only libnpp cannot be statically linked.
931
919
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
932
926
CONFIGURE_OPTIONS+=(" --nvccflags=-gencode arch=compute_$CUDA_COMPUTE_CAPABILITY ,code=sm_$CUDA_COMPUTE_CAPABILITY -O2" )
933
927
else
934
928
CONFIGURE_OPTIONS+=(" --disable-ffnvcodec" )
0 commit comments