Re: [FFmpeg-devel] [PATCH v2] avdevice: Fix disabling audiotoolbox_outdev build on iOS
Ping again for review. amyspark On 29/07/2023 16:00, L. E. Segovia wrote: > audiotoolbox.m uses CoreAudio APIs that are only available in macOS. > The existing CoreAudio framework check is already enough for this case > (as CoreAudio.h does not exist for the iDevices), however, it was never > passed as a dependency of audiotoolbox_outdev. This caused the > build system to include that output device into the targets. > > Signed-off-by: L. E. Segovia > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure b/configure > index 99388e7664..ccb9d7be7a 100755 > --- a/configure > +++ b/configure > @@ -3577,7 +3577,7 @@ alsa_outdev_deps="alsa" > avfoundation_indev_deps="avfoundation corevideo coremedia pthreads" > avfoundation_indev_suggest="coregraphics applicationservices" > avfoundation_indev_extralibs="-framework Foundation" > -audiotoolbox_outdev_deps="audiotoolbox pthreads" > +audiotoolbox_outdev_deps="audiotoolbox coreaudio pthreads" > audiotoolbox_outdev_extralibs="-framework AudioToolbox -framework CoreAudio" > bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h > dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h" > caca_outdev_deps="libcaca" -- amyspark https://www.amyspark.me ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v4 1/1] configure: Set WIN32_LEAN_AND_MEAN at configure time
Including winsock2.h or windows.h without WIN32_LEAN_AND_MEAN cause bzlib.h to parse as nonsense, due to an instance of #define char small in rpcndr.h. See: https://stackoverflow.com/a/27794577 Reviewed-by: Martin Storsjö Signed-off-by: L. E. Segovia --- compat/atomics/win32/stdatomic.h | 1 - compat/w32pthreads.h | 1 - configure| 3 +++ libavdevice/dshow_capture.h | 1 - libavdevice/opengl_enc.c | 1 - libavfilter/vsrc_ddagrab.c | 1 - libavformat/os_support.c | 6 ++ libavutil/wchar_filename.h | 1 - libswscale/utils.c | 1 - 9 files changed, 5 insertions(+), 11 deletions(-) diff --git a/compat/atomics/win32/stdatomic.h b/compat/atomics/win32/stdatomic.h index 28a627bfd3..4f8ac2bb60 100644 --- a/compat/atomics/win32/stdatomic.h +++ b/compat/atomics/win32/stdatomic.h @@ -19,7 +19,6 @@ #ifndef COMPAT_ATOMICS_WIN32_STDATOMIC_H #define COMPAT_ATOMICS_WIN32_STDATOMIC_H -#define WIN32_LEAN_AND_MEAN #include #include #include diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h index dae8d9420d..2ff9735227 100644 --- a/compat/w32pthreads.h +++ b/compat/w32pthreads.h @@ -35,7 +35,6 @@ * As most functions here are used without checking return values, * only implement return values as necessary. */ -#define WIN32_LEAN_AND_MEAN #include #include #include diff --git a/configure b/configure index 932998b8d6..ff6a5c3600 100755 --- a/configure +++ b/configure @@ -5666,6 +5666,7 @@ case $target_os in fi ! enabled small && test_cmd $windres --version && enable gnu_windres enabled x86_32 && check_ldflags -Wl,--large-address-aware +add_cppflags -DWIN32_LEAN_AND_MEAN shlibdir_default="$bindir_default" SLIBPREF="" SLIBSUF=".dll" @@ -5716,6 +5717,7 @@ case $target_os in fi ! enabled small && test_cmd $windres --version && enable gnu_windres enabled x86_32 && check_ldflags -LARGEADDRESSAWARE +add_cppflags -DWIN32_LEAN_AND_MEAN shlibdir_default="$bindir_default" SLIBPREF="" SLIBSUF=".dll" @@ -5745,6 +5747,7 @@ case $target_os in enabled x86_64 && objformat="win64" || objformat="win32" enable dos_paths ! enabled small && test_cmd $windres --version && enable gnu_windres +add_cppflags -DWIN32_LEAN_AND_MEAN add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 ;; *-dos|freedos|opendos) diff --git a/libavdevice/dshow_capture.h b/libavdevice/dshow_capture.h index b548cd7afc..81e684b9be 100644 --- a/libavdevice/dshow_capture.h +++ b/libavdevice/dshow_capture.h @@ -27,7 +27,6 @@ #include "avdevice.h" #define COBJMACROS -#define WIN32_LEAN_AND_MEAN #include #define NO_DSHOW_STRSAFE #include diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c index f9dc846bf1..1b0cf5aa8f 100644 --- a/libavdevice/opengl_enc.c +++ b/libavdevice/opengl_enc.c @@ -30,7 +30,6 @@ #include "config.h" #if HAVE_WINDOWS_H -#define WIN32_LEAN_AND_MEAN #include #endif #if HAVE_OPENGL_GL3_H diff --git a/libavfilter/vsrc_ddagrab.c b/libavfilter/vsrc_ddagrab.c index b65261f685..c3107e11b4 100644 --- a/libavfilter/vsrc_ddagrab.c +++ b/libavfilter/vsrc_ddagrab.c @@ -22,7 +22,6 @@ #undef _WIN32_WINNT #define _WIN32_WINNT 0x0A00 #endif -#define WIN32_LEAN_AND_MEAN #include diff --git a/libavformat/os_support.c b/libavformat/os_support.c index 15cea7fa5b..2de6a7c3d9 100644 --- a/libavformat/os_support.c +++ b/libavformat/os_support.c @@ -34,11 +34,9 @@ #if HAVE_SYS_TIME_H #include #endif /* HAVE_SYS_TIME_H */ -#if HAVE_WINSOCK2_H -#include -#elif HAVE_SYS_SELECT_H +#if HAVE_SYS_SELECT_H #include -#endif /* HAVE_WINSOCK2_H */ +#endif /* HAVE_SYS_SELECT_H */ #endif /* !HAVE_POLL_H */ #include "network.h" diff --git a/libavutil/wchar_filename.h b/libavutil/wchar_filename.h index fbc0a55146..4f87e6f88b 100644 --- a/libavutil/wchar_filename.h +++ b/libavutil/wchar_filename.h @@ -21,7 +21,6 @@ #ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN #include #include "mem.h" diff --git a/libswscale/utils.c b/libswscale/utils.c index 8fe34a3437..8e74c6603e 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -34,7 +34,6 @@ #endif #endif #if HAVE_VIRTUALALLOC -#define WIN32_LEAN_AND_MEAN #include #endif -- 2.41.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v4 0/1] configure: Set WIN32_LEAN_AND_MEAN at configure time
Now adapted to insert WIN32_LEAN_AND_MEAN for MinGW and Cygwin too. L. E. Segovia (1): configure: Set WIN32_LEAN_AND_MEAN at configure time compat/atomics/win32/stdatomic.h | 1 - compat/w32pthreads.h | 1 - configure| 3 +++ libavdevice/dshow_capture.h | 1 - libavdevice/opengl_enc.c | 1 - libavfilter/vsrc_ddagrab.c | 1 - libavformat/os_support.c | 6 ++ libavutil/wchar_filename.h | 1 - libswscale/utils.c | 1 - 9 files changed, 5 insertions(+), 11 deletions(-) -- 2.41.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2] avdevice: Fix disabling audiotoolbox_outdev build on iOS
Ping for review. amyspark On 29/07/2023 16:00, L. E. Segovia wrote: > audiotoolbox.m uses CoreAudio APIs that are only available in macOS. > The existing CoreAudio framework check is already enough for this case > (as CoreAudio.h does not exist for the iDevices), however, it was never > passed as a dependency of audiotoolbox_outdev. This caused the > build system to include that output device into the targets. > > Signed-off-by: L. E. Segovia > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure b/configure > index 99388e7664..ccb9d7be7a 100755 > --- a/configure > +++ b/configure > @@ -3577,7 +3577,7 @@ alsa_outdev_deps="alsa" > avfoundation_indev_deps="avfoundation corevideo coremedia pthreads" > avfoundation_indev_suggest="coregraphics applicationservices" > avfoundation_indev_extralibs="-framework Foundation" > -audiotoolbox_outdev_deps="audiotoolbox pthreads" > +audiotoolbox_outdev_deps="audiotoolbox coreaudio pthreads" > audiotoolbox_outdev_extralibs="-framework AudioToolbox -framework CoreAudio" > bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h > dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h" > caca_outdev_deps="libcaca" -- amyspark https://www.amyspark.me ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v3 1/1] configure: Set WIN32_LEAN_AND_MEAN at configure time
Including winsock2.h or windows.h without WIN32_LEAN_AND_MEAN cause bzlib.h to parse as nonsense, due to an instance of #define char small in rpcndr.h. See: https://stackoverflow.com/a/27794577 Signed-off-by: L. E. Segovia --- compat/atomics/win32/stdatomic.h | 1 - compat/w32pthreads.h | 1 - configure| 1 + libavdevice/dshow_capture.h | 1 - libavdevice/opengl_enc.c | 1 - libavfilter/vsrc_ddagrab.c | 1 - libavformat/os_support.c | 6 ++ libavutil/wchar_filename.h | 1 - libswscale/utils.c | 1 - 9 files changed, 3 insertions(+), 11 deletions(-) diff --git a/compat/atomics/win32/stdatomic.h b/compat/atomics/win32/stdatomic.h index 28a627bfd3..4f8ac2bb60 100644 --- a/compat/atomics/win32/stdatomic.h +++ b/compat/atomics/win32/stdatomic.h @@ -19,7 +19,6 @@ #ifndef COMPAT_ATOMICS_WIN32_STDATOMIC_H #define COMPAT_ATOMICS_WIN32_STDATOMIC_H -#define WIN32_LEAN_AND_MEAN #include #include #include diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h index 6405e72b64..4ea0ce1ff4 100644 --- a/compat/w32pthreads.h +++ b/compat/w32pthreads.h @@ -35,7 +35,6 @@ * As most functions here are used without checking return values, * only implement return values as necessary. */ -#define WIN32_LEAN_AND_MEAN #include #include #include diff --git a/configure b/configure index 99388e7664..881a10bc0c 100755 --- a/configure +++ b/configure @@ -5716,6 +5716,7 @@ case $target_os in fi ! enabled small && test_cmd $windres --version && enable gnu_windres enabled x86_32 && check_ldflags -LARGEADDRESSAWARE +add_cppflags -DWIN32_LEAN_AND_MEAN shlibdir_default="$bindir_default" SLIBPREF="" SLIBSUF=".dll" diff --git a/libavdevice/dshow_capture.h b/libavdevice/dshow_capture.h index b548cd7afc..81e684b9be 100644 --- a/libavdevice/dshow_capture.h +++ b/libavdevice/dshow_capture.h @@ -27,7 +27,6 @@ #include "avdevice.h" #define COBJMACROS -#define WIN32_LEAN_AND_MEAN #include #define NO_DSHOW_STRSAFE #include diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c index f9dc846bf1..1b0cf5aa8f 100644 --- a/libavdevice/opengl_enc.c +++ b/libavdevice/opengl_enc.c @@ -30,7 +30,6 @@ #include "config.h" #if HAVE_WINDOWS_H -#define WIN32_LEAN_AND_MEAN #include #endif #if HAVE_OPENGL_GL3_H diff --git a/libavfilter/vsrc_ddagrab.c b/libavfilter/vsrc_ddagrab.c index 525d48110a..9093b89c5b 100644 --- a/libavfilter/vsrc_ddagrab.c +++ b/libavfilter/vsrc_ddagrab.c @@ -22,7 +22,6 @@ #undef _WIN32_WINNT #define _WIN32_WINNT 0x0A00 #endif -#define WIN32_LEAN_AND_MEAN #include diff --git a/libavformat/os_support.c b/libavformat/os_support.c index 15cea7fa5b..2de6a7c3d9 100644 --- a/libavformat/os_support.c +++ b/libavformat/os_support.c @@ -34,11 +34,9 @@ #if HAVE_SYS_TIME_H #include #endif /* HAVE_SYS_TIME_H */ -#if HAVE_WINSOCK2_H -#include -#elif HAVE_SYS_SELECT_H +#if HAVE_SYS_SELECT_H #include -#endif /* HAVE_WINSOCK2_H */ +#endif /* HAVE_SYS_SELECT_H */ #endif /* !HAVE_POLL_H */ #include "network.h" diff --git a/libavutil/wchar_filename.h b/libavutil/wchar_filename.h index fbc0a55146..4f87e6f88b 100644 --- a/libavutil/wchar_filename.h +++ b/libavutil/wchar_filename.h @@ -21,7 +21,6 @@ #ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN #include #include "mem.h" diff --git a/libswscale/utils.c b/libswscale/utils.c index 8fe34a3437..8e74c6603e 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -34,7 +34,6 @@ #endif #endif #if HAVE_VIRTUALALLOC -#define WIN32_LEAN_AND_MEAN #include #endif -- 2.41.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v3 0/1] configure: Set WIN32_LEAN_AND_MEAN at configure time
Thanks Martin for the suggestion, I've implemented it in this version. As for the changes to os_support.c, the removal was intended to avoid duplicating the logic that already exists in os_support.h. I've kept it in this version for consistency. L. E. Segovia (1): configure: Set WIN32_LEAN_AND_MEAN at configure time compat/atomics/win32/stdatomic.h | 1 - compat/w32pthreads.h | 1 - configure| 1 + libavdevice/dshow_capture.h | 1 - libavdevice/opengl_enc.c | 1 - libavfilter/vsrc_ddagrab.c | 1 - libavformat/os_support.c | 6 ++ libavutil/wchar_filename.h | 1 - libswscale/utils.c | 1 - 9 files changed, 3 insertions(+), 11 deletions(-) -- 2.41.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] os_support, network: Fix build failure on Windows with BZIP2
Hey, Yes, doing so directly in the configure script could be more useful. In fact, while I was doing further internal testing, I found two more instances that needed patching up. I'll update this set and let you know. amyspark On 04/08/2023 09:39, Martin Storsjö wrote: > On Fri, 4 Aug 2023, Martin Storsjö wrote: > >> On Thu, 27 Jul 2023, L. E. Segovia wrote: >> >>> Including winsock2.h without WIN32_LEAN_AND_MEAN causes bzlib.h to parse >>> as nonsense, due to an instance of #define char small in rpcndr.h >>> (included transitively from windows.h). >>> >>> See: https://stackoverflow.com/a/27794577 >>> Signed-off-by: L. E. Segovia >>> --- >>> libavformat/network.h | 1 + >>> libavformat/os_support.c | 6 ++ >>> libavformat/os_support.h | 1 + >>> 3 files changed, 4 insertions(+), 4 deletions(-) >> >> The change looks mostly reasonable to me I think, and WIN32_LEAN_AND_MEAN is >> generally beneficial. I've got a couple comments below though. > > Alternatively, I guess we could consider adding WIN32_LEAN_AND_MEAN in > configure somewhere instead? That way we don't need to hunt down any > potential stray includes of windows.h/winsock2.h if they are added elsewhere. > > // Martin > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". -- amyspark https://www.amyspark.me ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v5 4/4] all: Guard if (EXTERNAL*) checks with #if HAVE_X86ASM
Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a Signed-off-by: L. E. Segovia --- libavcodec/x86/aacencdsp_init.c| 2 ++ libavcodec/x86/aacpsdsp_init.c | 2 ++ libavcodec/x86/ac3dsp_init.c | 4 libavcodec/x86/audiodsp_init.c | 2 ++ libavcodec/x86/bswapdsp_init.c | 2 ++ libavcodec/x86/cavsdsp.c | 2 ++ libavcodec/x86/celt_pvq_init.c | 2 ++ libavcodec/x86/cfhddsp_init.c | 2 ++ libavcodec/x86/cfhdencdsp_init.c | 2 ++ libavcodec/x86/dcadsp_init.c | 2 ++ libavcodec/x86/dct_init.c | 2 ++ libavcodec/x86/dnxhdenc_init.c | 2 ++ libavcodec/x86/exrdsp_init.c | 2 ++ libavcodec/x86/fft_init.c | 2 ++ libavcodec/x86/g722dsp_init.c | 2 ++ libavcodec/x86/h263dsp_init.c | 2 ++ libavcodec/x86/h264_intrapred_init.c | 2 ++ libavcodec/x86/h264chroma_init.c | 2 ++ libavcodec/x86/hevcdsp_init.c | 2 ++ libavcodec/x86/hpeldsp_init.c | 2 ++ libavcodec/x86/hpeldsp_vp3_init.c | 2 ++ libavcodec/x86/huffyuvdsp_init.c | 2 ++ libavcodec/x86/huffyuvencdsp_init.c| 2 ++ libavcodec/x86/idctdsp_init.c | 2 ++ libavcodec/x86/jpeg2000dsp_init.c | 2 ++ libavcodec/x86/lossless_videodsp_init.c| 2 ++ libavcodec/x86/lossless_videoencdsp_init.c | 2 ++ libavcodec/x86/me_cmp_init.c | 2 ++ libavcodec/x86/mlpdsp_init.c | 2 +- libavcodec/x86/mpegvideoencdsp_init.c | 2 ++ libavcodec/x86/opusdsp_init.c | 2 ++ libavcodec/x86/pixblockdsp_init.c | 2 ++ libavcodec/x86/pngdsp_init.c | 2 ++ libavcodec/x86/proresdsp_init.c| 2 ++ libavcodec/x86/rv34dsp_init.c | 2 ++ libavcodec/x86/sbcdsp_init.c | 2 ++ libavcodec/x86/sbrdsp_init.c | 2 ++ libavcodec/x86/svq1enc_init.c | 2 ++ libavcodec/x86/utvideodsp_init.c | 2 ++ libavcodec/x86/v210enc_init.c | 6 -- libavcodec/x86/vc1dsp_init.c | 2 +- libavcodec/x86/vorbisdsp_init.c| 2 ++ libavcodec/x86/vp3dsp_init.c | 2 ++ libavcodec/x86/vp6dsp_init.c | 2 ++ libavfilter/x86/af_afir_init.c | 2 ++ libavfilter/x86/af_anlmdn_init.c | 2 ++ libavfilter/x86/af_volume_init.c | 2 ++ libavfilter/x86/avf_showcqt_init.c | 2 ++ libavfilter/x86/colorspacedsp_init.c | 2 ++ libavfilter/x86/vf_atadenoise_init.c | 2 ++ libavfilter/x86/vf_blend_init.c| 2 ++ libavfilter/x86/vf_bwdif_init.c| 2 ++ libavfilter/x86/vf_convolution_init.c | 2 +- libavfilter/x86/vf_framerate_init.c| 2 ++ libavfilter/x86/vf_fspp_init.c | 2 ++ libavfilter/x86/vf_gblur_init.c| 2 ++ libavfilter/x86/vf_hflip_init.c| 2 ++ libavfilter/x86/vf_limiter_init.c | 2 ++ libavfilter/x86/vf_maskedclamp_init.c | 2 ++ libavfilter/x86/vf_maskedmerge_init.c | 2 ++ libavfilter/x86/vf_overlay_init.c | 2 ++ libavfilter/x86/vf_pp7_init.c | 2 ++ libavfilter/x86/vf_psnr_init.c | 2 ++ libavfilter/x86/vf_removegrain_init.c | 2 ++ libavfilter/x86/vf_ssim_init.c | 2 ++ libavfilter/x86/vf_stereo3d_init.c | 2 ++ libavfilter/x86/vf_threshold_init.c| 2 ++ libavfilter/x86/vf_tinterlace_init.c | 2 ++ libavfilter/x86/vf_transpose_init.c| 2 ++ libavfilter/x86/vf_v360_init.c | 2 ++ libavfilter/x86/vf_w3fdif_init.c | 2 ++ libavfilter/x86/vf_yadif_init.c| 2 ++ libavutil/x86/fixed_dsp_init.c | 2 ++ libavutil/x86/float_dsp_init.c | 2 ++ libavutil/x86/imgutils_init.c | 2 ++ libavutil/x86/lls_init.c | 2 ++ libavutil/x86/pixelutils_init.c| 2 ++ libswresample/x86/audio_convert_init.c | 2 ++ libswresample/x86/resample_init.c | 6 ++ libswscale/x86/rgb2rgb.c | 2 ++ libswscale/x86/swscale.c | 2 ++ 81 files changed, 167 insertions(+), 5 deletions(-) diff --git a/libavcodec/x86/aacencdsp_init.c b/libavcodec/x86/aacencdsp_init.c index 049a2417d9..7dca1d481b 100644 --- a/libavcodec/x86/aacencdsp_init.c +++ b/libavcodec/x86/aacencdsp_init.c @@ -34,6 +34,7 @@ void ff_aac_quantize_bands_sse2(int *out, const float *in, const float *scaled, av_cold void ff_aac_dsp_init_x86(AACEncContext *s) { +#if HAVE_X86ASM int cpu_flags = av_get_cpu_flags(); if (EXTERNAL_SSE(cpu_flags)) @@ -41,4 +42,5 @@ av_cold void ff_aac_dsp_init_x86(AACEncContext *s) if (EXTERNAL_SSE2(cpu_flags)) s->quant_bands = ff_aac_quantize_bands_sse2; +#endif /* HAVE_X86ASM */ } diff --git a/libavcodec/x86/aacpsdsp_init.c b/libavcodec/x86/aacpsdsp_ini
[FFmpeg-devel] [PATCH v5 3/4] all: Guard if (INLINE*) checks with #if HAVE_INLINE_ASM
Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a Signed-off-by: L. E. Segovia --- libavcodec/x86/hpeldsp_init.c | 2 ++ libavcodec/x86/vc1dsp_init.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/x86/hpeldsp_init.c b/libavcodec/x86/hpeldsp_init.c index 09c48c341e..6bde5a3893 100644 --- a/libavcodec/x86/hpeldsp_init.c +++ b/libavcodec/x86/hpeldsp_init.c @@ -224,8 +224,10 @@ av_cold void ff_hpeldsp_init_x86(HpelDSPContext *c, int flags) { int cpu_flags = av_get_cpu_flags(); +#if HAVE_INLINE_ASM if (INLINE_MMX(cpu_flags)) hpeldsp_init_mmx(c, flags); +#endif if (EXTERNAL_MMXEXT(cpu_flags)) hpeldsp_init_mmxext(c, flags); diff --git a/libavcodec/x86/vc1dsp_init.c b/libavcodec/x86/vc1dsp_init.c index bc63933e83..65fc28ea35 100644 --- a/libavcodec/x86/vc1dsp_init.c +++ b/libavcodec/x86/vc1dsp_init.c @@ -102,7 +102,7 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp) { int cpu_flags = av_get_cpu_flags(); -#if HAVE_6REGS +#if HAVE_6REGS && HAVE_INLINE_ASM if (INLINE_MMX(cpu_flags)) if (EXTERNAL_MMX(cpu_flags)) ff_vc1dsp_init_mmx(dsp); -- 2.41.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v5 2/4] all: Replace if (CONFIG_FOO) checks by #if CONFIG_FOO
Continuation of e42aaaf92a4b0c88d60acc12df64c81d0887c26f Signed-off-by: L. E. Segovia --- fftools/ffprobe.c | 16 +++- fftools/opt_common.c| 12 ++-- libavformat/rtmpproto.c | 24 ++-- 3 files changed, 39 insertions(+), 13 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index a39185f6fe..c3e90a9409 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -3572,9 +3572,9 @@ static void ffprobe_show_program_version(WriterContext *w) av_bprint_finalize(, NULL); } -#define SHOW_LIB_VERSION(libname, LIBNAME) \ -do {\ -if (CONFIG_##LIBNAME) { \ +#define SHOW_LIB_VERSION_0(libname, LIBNAME) +#define SHOW_LIB_VERSION_1(libname, LIBNAME)\ +{ \ unsigned int version = libname##_version(); \ writer_print_section_header(w, SECTION_ID_LIBRARY_VERSION); \ print_str("name","lib" #libname); \ @@ -3584,8 +3584,14 @@ static void ffprobe_show_program_version(WriterContext *w) print_int("version", version); \ print_str("ident", LIB##LIBNAME##_IDENT); \ writer_print_section_footer(w); \ -} \ -} while (0) +} + +#define SHOW_LIB_VERSION_2(cfg, libname, LIBNAME) \ +SHOW_LIB_VERSION_ ## cfg(libname, LIBNAME) +#define SHOW_LIB_VERSION_3(cfg, libname, LIBNAME) \ +SHOW_LIB_VERSION_2(cfg, libname, LIBNAME) +#define SHOW_LIB_VERSION(libname, LIBNAME) \ +SHOW_LIB_VERSION_3(CONFIG_ ## LIBNAME, libname, LIBNAME) static void ffprobe_show_library_versions(WriterContext *w) { diff --git a/fftools/opt_common.c b/fftools/opt_common.c index 7c996f140d..5729d656e9 100644 --- a/fftools/opt_common.c +++ b/fftools/opt_common.c @@ -153,8 +153,9 @@ static int warned_cfg = 0; #define SHOW_CONFIG 4 #define SHOW_COPYRIGHT 8 -#define PRINT_LIB_INFO(libname, LIBNAME, flags, level) \ -if (CONFIG_##LIBNAME) { \ +#define PRINT_LIB_INFO_0(libname, LIBNAME, flags, level) +#define PRINT_LIB_INFO_1(libname, LIBNAME, flags, level)\ +{ \ const char *indent = flags & INDENT? " " : ""; \ if (flags & SHOW_VERSION) { \ unsigned int version = libname##_version(); \ @@ -182,6 +183,13 @@ static int warned_cfg = 0; } \ } \ +#define PRINT_LIB_INFO_2(cfg, libname, LIBNAME, flags, level) \ +PRINT_LIB_INFO_ ## cfg(libname, LIBNAME, flags, level) +#define PRINT_LIB_INFO_3(cfg, libname, LIBNAME, flags, level) \ +PRINT_LIB_INFO_2(cfg, libname, LIBNAME, flags, level) +#define PRINT_LIB_INFO(libname, LIBNAME, flags, level) \ +PRINT_LIB_INFO_3(CONFIG_ ## LIBNAME, libname, LIBNAME, flags, level) + static void print_all_libs_info(int flags, int level) { PRINT_LIB_INFO(avutil, AVUTIL, flags, level); diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index f0ef223f05..6d84fcf34f 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -1222,7 +1222,8 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt) for (i = 9; i <= RTMP_HANDSHAKE_PACKET_SIZE; i++) tosend[i] = av_lfg_get() >> 24; -if (CONFIG_FFRTMPCRYPT_PROTOCOL && rt->encrypted) { +#if CONFIG_FFRTMPCRYPT_PROTOCOL +if (rt->encrypted) { /* When the client wants to use RTMPE, we have to change the command * byte to 0x06 which means to use encrypted data and we have to set * the flash version to at least 9.0.115.0. */ @@ -1237,6 +1238,7 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt) if ((ret = ff_rtmpe_gen_pub_key(rt->stream, tosend + 1)) < 0) return ret; } +#endif client_pos = rtmp_handshake_imprint_with_digest(tosend + 1, rt->encrypted); if (client_pos < 0) @@ -1300,7 +1302,8 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt) if (ret < 0) return ret; -if (CONFIG_FFRTMPCRYPT_PROTOCOL && rt->encrypted) { +#if CONFIG_FFRTMPCRYPT_PROTOCOL +if (rt->encrypted) { /* Comp
[FFmpeg-devel] [PATCH v5 1/4] all: Replace if (ARCH_FOO) checks by #if ARCH_FOO, part 2
Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a Co-authored-by: Nirbheek Chauhan Signed-off-by: L. E. Segovia --- libavcodec/x86/fdctdsp_init.c| 2 + libavcodec/x86/flacdsp_init.c| 8 +- libavcodec/x86/hevcdsp_init.c| 547 ++- libavcodec/x86/idctdsp_init.c| 9 +- libavcodec/x86/mlpdsp_init.c | 6 +- libavcodec/x86/vc1dsp_init.c | 6 +- libavfilter/x86/colorspacedsp_init.c | 4 +- libavfilter/x86/vf_atadenoise_init.c | 6 +- libavfilter/x86/vf_ssim_init.c | 4 +- libavfilter/x86/vf_w3fdif_init.c | 4 +- 10 files changed, 311 insertions(+), 285 deletions(-) diff --git a/libavcodec/x86/fdctdsp_init.c b/libavcodec/x86/fdctdsp_init.c index 92a842433d..4a874a640d 100644 --- a/libavcodec/x86/fdctdsp_init.c +++ b/libavcodec/x86/fdctdsp_init.c @@ -31,8 +31,10 @@ av_cold void ff_fdctdsp_init_x86(FDCTDSPContext *c, AVCodecContext *avctx, if (!high_bit_depth) { if ((dct_algo == FF_DCT_AUTO || dct_algo == FF_DCT_MMX)) { +#if HAVE_INLINE_SSE2 if (INLINE_SSE2(cpu_flags)) c->fdct = ff_fdct_sse2; +#endif } } } diff --git a/libavcodec/x86/flacdsp_init.c b/libavcodec/x86/flacdsp_init.c index 87daed7005..49e67ee2b0 100644 --- a/libavcodec/x86/flacdsp_init.c +++ b/libavcodec/x86/flacdsp_init.c @@ -97,15 +97,19 @@ av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int } if (EXTERNAL_AVX(cpu_flags)) { if (fmt == AV_SAMPLE_FMT_S16) { -if (ARCH_X86_64 && channels == 8) +#if ARCH_X86_64 +if (channels == 8) c->decorrelate[0] = ff_flac_decorrelate_indep8_16_avx; +#endif } else if (fmt == AV_SAMPLE_FMT_S32) { if (channels == 4) c->decorrelate[0] = ff_flac_decorrelate_indep4_32_avx; else if (channels == 6) c->decorrelate[0] = ff_flac_decorrelate_indep6_32_avx; -else if (ARCH_X86_64 && channels == 8) +#if ARCH_X86_64 +else if (channels == 8) c->decorrelate[0] = ff_flac_decorrelate_indep8_32_avx; +#endif } } if (EXTERNAL_XOP(cpu_flags)) { diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c index 6f45e5e0db..c7060085a2 100644 --- a/libavcodec/x86/hevcdsp_init.c +++ b/libavcodec/x86/hevcdsp_init.c @@ -710,13 +710,13 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) if (EXTERNAL_SSE2(cpu_flags)) { c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_sse2; c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_sse2; -if (ARCH_X86_64) { -c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_sse2; -c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_sse2; +#if ARCH_X86_64 +c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_sse2; +c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_sse2; -c->idct[2] = ff_hevc_idct_16x16_8_sse2; -c->idct[3] = ff_hevc_idct_32x32_8_sse2; -} +c->idct[2] = ff_hevc_idct_16x16_8_sse2; +c->idct[3] = ff_hevc_idct_32x32_8_sse2; +#endif SAO_BAND_INIT(8, sse2); c->idct_dc[1] = ff_hevc_idct_8x8_dc_8_sse2; @@ -731,14 +731,14 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->add_residual[3] = ff_hevc_add_residual_32_8_sse2; } if (EXTERNAL_SSSE3(cpu_flags)) { -if(ARCH_X86_64) { -c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_ssse3; -c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_ssse3; -} +#if ARCH_X86_64 +c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_ssse3; +c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_ssse3; +#endif SAO_EDGE_INIT(8, ssse3); } -if (EXTERNAL_SSE4(cpu_flags) && ARCH_X86_64) { - +#if ARCH_X86_64 +if (EXTERNAL_SSE4(cpu_flags)) { EPEL_LINKS(c->put_hevc_epel, 0, 0, pel_pixels, 8, sse4); EPEL_LINKS(c->put_hevc_epel, 0, 1, epel_h, 8, sse4); EPEL_LINKS(c->put_hevc_epel, 1, 0, epel_v, 8, sse4); @@ -749,16 +749,17 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) QPEL_LINKS(c->put_hevc_qpel, 1, 0, qpel_v, 8, sse4); QPEL_LINKS(c->put_hevc_qpel, 1, 1, qpel_hv,8, sse4); } +#endif if (EXTERNAL_AVX(cpu_flags)) { c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_avx; c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_avx; -if (ARCH_X86_64) { -
[FFmpeg-devel] [PATCH v5 0/4] Fix MSVC build without optimizations
Sending again to fix the format=flowed mishap. L. E. Segovia (4): all: Replace if (ARCH_FOO) checks by #if ARCH_FOO, part 2 all: Replace if (CONFIG_FOO) checks by #if CONFIG_FOO all: Guard if (INLINE*) checks with #if HAVE_INLINE_ASM all: Guard if (EXTERNAL*) checks with #if HAVE_X86ASM fftools/ffprobe.c | 16 +- fftools/opt_common.c | 12 +- libavcodec/x86/aacencdsp_init.c| 2 + libavcodec/x86/aacpsdsp_init.c | 2 + libavcodec/x86/ac3dsp_init.c | 4 + libavcodec/x86/audiodsp_init.c | 2 + libavcodec/x86/bswapdsp_init.c | 2 + libavcodec/x86/cavsdsp.c | 2 + libavcodec/x86/celt_pvq_init.c | 2 + libavcodec/x86/cfhddsp_init.c | 2 + libavcodec/x86/cfhdencdsp_init.c | 2 + libavcodec/x86/dcadsp_init.c | 2 + libavcodec/x86/dct_init.c | 2 + libavcodec/x86/dnxhdenc_init.c | 2 + libavcodec/x86/exrdsp_init.c | 2 + libavcodec/x86/fdctdsp_init.c | 2 + libavcodec/x86/fft_init.c | 2 + libavcodec/x86/flacdsp_init.c | 8 +- libavcodec/x86/g722dsp_init.c | 2 + libavcodec/x86/h263dsp_init.c | 2 + libavcodec/x86/h264_intrapred_init.c | 2 + libavcodec/x86/h264chroma_init.c | 2 + libavcodec/x86/hevcdsp_init.c | 549 +++-- libavcodec/x86/hpeldsp_init.c | 4 + libavcodec/x86/hpeldsp_vp3_init.c | 2 + libavcodec/x86/huffyuvdsp_init.c | 2 + libavcodec/x86/huffyuvencdsp_init.c| 2 + libavcodec/x86/idctdsp_init.c | 11 +- libavcodec/x86/jpeg2000dsp_init.c | 2 + libavcodec/x86/lossless_videodsp_init.c| 2 + libavcodec/x86/lossless_videoencdsp_init.c | 2 + libavcodec/x86/me_cmp_init.c | 2 + libavcodec/x86/mlpdsp_init.c | 6 +- libavcodec/x86/mpegvideoencdsp_init.c | 2 + libavcodec/x86/opusdsp_init.c | 2 + libavcodec/x86/pixblockdsp_init.c | 2 + libavcodec/x86/pngdsp_init.c | 2 + libavcodec/x86/proresdsp_init.c| 2 + libavcodec/x86/rv34dsp_init.c | 2 + libavcodec/x86/sbcdsp_init.c | 2 + libavcodec/x86/sbrdsp_init.c | 2 + libavcodec/x86/svq1enc_init.c | 2 + libavcodec/x86/utvideodsp_init.c | 2 + libavcodec/x86/v210enc_init.c | 6 +- libavcodec/x86/vc1dsp_init.c | 6 +- libavcodec/x86/vorbisdsp_init.c| 2 + libavcodec/x86/vp3dsp_init.c | 2 + libavcodec/x86/vp6dsp_init.c | 2 + libavfilter/x86/af_afir_init.c | 2 + libavfilter/x86/af_anlmdn_init.c | 2 + libavfilter/x86/af_volume_init.c | 2 + libavfilter/x86/avf_showcqt_init.c | 2 + libavfilter/x86/colorspacedsp_init.c | 6 +- libavfilter/x86/vf_atadenoise_init.c | 8 +- libavfilter/x86/vf_blend_init.c| 2 + libavfilter/x86/vf_bwdif_init.c| 2 + libavfilter/x86/vf_convolution_init.c | 2 +- libavfilter/x86/vf_framerate_init.c| 2 + libavfilter/x86/vf_fspp_init.c | 2 + libavfilter/x86/vf_gblur_init.c| 2 + libavfilter/x86/vf_hflip_init.c| 2 + libavfilter/x86/vf_limiter_init.c | 2 + libavfilter/x86/vf_maskedclamp_init.c | 2 + libavfilter/x86/vf_maskedmerge_init.c | 2 + libavfilter/x86/vf_overlay_init.c | 2 + libavfilter/x86/vf_pp7_init.c | 2 + libavfilter/x86/vf_psnr_init.c | 2 + libavfilter/x86/vf_removegrain_init.c | 2 + libavfilter/x86/vf_ssim_init.c | 6 +- libavfilter/x86/vf_stereo3d_init.c | 2 + libavfilter/x86/vf_threshold_init.c| 2 + libavfilter/x86/vf_tinterlace_init.c | 2 + libavfilter/x86/vf_transpose_init.c| 2 + libavfilter/x86/vf_v360_init.c | 2 + libavfilter/x86/vf_w3fdif_init.c | 6 +- libavfilter/x86/vf_yadif_init.c| 2 + libavformat/rtmpproto.c| 24 +- libavutil/x86/fixed_dsp_init.c | 2 + libavutil/x86/float_dsp_init.c | 2 + libavutil/x86/imgutils_init.c | 2 + libavutil/x86/lls_init.c | 2 + libavutil/x86/pixelutils_init.c| 2 + libswresample/x86/audio_convert_init.c | 2 + libswresample/x86/resample_init.c | 6 + libswscale/x86/rgb2rgb.c | 2 + libswscale/x86/swscale.c | 2 + 86 files changed, 517 insertions(+), 301 deletions(-) -- 2.41.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman
[FFmpeg-devel] [PATCH v2] avdevice: Fix disabling audiotoolbox_outdev build on iOS
audiotoolbox.m uses CoreAudio APIs that are only available in macOS. The existing CoreAudio framework check is already enough for this case (as CoreAudio.h does not exist for the iDevices), however, it was never passed as a dependency of audiotoolbox_outdev. This caused the build system to include that output device into the targets. Signed-off-by: L. E. Segovia --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 99388e7664..ccb9d7be7a 100755 --- a/configure +++ b/configure @@ -3577,7 +3577,7 @@ alsa_outdev_deps="alsa" avfoundation_indev_deps="avfoundation corevideo coremedia pthreads" avfoundation_indev_suggest="coregraphics applicationservices" avfoundation_indev_extralibs="-framework Foundation" -audiotoolbox_outdev_deps="audiotoolbox pthreads" +audiotoolbox_outdev_deps="audiotoolbox coreaudio pthreads" audiotoolbox_outdev_extralibs="-framework AudioToolbox -framework CoreAudio" bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h" caca_outdev_deps="libcaca" -- 2.41.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v4 0/4] Fix MSVC build without optimizations
Hi all, Yes, the linking step bails out with optimizations disabled under MSVC. The rest of the compilers perform DCE even at -O0, but under Windows, the /FORCE:UNRESOLVED linker flag is needed to work around this. As for the stub generation -- given the amount of places that these patches touch, and that someone would need to figure out a complete configuration to test them all, I believe it's very much infeasible. Conversely, hooking into the macro uses makes testing as simple as one run with /O2 and another with /O0 -- which we use in development as well. best, amyspark On 28/07/2023 10:21, Matt Oliver wrote: > On Fri, 28 Jul 2023 at 20:55, Nicolas George wrote: > >> Reimar Döffinger (12023-07-28): >>> I assume the issue is missing symbols during linking? >>> If you really want this, why not create a file that provides dummy >>> symbols for all that are missing, concentrating the #if mess in >>> a single place and avoiding affecting any of the regular code, and thus >>> having no impact at all when compiling with optimizations. >>> Yes, it's likely to be a good bit of maintenance effort for those who >>> want to use it, but at least anyone not caring about this feature can >>> ignore it, so at least I would not have a reason to be against it. >> >> This is an interesting idea. It would even be possible to include a tool >> that generate these stubs directly from the linker's errors, reducing >> the maintenance. >> >> Maybe even make the stubs static inline functions rather than actual >> linking symbols. >> > > The issue with dead code elimination and msvc has been raised many times > over the years and the general response has been to not support it. The > last discussion was back in 2016 ( > https://ffmpeg.org/pipermail/ffmpeg-devel/2016-December/204530.html) which > apparently was by me. > There was an attempt previously by someone to try and semi-manually add all > the missing symbols using dummy functions but it obviously didnt go > anywhere as if I remember correctly it was difficult to track them all down > for all possible configuration options and maintaining it was just too hard > and it never got completed. I dont have the link but if you crawl through > old mailing list posts it is in there somewhere. > > About a decade ago I went the auto generation route and created a tool that > generated Visual Studio projects by scanning ffmpegs make/configure files > and as part of that the tool creates dummy files with all the missing > symbols for the requested configuration options ( > https://github.com/ShiftMediaProject/FFVS-Project-Generator). Its not the > most readable code but it does work. Whats potentially more interesting is > over all the years that project has been used the number of dummy dce stubs > has decreased from what used to be there when some of those early attempts > I mentioned were made. However just checking it now shows that there are > still a good 1000 dummy functions created for avcodec alone, although > admittedly theres only about a dozen for all the other libs. So a > pre-processing tool can work nicely, the trick is to be able to get it to > work with different compilers as the command line options and output format > is slightly different and that only gives you the function name you still > need to then scan the code to work out the correct types for the functions > parameters and return types in order to make a dummy stub. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". -- amyspark https://www.amyspark.me ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2] os_support, network: Fix build failure on Windows with BZIP2
Including winsock2.h without WIN32_LEAN_AND_MEAN causes bzlib.h to parse as nonsense, due to an instance of #define char small in rpcndr.h (included transitively from windows.h). See: https://stackoverflow.com/a/27794577 Signed-off-by: L. E. Segovia --- libavformat/network.h| 1 + libavformat/os_support.c | 6 ++ libavformat/os_support.h | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/network.h b/libavformat/network.h index ca214087fc..06b6117fc7 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -35,6 +35,7 @@ #endif #if HAVE_WINSOCK2_H +#define WIN32_LEAN_AND_MEAN #include #include diff --git a/libavformat/os_support.c b/libavformat/os_support.c index 15cea7fa5b..2de6a7c3d9 100644 --- a/libavformat/os_support.c +++ b/libavformat/os_support.c @@ -34,11 +34,9 @@ #if HAVE_SYS_TIME_H #include #endif /* HAVE_SYS_TIME_H */ -#if HAVE_WINSOCK2_H -#include -#elif HAVE_SYS_SELECT_H +#if HAVE_SYS_SELECT_H #include -#endif /* HAVE_WINSOCK2_H */ +#endif /* HAVE_SYS_SELECT_H */ #endif /* !HAVE_POLL_H */ #include "network.h" diff --git a/libavformat/os_support.h b/libavformat/os_support.h index f2ff38e23b..5bdd275d70 100644 --- a/libavformat/os_support.h +++ b/libavformat/os_support.h @@ -140,6 +140,7 @@ typedef int socklen_t; typedef unsigned long nfds_t; #if HAVE_WINSOCK2_H +#define WIN32_LEAN_AND_MEAN #include #endif #if !HAVE_STRUCT_POLLFD -- 2.41.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avdevice: Fix disabling audiotoolbox_outdev build on iOS
audiotoolbox.m uses CoreAudio APIs that are only available in macOS. The existing CoreAudio framework check is already enough for this case (as CoreAudio.h does not exist for the iDevices), however, it was never passed as a dependency of audiotoolbox_outdev. This caused the build system to include that output device into the targets. Signed-off-by: L. E. Segovia --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 99388e7664..ccb9d7be7a 100755 --- a/configure +++ b/configure @@ -3577,7 +3577,7 @@ alsa_outdev_deps="alsa" avfoundation_indev_deps="avfoundation corevideo coremedia pthreads" avfoundation_indev_suggest="coregraphics applicationservices" avfoundation_indev_extralibs="-framework Foundation" -audiotoolbox_outdev_deps="audiotoolbox pthreads" +audiotoolbox_outdev_deps="audiotoolbox coreaudio pthreads" audiotoolbox_outdev_extralibs="-framework AudioToolbox -framework CoreAudio" bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h" caca_outdev_deps="libcaca" -- 2.41.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v4 4/4] all: Guard if (EXTERNAL*) checks with #if HAVE_X86ASM
Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a Signed-off-by: L. E. Segovia --- libavcodec/x86/aacencdsp_init.c| 2 ++ libavcodec/x86/aacpsdsp_init.c | 2 ++ libavcodec/x86/ac3dsp_init.c | 4 libavcodec/x86/audiodsp_init.c | 2 ++ libavcodec/x86/bswapdsp_init.c | 2 ++ libavcodec/x86/cavsdsp.c | 2 ++ libavcodec/x86/celt_pvq_init.c | 2 ++ libavcodec/x86/cfhddsp_init.c | 2 ++ libavcodec/x86/cfhdencdsp_init.c | 2 ++ libavcodec/x86/dcadsp_init.c | 2 ++ libavcodec/x86/dct_init.c | 2 ++ libavcodec/x86/dnxhdenc_init.c | 2 ++ libavcodec/x86/exrdsp_init.c | 2 ++ libavcodec/x86/fft_init.c | 2 ++ libavcodec/x86/g722dsp_init.c | 2 ++ libavcodec/x86/h263dsp_init.c | 2 ++ libavcodec/x86/h264_intrapred_init.c | 2 ++ libavcodec/x86/h264chroma_init.c | 2 ++ libavcodec/x86/hevcdsp_init.c | 2 ++ libavcodec/x86/hpeldsp_init.c | 2 ++ libavcodec/x86/hpeldsp_vp3_init.c | 2 ++ libavcodec/x86/huffyuvdsp_init.c | 2 ++ libavcodec/x86/huffyuvencdsp_init.c| 2 ++ libavcodec/x86/idctdsp_init.c | 2 ++ libavcodec/x86/jpeg2000dsp_init.c | 2 ++ libavcodec/x86/lossless_videodsp_init.c| 2 ++ libavcodec/x86/lossless_videoencdsp_init.c | 2 ++ libavcodec/x86/me_cmp_init.c | 2 ++ libavcodec/x86/mlpdsp_init.c | 2 +- libavcodec/x86/mpegvideoencdsp_init.c | 2 ++ libavcodec/x86/opusdsp_init.c | 2 ++ libavcodec/x86/pixblockdsp_init.c | 2 ++ libavcodec/x86/pngdsp_init.c | 2 ++ libavcodec/x86/proresdsp_init.c| 2 ++ libavcodec/x86/rv34dsp_init.c | 2 ++ libavcodec/x86/sbcdsp_init.c | 2 ++ libavcodec/x86/sbrdsp_init.c | 2 ++ libavcodec/x86/svq1enc_init.c | 2 ++ libavcodec/x86/utvideodsp_init.c | 2 ++ libavcodec/x86/v210enc_init.c | 6 -- libavcodec/x86/vc1dsp_init.c | 2 +- libavcodec/x86/vorbisdsp_init.c| 2 ++ libavcodec/x86/vp3dsp_init.c | 2 ++ libavcodec/x86/vp6dsp_init.c | 2 ++ libavfilter/x86/af_afir_init.c | 2 ++ libavfilter/x86/af_anlmdn_init.c | 2 ++ libavfilter/x86/af_volume_init.c | 2 ++ libavfilter/x86/avf_showcqt_init.c | 2 ++ libavfilter/x86/colorspacedsp_init.c | 2 ++ libavfilter/x86/vf_atadenoise_init.c | 2 ++ libavfilter/x86/vf_blend_init.c| 2 ++ libavfilter/x86/vf_bwdif_init.c| 2 ++ libavfilter/x86/vf_convolution_init.c | 2 +- libavfilter/x86/vf_framerate_init.c| 2 ++ libavfilter/x86/vf_fspp_init.c | 2 ++ libavfilter/x86/vf_gblur_init.c| 2 ++ libavfilter/x86/vf_hflip_init.c| 2 ++ libavfilter/x86/vf_limiter_init.c | 2 ++ libavfilter/x86/vf_maskedclamp_init.c | 2 ++ libavfilter/x86/vf_maskedmerge_init.c | 2 ++ libavfilter/x86/vf_overlay_init.c | 2 ++ libavfilter/x86/vf_pp7_init.c | 2 ++ libavfilter/x86/vf_psnr_init.c | 2 ++ libavfilter/x86/vf_removegrain_init.c | 2 ++ libavfilter/x86/vf_ssim_init.c | 2 ++ libavfilter/x86/vf_stereo3d_init.c | 2 ++ libavfilter/x86/vf_threshold_init.c| 2 ++ libavfilter/x86/vf_tinterlace_init.c | 2 ++ libavfilter/x86/vf_transpose_init.c| 2 ++ libavfilter/x86/vf_v360_init.c | 2 ++ libavfilter/x86/vf_w3fdif_init.c | 2 ++ libavfilter/x86/vf_yadif_init.c| 2 ++ libavutil/x86/fixed_dsp_init.c | 2 ++ libavutil/x86/float_dsp_init.c | 2 ++ libavutil/x86/imgutils_init.c | 2 ++ libavutil/x86/lls_init.c | 2 ++ libavutil/x86/pixelutils_init.c| 2 ++ libswresample/x86/audio_convert_init.c | 2 ++ libswresample/x86/resample_init.c | 6 ++ libswscale/x86/rgb2rgb.c | 2 ++ libswscale/x86/swscale.c | 2 ++ 81 files changed, 167 insertions(+), 5 deletions(-) diff --git a/libavcodec/x86/aacencdsp_init.c b/libavcodec/x86/aacencdsp_init.c index 049a2417d9..7dca1d481b 100644 --- a/libavcodec/x86/aacencdsp_init.c +++ b/libavcodec/x86/aacencdsp_init.c @@ -34,6 +34,7 @@ void ff_aac_quantize_bands_sse2(int *out, const float *in, const float *scaled, av_cold void ff_aac_dsp_init_x86(AACEncContext *s) { +#if HAVE_X86ASM int cpu_flags = av_get_cpu_flags(); if (EXTERNAL_SSE(cpu_flags)) @@ -41,4 +42,5 @@ av_cold void ff_aac_dsp_init_x86(AACEncContext *s) if (EXTERNAL_SSE2(cpu_flags)) s->quant_bands = ff_aac_quantize_bands_sse2; +#endif /* HAVE_X86ASM */ } diff --git a/libavcodec/x86/aacpsdsp_init.c b/libavcodec/x86/aacpsdsp_init.c in
[FFmpeg-devel] [PATCH v4 3/4] all: Guard if (INLINE*) checks with #if HAVE_INLINE_ASM
Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a Signed-off-by: L. E. Segovia --- libavcodec/x86/hpeldsp_init.c | 2 ++ libavcodec/x86/vc1dsp_init.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/x86/hpeldsp_init.c b/libavcodec/x86/hpeldsp_init.c index 09c48c341e..6bde5a3893 100644 --- a/libavcodec/x86/hpeldsp_init.c +++ b/libavcodec/x86/hpeldsp_init.c @@ -224,8 +224,10 @@ av_cold void ff_hpeldsp_init_x86(HpelDSPContext *c, int flags) { int cpu_flags = av_get_cpu_flags(); +#if HAVE_INLINE_ASM if (INLINE_MMX(cpu_flags)) hpeldsp_init_mmx(c, flags); +#endif if (EXTERNAL_MMXEXT(cpu_flags)) hpeldsp_init_mmxext(c, flags); diff --git a/libavcodec/x86/vc1dsp_init.c b/libavcodec/x86/vc1dsp_init.c index bc63933e83..65fc28ea35 100644 --- a/libavcodec/x86/vc1dsp_init.c +++ b/libavcodec/x86/vc1dsp_init.c @@ -102,7 +102,7 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp) { int cpu_flags = av_get_cpu_flags(); -#if HAVE_6REGS +#if HAVE_6REGS && HAVE_INLINE_ASM if (INLINE_MMX(cpu_flags)) if (EXTERNAL_MMX(cpu_flags)) ff_vc1dsp_init_mmx(dsp); -- 2.41.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v4 2/4] all: Replace if (CONFIG_FOO) checks by #if CONFIG_FOO
Continuation of e42aaaf92a4b0c88d60acc12df64c81d0887c26f Signed-off-by: L. E. Segovia --- fftools/ffprobe.c | 16 +++- fftools/opt_common.c| 12 ++-- libavformat/rtmpproto.c | 24 ++-- 3 files changed, 39 insertions(+), 13 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index a39185f6fe..c3e90a9409 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -3572,9 +3572,9 @@ static void ffprobe_show_program_version(WriterContext *w) av_bprint_finalize(, NULL); } -#define SHOW_LIB_VERSION(libname, LIBNAME) \ -do {\ -if (CONFIG_##LIBNAME) { \ +#define SHOW_LIB_VERSION_0(libname, LIBNAME) +#define SHOW_LIB_VERSION_1(libname, LIBNAME)\ +{ \ unsigned int version = libname##_version(); \ writer_print_section_header(w, SECTION_ID_LIBRARY_VERSION); \ print_str("name","lib" #libname); \ @@ -3584,8 +3584,14 @@ static void ffprobe_show_program_version(WriterContext *w) print_int("version", version); \ print_str("ident", LIB##LIBNAME##_IDENT); \ writer_print_section_footer(w); \ -} \ -} while (0) +} + +#define SHOW_LIB_VERSION_2(cfg, libname, LIBNAME) \ +SHOW_LIB_VERSION_ ## cfg(libname, LIBNAME) +#define SHOW_LIB_VERSION_3(cfg, libname, LIBNAME) \ +SHOW_LIB_VERSION_2(cfg, libname, LIBNAME) +#define SHOW_LIB_VERSION(libname, LIBNAME) \ +SHOW_LIB_VERSION_3(CONFIG_ ## LIBNAME, libname, LIBNAME) static void ffprobe_show_library_versions(WriterContext *w) { diff --git a/fftools/opt_common.c b/fftools/opt_common.c index 7c996f140d..5729d656e9 100644 --- a/fftools/opt_common.c +++ b/fftools/opt_common.c @@ -153,8 +153,9 @@ static int warned_cfg = 0; #define SHOW_CONFIG 4 #define SHOW_COPYRIGHT 8 -#define PRINT_LIB_INFO(libname, LIBNAME, flags, level) \ -if (CONFIG_##LIBNAME) { \ +#define PRINT_LIB_INFO_0(libname, LIBNAME, flags, level) +#define PRINT_LIB_INFO_1(libname, LIBNAME, flags, level)\ +{ \ const char *indent = flags & INDENT? " " : ""; \ if (flags & SHOW_VERSION) { \ unsigned int version = libname##_version(); \ @@ -182,6 +183,13 @@ static int warned_cfg = 0; } \ } \ +#define PRINT_LIB_INFO_2(cfg, libname, LIBNAME, flags, level) \ +PRINT_LIB_INFO_ ## cfg(libname, LIBNAME, flags, level) +#define PRINT_LIB_INFO_3(cfg, libname, LIBNAME, flags, level) \ +PRINT_LIB_INFO_2(cfg, libname, LIBNAME, flags, level) +#define PRINT_LIB_INFO(libname, LIBNAME, flags, level) \ +PRINT_LIB_INFO_3(CONFIG_ ## LIBNAME, libname, LIBNAME, flags, level) + static void print_all_libs_info(int flags, int level) { PRINT_LIB_INFO(avutil, AVUTIL, flags, level); diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index f0ef223f05..6d84fcf34f 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -1222,7 +1222,8 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt) for (i = 9; i <= RTMP_HANDSHAKE_PACKET_SIZE; i++) tosend[i] = av_lfg_get() >> 24; -if (CONFIG_FFRTMPCRYPT_PROTOCOL && rt->encrypted) { +#if CONFIG_FFRTMPCRYPT_PROTOCOL +if (rt->encrypted) { /* When the client wants to use RTMPE, we have to change the command * byte to 0x06 which means to use encrypted data and we have to set * the flash version to at least 9.0.115.0. */ @@ -1237,6 +1238,7 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt) if ((ret = ff_rtmpe_gen_pub_key(rt->stream, tosend + 1)) < 0) return ret; } +#endif client_pos = rtmp_handshake_imprint_with_digest(tosend + 1, rt->encrypted); if (client_pos < 0) @@ -1300,7 +1302,8 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt) if (ret < 0) return ret; -if (CONFIG_FFRTMPCRYPT_PROTOCOL && rt->encrypted) { +#if CONFIG_FFRTMPCRYPT_PROTOCOL +if (rt->encrypted) { /* Compute the shared secret key sent
[FFmpeg-devel] [PATCH v4 1/4] all: Replace if (ARCH_FOO) checks by #if ARCH_FOO, part 2
Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a Co-authored-by: Nirbheek Chauhan Signed-off-by: L. E. Segovia --- libavcodec/x86/fdctdsp_init.c| 2 + libavcodec/x86/flacdsp_init.c| 8 +- libavcodec/x86/hevcdsp_init.c| 547 ++- libavcodec/x86/idctdsp_init.c| 9 +- libavcodec/x86/mlpdsp_init.c | 6 +- libavcodec/x86/vc1dsp_init.c | 6 +- libavfilter/x86/colorspacedsp_init.c | 4 +- libavfilter/x86/vf_atadenoise_init.c | 6 +- libavfilter/x86/vf_ssim_init.c | 4 +- libavfilter/x86/vf_w3fdif_init.c | 4 +- 10 files changed, 311 insertions(+), 285 deletions(-) diff --git a/libavcodec/x86/fdctdsp_init.c b/libavcodec/x86/fdctdsp_init.c index 92a842433d..4a874a640d 100644 --- a/libavcodec/x86/fdctdsp_init.c +++ b/libavcodec/x86/fdctdsp_init.c @@ -31,8 +31,10 @@ av_cold void ff_fdctdsp_init_x86(FDCTDSPContext *c, AVCodecContext *avctx, if (!high_bit_depth) { if ((dct_algo == FF_DCT_AUTO || dct_algo == FF_DCT_MMX)) { +#if HAVE_INLINE_SSE2 if (INLINE_SSE2(cpu_flags)) c->fdct = ff_fdct_sse2; +#endif } } } diff --git a/libavcodec/x86/flacdsp_init.c b/libavcodec/x86/flacdsp_init.c index 87daed7005..49e67ee2b0 100644 --- a/libavcodec/x86/flacdsp_init.c +++ b/libavcodec/x86/flacdsp_init.c @@ -97,15 +97,19 @@ av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int } if (EXTERNAL_AVX(cpu_flags)) { if (fmt == AV_SAMPLE_FMT_S16) { -if (ARCH_X86_64 && channels == 8) +#if ARCH_X86_64 +if (channels == 8) c->decorrelate[0] = ff_flac_decorrelate_indep8_16_avx; +#endif } else if (fmt == AV_SAMPLE_FMT_S32) { if (channels == 4) c->decorrelate[0] = ff_flac_decorrelate_indep4_32_avx; else if (channels == 6) c->decorrelate[0] = ff_flac_decorrelate_indep6_32_avx; -else if (ARCH_X86_64 && channels == 8) +#if ARCH_X86_64 +else if (channels == 8) c->decorrelate[0] = ff_flac_decorrelate_indep8_32_avx; +#endif } } if (EXTERNAL_XOP(cpu_flags)) { diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c index 6f45e5e0db..c7060085a2 100644 --- a/libavcodec/x86/hevcdsp_init.c +++ b/libavcodec/x86/hevcdsp_init.c @@ -710,13 +710,13 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) if (EXTERNAL_SSE2(cpu_flags)) { c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_sse2; c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_sse2; -if (ARCH_X86_64) { -c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_sse2; -c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_sse2; +#if ARCH_X86_64 +c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_sse2; +c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_sse2; -c->idct[2] = ff_hevc_idct_16x16_8_sse2; -c->idct[3] = ff_hevc_idct_32x32_8_sse2; -} +c->idct[2] = ff_hevc_idct_16x16_8_sse2; +c->idct[3] = ff_hevc_idct_32x32_8_sse2; +#endif SAO_BAND_INIT(8, sse2); c->idct_dc[1] = ff_hevc_idct_8x8_dc_8_sse2; @@ -731,14 +731,14 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->add_residual[3] = ff_hevc_add_residual_32_8_sse2; } if (EXTERNAL_SSSE3(cpu_flags)) { -if(ARCH_X86_64) { -c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_ssse3; -c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_ssse3; -} +#if ARCH_X86_64 +c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_ssse3; +c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_ssse3; +#endif SAO_EDGE_INIT(8, ssse3); } -if (EXTERNAL_SSE4(cpu_flags) && ARCH_X86_64) { - +#if ARCH_X86_64 +if (EXTERNAL_SSE4(cpu_flags)) { EPEL_LINKS(c->put_hevc_epel, 0, 0, pel_pixels, 8, sse4); EPEL_LINKS(c->put_hevc_epel, 0, 1, epel_h, 8, sse4); EPEL_LINKS(c->put_hevc_epel, 1, 0, epel_v, 8, sse4); @@ -749,16 +749,17 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) QPEL_LINKS(c->put_hevc_qpel, 1, 0, qpel_v, 8, sse4); QPEL_LINKS(c->put_hevc_qpel, 1, 1, qpel_hv,8, sse4); } +#endif if (EXTERNAL_AVX(cpu_flags)) { c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_avx; c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_avx; -if (ARCH_X86_64) { -
[FFmpeg-devel] [PATCH v4 0/4] Fix MSVC build without optimizations
Updated for 6.0, any constructive feedback will be appreciated. L. E. Segovia (4): all: Replace if (ARCH_FOO) checks by #if ARCH_FOO, part 2 all: Replace if (CONFIG_FOO) checks by #if CONFIG_FOO all: Guard if (INLINE*) checks with #if HAVE_INLINE_ASM all: Guard if (EXTERNAL*) checks with #if HAVE_X86ASM fftools/ffprobe.c | 16 +- fftools/opt_common.c | 12 +- libavcodec/x86/aacencdsp_init.c| 2 + libavcodec/x86/aacpsdsp_init.c | 2 + libavcodec/x86/ac3dsp_init.c | 4 + libavcodec/x86/audiodsp_init.c | 2 + libavcodec/x86/bswapdsp_init.c | 2 + libavcodec/x86/cavsdsp.c | 2 + libavcodec/x86/celt_pvq_init.c | 2 + libavcodec/x86/cfhddsp_init.c | 2 + libavcodec/x86/cfhdencdsp_init.c | 2 + libavcodec/x86/dcadsp_init.c | 2 + libavcodec/x86/dct_init.c | 2 + libavcodec/x86/dnxhdenc_init.c | 2 + libavcodec/x86/exrdsp_init.c | 2 + libavcodec/x86/fdctdsp_init.c | 2 + libavcodec/x86/fft_init.c | 2 + libavcodec/x86/flacdsp_init.c | 8 +- libavcodec/x86/g722dsp_init.c | 2 + libavcodec/x86/h263dsp_init.c | 2 + libavcodec/x86/h264_intrapred_init.c | 2 + libavcodec/x86/h264chroma_init.c | 2 + libavcodec/x86/hevcdsp_init.c | 549 +++-- libavcodec/x86/hpeldsp_init.c | 4 + libavcodec/x86/hpeldsp_vp3_init.c | 2 + libavcodec/x86/huffyuvdsp_init.c | 2 + libavcodec/x86/huffyuvencdsp_init.c| 2 + libavcodec/x86/idctdsp_init.c | 11 +- libavcodec/x86/jpeg2000dsp_init.c | 2 + libavcodec/x86/lossless_videodsp_init.c| 2 + libavcodec/x86/lossless_videoencdsp_init.c | 2 + libavcodec/x86/me_cmp_init.c | 2 + libavcodec/x86/mlpdsp_init.c | 6 +- libavcodec/x86/mpegvideoencdsp_init.c | 2 + libavcodec/x86/opusdsp_init.c | 2 + libavcodec/x86/pixblockdsp_init.c | 2 + libavcodec/x86/pngdsp_init.c | 2 + libavcodec/x86/proresdsp_init.c| 2 + libavcodec/x86/rv34dsp_init.c | 2 + libavcodec/x86/sbcdsp_init.c | 2 + libavcodec/x86/sbrdsp_init.c | 2 + libavcodec/x86/svq1enc_init.c | 2 + libavcodec/x86/utvideodsp_init.c | 2 + libavcodec/x86/v210enc_init.c | 6 +- libavcodec/x86/vc1dsp_init.c | 6 +- libavcodec/x86/vorbisdsp_init.c| 2 + libavcodec/x86/vp3dsp_init.c | 2 + libavcodec/x86/vp6dsp_init.c | 2 + libavfilter/x86/af_afir_init.c | 2 + libavfilter/x86/af_anlmdn_init.c | 2 + libavfilter/x86/af_volume_init.c | 2 + libavfilter/x86/avf_showcqt_init.c | 2 + libavfilter/x86/colorspacedsp_init.c | 6 +- libavfilter/x86/vf_atadenoise_init.c | 8 +- libavfilter/x86/vf_blend_init.c| 2 + libavfilter/x86/vf_bwdif_init.c| 2 + libavfilter/x86/vf_convolution_init.c | 2 +- libavfilter/x86/vf_framerate_init.c| 2 + libavfilter/x86/vf_fspp_init.c | 2 + libavfilter/x86/vf_gblur_init.c| 2 + libavfilter/x86/vf_hflip_init.c| 2 + libavfilter/x86/vf_limiter_init.c | 2 + libavfilter/x86/vf_maskedclamp_init.c | 2 + libavfilter/x86/vf_maskedmerge_init.c | 2 + libavfilter/x86/vf_overlay_init.c | 2 + libavfilter/x86/vf_pp7_init.c | 2 + libavfilter/x86/vf_psnr_init.c | 2 + libavfilter/x86/vf_removegrain_init.c | 2 + libavfilter/x86/vf_ssim_init.c | 6 +- libavfilter/x86/vf_stereo3d_init.c | 2 + libavfilter/x86/vf_threshold_init.c| 2 + libavfilter/x86/vf_tinterlace_init.c | 2 + libavfilter/x86/vf_transpose_init.c| 2 + libavfilter/x86/vf_v360_init.c | 2 + libavfilter/x86/vf_w3fdif_init.c | 6 +- libavfilter/x86/vf_yadif_init.c| 2 + libavformat/rtmpproto.c| 24 +- libavutil/x86/fixed_dsp_init.c | 2 + libavutil/x86/float_dsp_init.c | 2 + libavutil/x86/imgutils_init.c | 2 + libavutil/x86/lls_init.c | 2 + libavutil/x86/pixelutils_init.c| 2 + libswresample/x86/audio_convert_init.c | 2 + libswresample/x86/resample_init.c | 6 + libswscale/x86/rgb2rgb.c | 2 + libswscale/x86/swscale.c | 2 + 86 files changed, 517 insertions(+), 301 deletions(-) -- 2.41.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https
[FFmpeg-devel] [PATCH] os_support, network: Fix build failure on Windows with BZIP2
Including winsock2.h without WIN32_LEAN_AND_MEAN causes bzlib.h to parse as nonsense, due to an instance of #define char small in rpcndr.h (included transitively from windows.h). See: https://stackoverflow.com/a/27794577 Signed-off-by: L. E. Segovia --- libavformat/network.h| 1 + libavformat/os_support.c | 6 ++ libavformat/os_support.h | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/network.h b/libavformat/network.h index ca214087fc..06b6117fc7 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -35,6 +35,7 @@ #endif #if HAVE_WINSOCK2_H +#define WIN32_LEAN_AND_MEAN #include #include diff --git a/libavformat/os_support.c b/libavformat/os_support.c index 15cea7fa5b..2de6a7c3d9 100644 --- a/libavformat/os_support.c +++ b/libavformat/os_support.c @@ -34,11 +34,9 @@ #if HAVE_SYS_TIME_H #include #endif /* HAVE_SYS_TIME_H */ -#if HAVE_WINSOCK2_H -#include -#elif HAVE_SYS_SELECT_H +#if HAVE_SYS_SELECT_H #include -#endif /* HAVE_WINSOCK2_H */ +#endif /* HAVE_SYS_SELECT_H */ #endif /* !HAVE_POLL_H */ #include "network.h" diff --git a/libavformat/os_support.h b/libavformat/os_support.h index f2ff38e23b..5bdd275d70 100644 --- a/libavformat/os_support.h +++ b/libavformat/os_support.h @@ -140,6 +140,7 @@ typedef int socklen_t; typedef unsigned long nfds_t; #if HAVE_WINSOCK2_H +#define WIN32_LEAN_AND_MEAN #include #endif #if !HAVE_STRUCT_POLLFD -- 2.41.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v3 0/5] Fix FFmpeg compilation without DCE
Hi again, Pinging again for review. I've asked for clarification about how should the EXTERNAL_ checks be dealt with, but I've not received any response here. Best, amyspark On 07/11/2022 11:48, L. E. Segovia wrote: > Ping for review. > > amyspark > > On 03/11/2022 13:36, L. E. Segovia wrote: >> Hi all, >> >> This new version is intended to make Patchwork log the set correctly. >> (My apologies there, I'm not used to send patches through the command line.) >> >> v3 changes (same as v2): >> >> - Split indentation fixes for hevcdsp_init into its own commit >> - Fixed spurious indentation in vf_ssim_init >> - Implemented the macro approach for expanding the CONFIG_FOO checks in >> fftools >> - Added the missing HAVE_X86ASM check in vc1dsp_init >> - Added a missing HAVE_INLINE_ASM check in hpeldsp_init (see below) >> - Fixed the HAVE_X86ASM check wrongly covering the INLINE_FOO clause in >> hpeldsp_init >> - Removed the duplicate HAVE_X86ASM check in me_cmp_init >> - Inlined the HAVE_X86ASM and ARCH_X86_64 checks in mlpdsp_init and >> vf_convolution_init >> >> L. E. Segovia (5): >> all: Replace if (ARCH_FOO) checks by #if ARCH_FOO, part 2 >> avcodec/x86/hevcdsp_init: Fix indentation after the ARCH_FOO changes >> all: Replace if (CONFIG_FOO) checks by #if CONFIG_FOO >> all: Guard if (INLINE*) checks with #if HAVE_INLINE_ASM >> all: Guard if (EXTERNAL*) checks with #if HAVE_X86ASM >> >> fftools/ffprobe.c | 16 +- >> fftools/opt_common.c | 12 +- >> libavcodec/x86/aacencdsp_init.c| 2 + >> libavcodec/x86/aacpsdsp_init.c | 2 + >> libavcodec/x86/ac3dsp_init.c | 4 + >> libavcodec/x86/audiodsp_init.c | 2 + >> libavcodec/x86/bswapdsp_init.c | 2 + >> libavcodec/x86/cavsdsp.c | 2 + >> libavcodec/x86/celt_pvq_init.c | 2 + >> libavcodec/x86/cfhddsp_init.c | 2 + >> libavcodec/x86/cfhdencdsp_init.c | 2 + >> libavcodec/x86/dcadsp_init.c | 2 + >> libavcodec/x86/dct_init.c | 2 + >> libavcodec/x86/dnxhdenc_init.c | 2 + >> libavcodec/x86/exrdsp_init.c | 2 + >> libavcodec/x86/fdctdsp_init.c | 2 + >> libavcodec/x86/fft_init.c | 2 + >> libavcodec/x86/flacdsp_init.c | 8 +- >> libavcodec/x86/g722dsp_init.c | 2 + >> libavcodec/x86/h263dsp_init.c | 2 + >> libavcodec/x86/h264_intrapred_init.c | 2 + >> libavcodec/x86/h264chroma_init.c | 2 + >> libavcodec/x86/hevcdsp_init.c | 549 +++-- >> libavcodec/x86/hpeldsp_init.c | 4 + >> libavcodec/x86/hpeldsp_vp3_init.c | 2 + >> libavcodec/x86/huffyuvdsp_init.c | 2 + >> libavcodec/x86/huffyuvencdsp_init.c| 2 + >> libavcodec/x86/idctdsp_init.c | 11 +- >> libavcodec/x86/jpeg2000dsp_init.c | 2 + >> libavcodec/x86/lossless_videodsp_init.c| 2 + >> libavcodec/x86/lossless_videoencdsp_init.c | 2 + >> libavcodec/x86/mdct15_init.c | 2 + >> libavcodec/x86/me_cmp_init.c | 2 + >> libavcodec/x86/mlpdsp_init.c | 6 +- >> libavcodec/x86/mpegvideoencdsp_init.c | 2 + >> libavcodec/x86/opusdsp_init.c | 2 + >> libavcodec/x86/pixblockdsp_init.c | 2 + >> libavcodec/x86/pngdsp_init.c | 2 + >> libavcodec/x86/proresdsp_init.c| 2 + >> libavcodec/x86/rv34dsp_init.c | 2 + >> libavcodec/x86/sbcdsp_init.c | 2 + >> libavcodec/x86/sbrdsp_init.c | 2 + >> libavcodec/x86/svq1enc_init.c | 2 + >> libavcodec/x86/utvideodsp_init.c | 2 + >> libavcodec/x86/v210enc_init.c | 2 + >> libavcodec/x86/vc1dsp_init.c | 6 +- >> libavcodec/x86/vorbisdsp_init.c| 2 + >> libavcodec/x86/vp3dsp_init.c | 2 + >> libavcodec/x86/vp6dsp_init.c | 2 + >> libavfilter/x86/af_afir_init.c | 2 + >> libavfilter/x86/af_anlmdn_init.c | 2 + >> libavfilter/x86/af_volume_init.c | 2 + >> libavfilter/x86/avf_showcqt_init.c | 2 + >> libavfilter/x86/colorspacedsp_init.c | 6 +- >> libavfilter/x86/vf_atadenoise_init.c | 8 +- >> liba
Re: [FFmpeg-devel] [PATCH v3 0/5] Fix FFmpeg compilation without DCE
Renewing ping. CC Andreas and Lynne since they were interested previously. amyspark On 07/11/2022 11:48, L. E. Segovia wrote: > Ping for review. > > amyspark > > On 03/11/2022 13:36, L. E. Segovia wrote: >> Hi all, >> >> This new version is intended to make Patchwork log the set correctly. >> (My apologies there, I'm not used to send patches through the command line.) >> >> v3 changes (same as v2): >> >> - Split indentation fixes for hevcdsp_init into its own commit >> - Fixed spurious indentation in vf_ssim_init >> - Implemented the macro approach for expanding the CONFIG_FOO checks in >> fftools >> - Added the missing HAVE_X86ASM check in vc1dsp_init >> - Added a missing HAVE_INLINE_ASM check in hpeldsp_init (see below) >> - Fixed the HAVE_X86ASM check wrongly covering the INLINE_FOO clause in >> hpeldsp_init >> - Removed the duplicate HAVE_X86ASM check in me_cmp_init >> - Inlined the HAVE_X86ASM and ARCH_X86_64 checks in mlpdsp_init and >> vf_convolution_init >> >> L. E. Segovia (5): >> all: Replace if (ARCH_FOO) checks by #if ARCH_FOO, part 2 >> avcodec/x86/hevcdsp_init: Fix indentation after the ARCH_FOO changes >> all: Replace if (CONFIG_FOO) checks by #if CONFIG_FOO >> all: Guard if (INLINE*) checks with #if HAVE_INLINE_ASM >> all: Guard if (EXTERNAL*) checks with #if HAVE_X86ASM >> >> fftools/ffprobe.c | 16 +- >> fftools/opt_common.c | 12 +- >> libavcodec/x86/aacencdsp_init.c| 2 + >> libavcodec/x86/aacpsdsp_init.c | 2 + >> libavcodec/x86/ac3dsp_init.c | 4 + >> libavcodec/x86/audiodsp_init.c | 2 + >> libavcodec/x86/bswapdsp_init.c | 2 + >> libavcodec/x86/cavsdsp.c | 2 + >> libavcodec/x86/celt_pvq_init.c | 2 + >> libavcodec/x86/cfhddsp_init.c | 2 + >> libavcodec/x86/cfhdencdsp_init.c | 2 + >> libavcodec/x86/dcadsp_init.c | 2 + >> libavcodec/x86/dct_init.c | 2 + >> libavcodec/x86/dnxhdenc_init.c | 2 + >> libavcodec/x86/exrdsp_init.c | 2 + >> libavcodec/x86/fdctdsp_init.c | 2 + >> libavcodec/x86/fft_init.c | 2 + >> libavcodec/x86/flacdsp_init.c | 8 +- >> libavcodec/x86/g722dsp_init.c | 2 + >> libavcodec/x86/h263dsp_init.c | 2 + >> libavcodec/x86/h264_intrapred_init.c | 2 + >> libavcodec/x86/h264chroma_init.c | 2 + >> libavcodec/x86/hevcdsp_init.c | 549 +++-- >> libavcodec/x86/hpeldsp_init.c | 4 + >> libavcodec/x86/hpeldsp_vp3_init.c | 2 + >> libavcodec/x86/huffyuvdsp_init.c | 2 + >> libavcodec/x86/huffyuvencdsp_init.c| 2 + >> libavcodec/x86/idctdsp_init.c | 11 +- >> libavcodec/x86/jpeg2000dsp_init.c | 2 + >> libavcodec/x86/lossless_videodsp_init.c| 2 + >> libavcodec/x86/lossless_videoencdsp_init.c | 2 + >> libavcodec/x86/mdct15_init.c | 2 + >> libavcodec/x86/me_cmp_init.c | 2 + >> libavcodec/x86/mlpdsp_init.c | 6 +- >> libavcodec/x86/mpegvideoencdsp_init.c | 2 + >> libavcodec/x86/opusdsp_init.c | 2 + >> libavcodec/x86/pixblockdsp_init.c | 2 + >> libavcodec/x86/pngdsp_init.c | 2 + >> libavcodec/x86/proresdsp_init.c| 2 + >> libavcodec/x86/rv34dsp_init.c | 2 + >> libavcodec/x86/sbcdsp_init.c | 2 + >> libavcodec/x86/sbrdsp_init.c | 2 + >> libavcodec/x86/svq1enc_init.c | 2 + >> libavcodec/x86/utvideodsp_init.c | 2 + >> libavcodec/x86/v210enc_init.c | 2 + >> libavcodec/x86/vc1dsp_init.c | 6 +- >> libavcodec/x86/vorbisdsp_init.c| 2 + >> libavcodec/x86/vp3dsp_init.c | 2 + >> libavcodec/x86/vp6dsp_init.c | 2 + >> libavfilter/x86/af_afir_init.c | 2 + >> libavfilter/x86/af_anlmdn_init.c | 2 + >> libavfilter/x86/af_volume_init.c | 2 + >> libavfilter/x86/avf_showcqt_init.c | 2 + >> libavfilter/x86/colorspacedsp_init.c | 6 +- >> libavfilter/x86/vf_atadenoise_init.c | 8 +- >> libavfilter/x86/vf_blend_init.c| 2 + >> libavfilter/x86/vf_bwdif_init.c
Re: [FFmpeg-devel] [PATCH v2 5/5] all: Guard if (EXTERNAL*) checks with #if HAVE_X86ASM
Hi, I preferred to check instead for HAVE_X86ASM, as those checks would only hit on either a missing or crippled NASM. Moreover, the EXTERNAL_ macros do both the HAVE__EXTERNAL and the runtime CPU flag check. The former of which would become redundant and duplicated with your suggestion. Should I move forward anyway with it? On 03/11/2022 12:55, dev at lynne.ee (Lynne) wrote: > Nov 3, 2022, 16:30 by amy at amyspark.me: > >> Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a >> >> Signed-off-by: L. E. Segovia <> amy at amyspark.me> > >> > > Wrong way to fix it. Makefile to prevent compilation + ifdef guards > on all arch-specific init function calls. > -- amyspark https://www.amyspark.me ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v3 0/5] Fix FFmpeg compilation without DCE
Ping for review. amyspark On 03/11/2022 13:36, L. E. Segovia wrote: > Hi all, > > This new version is intended to make Patchwork log the set correctly. > (My apologies there, I'm not used to send patches through the command line.) > > v3 changes (same as v2): > > - Split indentation fixes for hevcdsp_init into its own commit > - Fixed spurious indentation in vf_ssim_init > - Implemented the macro approach for expanding the CONFIG_FOO checks in > fftools > - Added the missing HAVE_X86ASM check in vc1dsp_init > - Added a missing HAVE_INLINE_ASM check in hpeldsp_init (see below) > - Fixed the HAVE_X86ASM check wrongly covering the INLINE_FOO clause in > hpeldsp_init > - Removed the duplicate HAVE_X86ASM check in me_cmp_init > - Inlined the HAVE_X86ASM and ARCH_X86_64 checks in mlpdsp_init and > vf_convolution_init > > L. E. Segovia (5): > all: Replace if (ARCH_FOO) checks by #if ARCH_FOO, part 2 > avcodec/x86/hevcdsp_init: Fix indentation after the ARCH_FOO changes > all: Replace if (CONFIG_FOO) checks by #if CONFIG_FOO > all: Guard if (INLINE*) checks with #if HAVE_INLINE_ASM > all: Guard if (EXTERNAL*) checks with #if HAVE_X86ASM > > fftools/ffprobe.c | 16 +- > fftools/opt_common.c | 12 +- > libavcodec/x86/aacencdsp_init.c| 2 + > libavcodec/x86/aacpsdsp_init.c | 2 + > libavcodec/x86/ac3dsp_init.c | 4 + > libavcodec/x86/audiodsp_init.c | 2 + > libavcodec/x86/bswapdsp_init.c | 2 + > libavcodec/x86/cavsdsp.c | 2 + > libavcodec/x86/celt_pvq_init.c | 2 + > libavcodec/x86/cfhddsp_init.c | 2 + > libavcodec/x86/cfhdencdsp_init.c | 2 + > libavcodec/x86/dcadsp_init.c | 2 + > libavcodec/x86/dct_init.c | 2 + > libavcodec/x86/dnxhdenc_init.c | 2 + > libavcodec/x86/exrdsp_init.c | 2 + > libavcodec/x86/fdctdsp_init.c | 2 + > libavcodec/x86/fft_init.c | 2 + > libavcodec/x86/flacdsp_init.c | 8 +- > libavcodec/x86/g722dsp_init.c | 2 + > libavcodec/x86/h263dsp_init.c | 2 + > libavcodec/x86/h264_intrapred_init.c | 2 + > libavcodec/x86/h264chroma_init.c | 2 + > libavcodec/x86/hevcdsp_init.c | 549 +++-- > libavcodec/x86/hpeldsp_init.c | 4 + > libavcodec/x86/hpeldsp_vp3_init.c | 2 + > libavcodec/x86/huffyuvdsp_init.c | 2 + > libavcodec/x86/huffyuvencdsp_init.c| 2 + > libavcodec/x86/idctdsp_init.c | 11 +- > libavcodec/x86/jpeg2000dsp_init.c | 2 + > libavcodec/x86/lossless_videodsp_init.c| 2 + > libavcodec/x86/lossless_videoencdsp_init.c | 2 + > libavcodec/x86/mdct15_init.c | 2 + > libavcodec/x86/me_cmp_init.c | 2 + > libavcodec/x86/mlpdsp_init.c | 6 +- > libavcodec/x86/mpegvideoencdsp_init.c | 2 + > libavcodec/x86/opusdsp_init.c | 2 + > libavcodec/x86/pixblockdsp_init.c | 2 + > libavcodec/x86/pngdsp_init.c | 2 + > libavcodec/x86/proresdsp_init.c| 2 + > libavcodec/x86/rv34dsp_init.c | 2 + > libavcodec/x86/sbcdsp_init.c | 2 + > libavcodec/x86/sbrdsp_init.c | 2 + > libavcodec/x86/svq1enc_init.c | 2 + > libavcodec/x86/utvideodsp_init.c | 2 + > libavcodec/x86/v210enc_init.c | 2 + > libavcodec/x86/vc1dsp_init.c | 6 +- > libavcodec/x86/vorbisdsp_init.c| 2 + > libavcodec/x86/vp3dsp_init.c | 2 + > libavcodec/x86/vp6dsp_init.c | 2 + > libavfilter/x86/af_afir_init.c | 2 + > libavfilter/x86/af_anlmdn_init.c | 2 + > libavfilter/x86/af_volume_init.c | 2 + > libavfilter/x86/avf_showcqt_init.c | 2 + > libavfilter/x86/colorspacedsp_init.c | 6 +- > libavfilter/x86/vf_atadenoise_init.c | 8 +- > libavfilter/x86/vf_blend_init.c| 2 + > libavfilter/x86/vf_bwdif_init.c| 2 + > libavfilter/x86/vf_convolution_init.c | 2 +- > libavfilter/x86/vf_framerate_init.c| 2 + > libavfilter/x86/vf_fspp_init.c | 2 + > libavfilter/x86/vf_gblur_init.c| 2 + > libavfilter/x86/vf_hflip_init.c| 2 + > libavfilter/x86/vf_limiter_init.c | 2 + > libavfilter/x86/vf_maskedclamp_init.c | 2 + > libavfilter/x86/vf_maskedmerge_init.c | 2 + > libavfilte
[FFmpeg-devel] [PATCH v3 4/5] all: Guard if (INLINE*) checks with #if HAVE_INLINE_ASM
Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a Signed-off-by: L. E. Segovia --- libavcodec/x86/hpeldsp_init.c | 2 ++ libavcodec/x86/vc1dsp_init.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/x86/hpeldsp_init.c b/libavcodec/x86/hpeldsp_init.c index 09c48c341e..6bde5a3893 100644 --- a/libavcodec/x86/hpeldsp_init.c +++ b/libavcodec/x86/hpeldsp_init.c @@ -224,8 +224,10 @@ av_cold void ff_hpeldsp_init_x86(HpelDSPContext *c, int flags) { int cpu_flags = av_get_cpu_flags(); +#if HAVE_INLINE_ASM if (INLINE_MMX(cpu_flags)) hpeldsp_init_mmx(c, flags); +#endif if (EXTERNAL_MMXEXT(cpu_flags)) hpeldsp_init_mmxext(c, flags); diff --git a/libavcodec/x86/vc1dsp_init.c b/libavcodec/x86/vc1dsp_init.c index bc63933e83..65fc28ea35 100644 --- a/libavcodec/x86/vc1dsp_init.c +++ b/libavcodec/x86/vc1dsp_init.c @@ -102,7 +102,7 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp) { int cpu_flags = av_get_cpu_flags(); -#if HAVE_6REGS +#if HAVE_6REGS && HAVE_INLINE_ASM if (INLINE_MMX(cpu_flags)) if (EXTERNAL_MMX(cpu_flags)) ff_vc1dsp_init_mmx(dsp); -- 2.38.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v3 5/5] all: Guard if (EXTERNAL*) checks with #if HAVE_X86ASM
Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a Signed-off-by: L. E. Segovia --- libavcodec/x86/aacencdsp_init.c| 2 ++ libavcodec/x86/aacpsdsp_init.c | 2 ++ libavcodec/x86/ac3dsp_init.c | 4 libavcodec/x86/audiodsp_init.c | 2 ++ libavcodec/x86/bswapdsp_init.c | 2 ++ libavcodec/x86/cavsdsp.c | 2 ++ libavcodec/x86/celt_pvq_init.c | 2 ++ libavcodec/x86/cfhddsp_init.c | 2 ++ libavcodec/x86/cfhdencdsp_init.c | 2 ++ libavcodec/x86/dcadsp_init.c | 2 ++ libavcodec/x86/dct_init.c | 2 ++ libavcodec/x86/dnxhdenc_init.c | 2 ++ libavcodec/x86/exrdsp_init.c | 2 ++ libavcodec/x86/fft_init.c | 2 ++ libavcodec/x86/g722dsp_init.c | 2 ++ libavcodec/x86/h263dsp_init.c | 2 ++ libavcodec/x86/h264_intrapred_init.c | 2 ++ libavcodec/x86/h264chroma_init.c | 2 ++ libavcodec/x86/hevcdsp_init.c | 2 ++ libavcodec/x86/hpeldsp_init.c | 2 ++ libavcodec/x86/hpeldsp_vp3_init.c | 2 ++ libavcodec/x86/huffyuvdsp_init.c | 2 ++ libavcodec/x86/huffyuvencdsp_init.c| 2 ++ libavcodec/x86/idctdsp_init.c | 2 ++ libavcodec/x86/jpeg2000dsp_init.c | 2 ++ libavcodec/x86/lossless_videodsp_init.c| 2 ++ libavcodec/x86/lossless_videoencdsp_init.c | 2 ++ libavcodec/x86/mdct15_init.c | 2 ++ libavcodec/x86/me_cmp_init.c | 2 ++ libavcodec/x86/mlpdsp_init.c | 2 +- libavcodec/x86/mpegvideoencdsp_init.c | 2 ++ libavcodec/x86/opusdsp_init.c | 2 ++ libavcodec/x86/pixblockdsp_init.c | 2 ++ libavcodec/x86/pngdsp_init.c | 2 ++ libavcodec/x86/proresdsp_init.c| 2 ++ libavcodec/x86/rv34dsp_init.c | 2 ++ libavcodec/x86/sbcdsp_init.c | 2 ++ libavcodec/x86/sbrdsp_init.c | 2 ++ libavcodec/x86/svq1enc_init.c | 2 ++ libavcodec/x86/utvideodsp_init.c | 2 ++ libavcodec/x86/v210enc_init.c | 2 ++ libavcodec/x86/vc1dsp_init.c | 2 +- libavcodec/x86/vorbisdsp_init.c| 2 ++ libavcodec/x86/vp3dsp_init.c | 2 ++ libavcodec/x86/vp6dsp_init.c | 2 ++ libavfilter/x86/af_afir_init.c | 2 ++ libavfilter/x86/af_anlmdn_init.c | 2 ++ libavfilter/x86/af_volume_init.c | 2 ++ libavfilter/x86/avf_showcqt_init.c | 2 ++ libavfilter/x86/colorspacedsp_init.c | 2 ++ libavfilter/x86/vf_atadenoise_init.c | 2 ++ libavfilter/x86/vf_blend_init.c| 2 ++ libavfilter/x86/vf_bwdif_init.c| 2 ++ libavfilter/x86/vf_convolution_init.c | 2 +- libavfilter/x86/vf_framerate_init.c| 2 ++ libavfilter/x86/vf_fspp_init.c | 2 ++ libavfilter/x86/vf_gblur_init.c| 2 ++ libavfilter/x86/vf_hflip_init.c| 2 ++ libavfilter/x86/vf_limiter_init.c | 2 ++ libavfilter/x86/vf_maskedclamp_init.c | 2 ++ libavfilter/x86/vf_maskedmerge_init.c | 2 ++ libavfilter/x86/vf_overlay_init.c | 2 ++ libavfilter/x86/vf_pp7_init.c | 2 ++ libavfilter/x86/vf_psnr_init.c | 2 ++ libavfilter/x86/vf_removegrain_init.c | 2 ++ libavfilter/x86/vf_ssim_init.c | 2 ++ libavfilter/x86/vf_stereo3d_init.c | 2 ++ libavfilter/x86/vf_threshold_init.c| 2 ++ libavfilter/x86/vf_tinterlace_init.c | 2 ++ libavfilter/x86/vf_transpose_init.c| 2 ++ libavfilter/x86/vf_v360_init.c | 2 ++ libavfilter/x86/vf_w3fdif_init.c | 2 ++ libavfilter/x86/vf_yadif_init.c| 2 ++ libavutil/x86/fixed_dsp_init.c | 2 ++ libavutil/x86/float_dsp_init.c | 2 ++ libavutil/x86/imgutils_init.c | 2 ++ libavutil/x86/lls_init.c | 2 ++ libavutil/x86/pixelutils_init.c| 2 ++ libswresample/x86/audio_convert_init.c | 2 ++ libswresample/x86/resample_init.c | 6 ++ libswscale/x86/rgb2rgb.c | 2 ++ libswscale/x86/swscale.c | 2 ++ 82 files changed, 167 insertions(+), 3 deletions(-) diff --git a/libavcodec/x86/aacencdsp_init.c b/libavcodec/x86/aacencdsp_init.c index 049a2417d9..7dca1d481b 100644 --- a/libavcodec/x86/aacencdsp_init.c +++ b/libavcodec/x86/aacencdsp_init.c @@ -34,6 +34,7 @@ void ff_aac_quantize_bands_sse2(int *out, const float *in, const float *scaled, av_cold void ff_aac_dsp_init_x86(AACEncContext *s) { +#if HAVE_X86ASM int cpu_flags = av_get_cpu_flags(); if (EXTERNAL_SSE(cpu_flags)) @@ -41,4 +42,5 @@ av_cold void ff_aac_dsp_init_x86(AACEncContext *s) if (EXTERNAL_SSE2(cpu_flags)) s->quant_bands = ff_aac_quantize_bands_sse2; +#endif /* HAVE_X86ASM */ } diff --git a/libavcodec/
[FFmpeg-devel] [PATCH v3 3/5] all: Replace if (CONFIG_FOO) checks by #if CONFIG_FOO
Continuation of e42aaaf92a4b0c88d60acc12df64c81d0887c26f Signed-off-by: L. E. Segovia --- fftools/ffprobe.c | 16 +++- fftools/opt_common.c| 12 ++-- libavformat/rtmpproto.c | 24 ++-- 3 files changed, 39 insertions(+), 13 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 9b7e82fd8c..b878e258ca 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -3518,9 +3518,9 @@ static void ffprobe_show_program_version(WriterContext *w) av_bprint_finalize(, NULL); } -#define SHOW_LIB_VERSION(libname, LIBNAME) \ -do {\ -if (CONFIG_##LIBNAME) { \ +#define SHOW_LIB_VERSION_0(libname, LIBNAME) +#define SHOW_LIB_VERSION_1(libname, LIBNAME)\ +{ \ unsigned int version = libname##_version(); \ writer_print_section_header(w, SECTION_ID_LIBRARY_VERSION); \ print_str("name","lib" #libname); \ @@ -3530,8 +3530,14 @@ static void ffprobe_show_program_version(WriterContext *w) print_int("version", version); \ print_str("ident", LIB##LIBNAME##_IDENT); \ writer_print_section_footer(w); \ -} \ -} while (0) +} + +#define SHOW_LIB_VERSION_2(cfg, libname, LIBNAME) \ +SHOW_LIB_VERSION_ ## cfg(libname, LIBNAME) +#define SHOW_LIB_VERSION_3(cfg, libname, LIBNAME) \ +SHOW_LIB_VERSION_2(cfg, libname, LIBNAME) +#define SHOW_LIB_VERSION(libname, LIBNAME) \ +SHOW_LIB_VERSION_3(CONFIG_ ## LIBNAME, libname, LIBNAME) static void ffprobe_show_library_versions(WriterContext *w) { diff --git a/fftools/opt_common.c b/fftools/opt_common.c index 8a06df82df..f901dba806 100644 --- a/fftools/opt_common.c +++ b/fftools/opt_common.c @@ -153,8 +153,9 @@ static int warned_cfg = 0; #define SHOW_CONFIG 4 #define SHOW_COPYRIGHT 8 -#define PRINT_LIB_INFO(libname, LIBNAME, flags, level) \ -if (CONFIG_##LIBNAME) { \ +#define PRINT_LIB_INFO_0(libname, LIBNAME, flags, level) +#define PRINT_LIB_INFO_1(libname, LIBNAME, flags, level)\ +{ \ const char *indent = flags & INDENT? " " : ""; \ if (flags & SHOW_VERSION) { \ unsigned int version = libname##_version(); \ @@ -182,6 +183,13 @@ static int warned_cfg = 0; } \ } \ +#define PRINT_LIB_INFO_2(cfg, libname, LIBNAME, flags, level) \ +PRINT_LIB_INFO_ ## cfg(libname, LIBNAME, flags, level) +#define PRINT_LIB_INFO_3(cfg, libname, LIBNAME, flags, level) \ +PRINT_LIB_INFO_2(cfg, libname, LIBNAME, flags, level) +#define PRINT_LIB_INFO(libname, LIBNAME, flags, level) \ +PRINT_LIB_INFO_3(CONFIG_ ## LIBNAME, libname, LIBNAME, flags, level) + static void print_all_libs_info(int flags, int level) { PRINT_LIB_INFO(avutil, AVUTIL, flags, level); diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index f0ef223f05..6d84fcf34f 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -1222,7 +1222,8 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt) for (i = 9; i <= RTMP_HANDSHAKE_PACKET_SIZE; i++) tosend[i] = av_lfg_get() >> 24; -if (CONFIG_FFRTMPCRYPT_PROTOCOL && rt->encrypted) { +#if CONFIG_FFRTMPCRYPT_PROTOCOL +if (rt->encrypted) { /* When the client wants to use RTMPE, we have to change the command * byte to 0x06 which means to use encrypted data and we have to set * the flash version to at least 9.0.115.0. */ @@ -1237,6 +1238,7 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt) if ((ret = ff_rtmpe_gen_pub_key(rt->stream, tosend + 1)) < 0) return ret; } +#endif client_pos = rtmp_handshake_imprint_with_digest(tosend + 1, rt->encrypted); if (client_pos < 0) @@ -1300,7 +1302,8 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt) if (ret < 0) return ret; -if (CONFIG_FFRTMPCRYPT_PROTOCOL && rt->encrypted) { +#if CONFIG_FFRTMPCRYPT_PROTOCOL +if (rt->encrypted) { /* Comp
[FFmpeg-devel] [PATCH v3 2/5] avcodec/x86/hevcdsp_init: Fix indentation after the ARCH_FOO changes
--- libavcodec/x86/hevcdsp_init.c | 454 +- 1 file changed, 227 insertions(+), 227 deletions(-) diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c index 40a295430d..c7060085a2 100644 --- a/libavcodec/x86/hevcdsp_init.c +++ b/libavcodec/x86/hevcdsp_init.c @@ -711,11 +711,11 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_sse2; c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_sse2; #if ARCH_X86_64 -c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_sse2; -c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_sse2; +c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_sse2; +c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_sse2; -c->idct[2] = ff_hevc_idct_16x16_8_sse2; -c->idct[3] = ff_hevc_idct_32x32_8_sse2; +c->idct[2] = ff_hevc_idct_16x16_8_sse2; +c->idct[3] = ff_hevc_idct_32x32_8_sse2; #endif SAO_BAND_INIT(8, sse2); @@ -732,8 +732,8 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) } if (EXTERNAL_SSSE3(cpu_flags)) { #if ARCH_X86_64 -c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_ssse3; -c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_ssse3; +c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_ssse3; +c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_ssse3; #endif SAO_EDGE_INIT(8, ssse3); } @@ -754,11 +754,11 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_avx; c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_avx; #if ARCH_X86_64 -c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_avx; -c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_avx; +c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_avx; +c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_avx; -c->idct[2] = ff_hevc_idct_16x16_8_avx; -c->idct[3] = ff_hevc_idct_32x32_8_avx; +c->idct[2] = ff_hevc_idct_16x16_8_avx; +c->idct[3] = ff_hevc_idct_32x32_8_avx; #endif SAO_BAND_INIT(8, avx); @@ -777,89 +777,89 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->idct_dc[2] = ff_hevc_idct_16x16_dc_8_avx2; c->idct_dc[3] = ff_hevc_idct_32x32_dc_8_avx2; #if ARCH_X86_64 -c->put_hevc_epel[7][0][0] = ff_hevc_put_hevc_pel_pixels32_8_avx2; -c->put_hevc_epel[8][0][0] = ff_hevc_put_hevc_pel_pixels48_8_avx2; -c->put_hevc_epel[9][0][0] = ff_hevc_put_hevc_pel_pixels64_8_avx2; +c->put_hevc_epel[7][0][0] = ff_hevc_put_hevc_pel_pixels32_8_avx2; +c->put_hevc_epel[8][0][0] = ff_hevc_put_hevc_pel_pixels48_8_avx2; +c->put_hevc_epel[9][0][0] = ff_hevc_put_hevc_pel_pixels64_8_avx2; -c->put_hevc_qpel[7][0][0] = ff_hevc_put_hevc_pel_pixels32_8_avx2; -c->put_hevc_qpel[8][0][0] = ff_hevc_put_hevc_pel_pixels48_8_avx2; -c->put_hevc_qpel[9][0][0] = ff_hevc_put_hevc_pel_pixels64_8_avx2; +c->put_hevc_qpel[7][0][0] = ff_hevc_put_hevc_pel_pixels32_8_avx2; +c->put_hevc_qpel[8][0][0] = ff_hevc_put_hevc_pel_pixels48_8_avx2; +c->put_hevc_qpel[9][0][0] = ff_hevc_put_hevc_pel_pixels64_8_avx2; -c->put_hevc_epel_uni[7][0][0] = ff_hevc_put_hevc_uni_pel_pixels32_8_avx2; -c->put_hevc_epel_uni[8][0][0] = ff_hevc_put_hevc_uni_pel_pixels48_8_avx2; -c->put_hevc_epel_uni[9][0][0] = ff_hevc_put_hevc_uni_pel_pixels64_8_avx2; +c->put_hevc_epel_uni[7][0][0] = ff_hevc_put_hevc_uni_pel_pixels32_8_avx2; +c->put_hevc_epel_uni[8][0][0] = ff_hevc_put_hevc_uni_pel_pixels48_8_avx2; +c->put_hevc_epel_uni[9][0][0] = ff_hevc_put_hevc_uni_pel_pixels64_8_avx2; -c->put_hevc_qpel_uni[7][0][0] = ff_hevc_put_hevc_uni_pel_pixels32_8_avx2; -c->put_hevc_qpel_uni[8][0][0] = ff_hevc_put_hevc_uni_pel_pixels48_8_avx2; -c->put_hevc_qpel_uni[9][0][0] = ff_hevc_put_hevc_uni_pel_pixels64_8_avx2; +c->put_hevc_qpel_uni[7][0][0] = ff_hevc_put_hevc_uni_pel_pixels32_8_avx2; +c->put_hevc_qpel_uni[8][0][0] = ff_hevc_put_hevc_uni_pel_pixels48_8_avx2; +c->put_hevc_qpel_uni[9][0][0] = ff_hevc_put_hevc_uni_pel_pixels64_8_avx2; -c->put_hevc_qpel_bi[7][0][0] = ff_hevc_put_hevc_bi_pel_pixels32_8_avx2; -c->put_hevc_qpel_bi[8][0][0] =
[FFmpeg-devel] [PATCH v3 1/5] all: Replace if (ARCH_FOO) checks by #if ARCH_FOO, part 2
Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a Co-authored-by: Nirbheek Chauhan Signed-off-by: L. E. Segovia --- libavcodec/x86/fdctdsp_init.c| 2 ++ libavcodec/x86/flacdsp_init.c| 8 +++-- libavcodec/x86/hevcdsp_init.c| 53 +++- libavcodec/x86/idctdsp_init.c| 9 +++-- libavcodec/x86/mlpdsp_init.c | 6 ++-- libavcodec/x86/vc1dsp_init.c | 6 ++-- libavfilter/x86/colorspacedsp_init.c | 4 ++- libavfilter/x86/vf_atadenoise_init.c | 6 ++-- libavfilter/x86/vf_ssim_init.c | 4 ++- libavfilter/x86/vf_w3fdif_init.c | 4 ++- 10 files changed, 64 insertions(+), 38 deletions(-) diff --git a/libavcodec/x86/fdctdsp_init.c b/libavcodec/x86/fdctdsp_init.c index 92a842433d..4a874a640d 100644 --- a/libavcodec/x86/fdctdsp_init.c +++ b/libavcodec/x86/fdctdsp_init.c @@ -31,8 +31,10 @@ av_cold void ff_fdctdsp_init_x86(FDCTDSPContext *c, AVCodecContext *avctx, if (!high_bit_depth) { if ((dct_algo == FF_DCT_AUTO || dct_algo == FF_DCT_MMX)) { +#if HAVE_INLINE_SSE2 if (INLINE_SSE2(cpu_flags)) c->fdct = ff_fdct_sse2; +#endif } } } diff --git a/libavcodec/x86/flacdsp_init.c b/libavcodec/x86/flacdsp_init.c index 87daed7005..49e67ee2b0 100644 --- a/libavcodec/x86/flacdsp_init.c +++ b/libavcodec/x86/flacdsp_init.c @@ -97,15 +97,19 @@ av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int } if (EXTERNAL_AVX(cpu_flags)) { if (fmt == AV_SAMPLE_FMT_S16) { -if (ARCH_X86_64 && channels == 8) +#if ARCH_X86_64 +if (channels == 8) c->decorrelate[0] = ff_flac_decorrelate_indep8_16_avx; +#endif } else if (fmt == AV_SAMPLE_FMT_S32) { if (channels == 4) c->decorrelate[0] = ff_flac_decorrelate_indep4_32_avx; else if (channels == 6) c->decorrelate[0] = ff_flac_decorrelate_indep6_32_avx; -else if (ARCH_X86_64 && channels == 8) +#if ARCH_X86_64 +else if (channels == 8) c->decorrelate[0] = ff_flac_decorrelate_indep8_32_avx; +#endif } } if (EXTERNAL_XOP(cpu_flags)) { diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c index 6f45e5e0db..40a295430d 100644 --- a/libavcodec/x86/hevcdsp_init.c +++ b/libavcodec/x86/hevcdsp_init.c @@ -710,13 +710,13 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) if (EXTERNAL_SSE2(cpu_flags)) { c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_sse2; c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_sse2; -if (ARCH_X86_64) { +#if ARCH_X86_64 c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_sse2; c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_sse2; c->idct[2] = ff_hevc_idct_16x16_8_sse2; c->idct[3] = ff_hevc_idct_32x32_8_sse2; -} +#endif SAO_BAND_INIT(8, sse2); c->idct_dc[1] = ff_hevc_idct_8x8_dc_8_sse2; @@ -731,14 +731,14 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->add_residual[3] = ff_hevc_add_residual_32_8_sse2; } if (EXTERNAL_SSSE3(cpu_flags)) { -if(ARCH_X86_64) { +#if ARCH_X86_64 c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_ssse3; c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_ssse3; -} +#endif SAO_EDGE_INIT(8, ssse3); } -if (EXTERNAL_SSE4(cpu_flags) && ARCH_X86_64) { - +#if ARCH_X86_64 +if (EXTERNAL_SSE4(cpu_flags)) { EPEL_LINKS(c->put_hevc_epel, 0, 0, pel_pixels, 8, sse4); EPEL_LINKS(c->put_hevc_epel, 0, 1, epel_h, 8, sse4); EPEL_LINKS(c->put_hevc_epel, 1, 0, epel_v, 8, sse4); @@ -749,16 +749,17 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) QPEL_LINKS(c->put_hevc_qpel, 1, 0, qpel_v, 8, sse4); QPEL_LINKS(c->put_hevc_qpel, 1, 1, qpel_hv,8, sse4); } +#endif if (EXTERNAL_AVX(cpu_flags)) { c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_avx; c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_avx; -if (ARCH_X86_64) { +#if ARCH_X86_64 c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_avx; c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_avx; c->idct[2] = ff_hevc_idct_16x16_8_avx; c->idct[3] = ff_hevc_idct_32x32_8_avx; -} +#endif SAO_BAND_INIT(8, avx); c->idct[0] = ff_hevc_idct_4x4_8_avx; @@ -775,7 +776,7 @@ voi
[FFmpeg-devel] [PATCH v3 0/5] Fix FFmpeg compilation without DCE
Hi all, This new version is intended to make Patchwork log the set correctly. (My apologies there, I'm not used to send patches through the command line.) v3 changes (same as v2): - Split indentation fixes for hevcdsp_init into its own commit - Fixed spurious indentation in vf_ssim_init - Implemented the macro approach for expanding the CONFIG_FOO checks in fftools - Added the missing HAVE_X86ASM check in vc1dsp_init - Added a missing HAVE_INLINE_ASM check in hpeldsp_init (see below) - Fixed the HAVE_X86ASM check wrongly covering the INLINE_FOO clause in hpeldsp_init - Removed the duplicate HAVE_X86ASM check in me_cmp_init - Inlined the HAVE_X86ASM and ARCH_X86_64 checks in mlpdsp_init and vf_convolution_init L. E. Segovia (5): all: Replace if (ARCH_FOO) checks by #if ARCH_FOO, part 2 avcodec/x86/hevcdsp_init: Fix indentation after the ARCH_FOO changes all: Replace if (CONFIG_FOO) checks by #if CONFIG_FOO all: Guard if (INLINE*) checks with #if HAVE_INLINE_ASM all: Guard if (EXTERNAL*) checks with #if HAVE_X86ASM fftools/ffprobe.c | 16 +- fftools/opt_common.c | 12 +- libavcodec/x86/aacencdsp_init.c| 2 + libavcodec/x86/aacpsdsp_init.c | 2 + libavcodec/x86/ac3dsp_init.c | 4 + libavcodec/x86/audiodsp_init.c | 2 + libavcodec/x86/bswapdsp_init.c | 2 + libavcodec/x86/cavsdsp.c | 2 + libavcodec/x86/celt_pvq_init.c | 2 + libavcodec/x86/cfhddsp_init.c | 2 + libavcodec/x86/cfhdencdsp_init.c | 2 + libavcodec/x86/dcadsp_init.c | 2 + libavcodec/x86/dct_init.c | 2 + libavcodec/x86/dnxhdenc_init.c | 2 + libavcodec/x86/exrdsp_init.c | 2 + libavcodec/x86/fdctdsp_init.c | 2 + libavcodec/x86/fft_init.c | 2 + libavcodec/x86/flacdsp_init.c | 8 +- libavcodec/x86/g722dsp_init.c | 2 + libavcodec/x86/h263dsp_init.c | 2 + libavcodec/x86/h264_intrapred_init.c | 2 + libavcodec/x86/h264chroma_init.c | 2 + libavcodec/x86/hevcdsp_init.c | 549 +++-- libavcodec/x86/hpeldsp_init.c | 4 + libavcodec/x86/hpeldsp_vp3_init.c | 2 + libavcodec/x86/huffyuvdsp_init.c | 2 + libavcodec/x86/huffyuvencdsp_init.c| 2 + libavcodec/x86/idctdsp_init.c | 11 +- libavcodec/x86/jpeg2000dsp_init.c | 2 + libavcodec/x86/lossless_videodsp_init.c| 2 + libavcodec/x86/lossless_videoencdsp_init.c | 2 + libavcodec/x86/mdct15_init.c | 2 + libavcodec/x86/me_cmp_init.c | 2 + libavcodec/x86/mlpdsp_init.c | 6 +- libavcodec/x86/mpegvideoencdsp_init.c | 2 + libavcodec/x86/opusdsp_init.c | 2 + libavcodec/x86/pixblockdsp_init.c | 2 + libavcodec/x86/pngdsp_init.c | 2 + libavcodec/x86/proresdsp_init.c| 2 + libavcodec/x86/rv34dsp_init.c | 2 + libavcodec/x86/sbcdsp_init.c | 2 + libavcodec/x86/sbrdsp_init.c | 2 + libavcodec/x86/svq1enc_init.c | 2 + libavcodec/x86/utvideodsp_init.c | 2 + libavcodec/x86/v210enc_init.c | 2 + libavcodec/x86/vc1dsp_init.c | 6 +- libavcodec/x86/vorbisdsp_init.c| 2 + libavcodec/x86/vp3dsp_init.c | 2 + libavcodec/x86/vp6dsp_init.c | 2 + libavfilter/x86/af_afir_init.c | 2 + libavfilter/x86/af_anlmdn_init.c | 2 + libavfilter/x86/af_volume_init.c | 2 + libavfilter/x86/avf_showcqt_init.c | 2 + libavfilter/x86/colorspacedsp_init.c | 6 +- libavfilter/x86/vf_atadenoise_init.c | 8 +- libavfilter/x86/vf_blend_init.c| 2 + libavfilter/x86/vf_bwdif_init.c| 2 + libavfilter/x86/vf_convolution_init.c | 2 +- libavfilter/x86/vf_framerate_init.c| 2 + libavfilter/x86/vf_fspp_init.c | 2 + libavfilter/x86/vf_gblur_init.c| 2 + libavfilter/x86/vf_hflip_init.c| 2 + libavfilter/x86/vf_limiter_init.c | 2 + libavfilter/x86/vf_maskedclamp_init.c | 2 + libavfilter/x86/vf_maskedmerge_init.c | 2 + libavfilter/x86/vf_overlay_init.c | 2 + libavfilter/x86/vf_pp7_init.c | 2 + libavfilter/x86/vf_psnr_init.c | 2 + libavfilter/x86/vf_removegrain_init.c | 2 + libavfilter/x86/vf_ssim_init.c | 6 +- libavfilter/x86/vf_stereo3d_init.c | 2 + libavfilter/x86/vf_threshold_init.c| 2 + libavfilter/x86/vf_tinterlace_init.c | 2 + libavfilter/x86/vf_transpose_init.c| 2 + libavfilter/x86/vf_v360_init.c | 2 + libavfilter/x86
[FFmpeg-devel] [PATCH v2 5/5] all: Guard if (EXTERNAL*) checks with #if HAVE_X86ASM
Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a Signed-off-by: L. E. Segovia --- libavcodec/x86/aacencdsp_init.c| 2 ++ libavcodec/x86/aacpsdsp_init.c | 2 ++ libavcodec/x86/ac3dsp_init.c | 4 libavcodec/x86/audiodsp_init.c | 2 ++ libavcodec/x86/bswapdsp_init.c | 2 ++ libavcodec/x86/cavsdsp.c | 2 ++ libavcodec/x86/celt_pvq_init.c | 2 ++ libavcodec/x86/cfhddsp_init.c | 2 ++ libavcodec/x86/cfhdencdsp_init.c | 2 ++ libavcodec/x86/dcadsp_init.c | 2 ++ libavcodec/x86/dct_init.c | 2 ++ libavcodec/x86/dnxhdenc_init.c | 2 ++ libavcodec/x86/exrdsp_init.c | 2 ++ libavcodec/x86/fft_init.c | 2 ++ libavcodec/x86/g722dsp_init.c | 2 ++ libavcodec/x86/h263dsp_init.c | 2 ++ libavcodec/x86/h264_intrapred_init.c | 2 ++ libavcodec/x86/h264chroma_init.c | 2 ++ libavcodec/x86/hevcdsp_init.c | 2 ++ libavcodec/x86/hpeldsp_init.c | 2 ++ libavcodec/x86/hpeldsp_vp3_init.c | 2 ++ libavcodec/x86/huffyuvdsp_init.c | 2 ++ libavcodec/x86/huffyuvencdsp_init.c| 2 ++ libavcodec/x86/idctdsp_init.c | 2 ++ libavcodec/x86/jpeg2000dsp_init.c | 2 ++ libavcodec/x86/lossless_videodsp_init.c| 2 ++ libavcodec/x86/lossless_videoencdsp_init.c | 2 ++ libavcodec/x86/mdct15_init.c | 2 ++ libavcodec/x86/me_cmp_init.c | 2 ++ libavcodec/x86/mlpdsp_init.c | 2 +- libavcodec/x86/mpegvideoencdsp_init.c | 2 ++ libavcodec/x86/opusdsp_init.c | 2 ++ libavcodec/x86/pixblockdsp_init.c | 2 ++ libavcodec/x86/pngdsp_init.c | 2 ++ libavcodec/x86/proresdsp_init.c| 2 ++ libavcodec/x86/rv34dsp_init.c | 2 ++ libavcodec/x86/sbcdsp_init.c | 2 ++ libavcodec/x86/sbrdsp_init.c | 2 ++ libavcodec/x86/svq1enc_init.c | 2 ++ libavcodec/x86/utvideodsp_init.c | 2 ++ libavcodec/x86/v210enc_init.c | 2 ++ libavcodec/x86/vc1dsp_init.c | 2 +- libavcodec/x86/vorbisdsp_init.c| 2 ++ libavcodec/x86/vp3dsp_init.c | 2 ++ libavcodec/x86/vp6dsp_init.c | 2 ++ libavfilter/x86/af_afir_init.c | 2 ++ libavfilter/x86/af_anlmdn_init.c | 2 ++ libavfilter/x86/af_volume_init.c | 2 ++ libavfilter/x86/avf_showcqt_init.c | 2 ++ libavfilter/x86/colorspacedsp_init.c | 2 ++ libavfilter/x86/vf_atadenoise_init.c | 2 ++ libavfilter/x86/vf_blend_init.c| 2 ++ libavfilter/x86/vf_bwdif_init.c| 2 ++ libavfilter/x86/vf_convolution_init.c | 2 +- libavfilter/x86/vf_framerate_init.c| 2 ++ libavfilter/x86/vf_fspp_init.c | 2 ++ libavfilter/x86/vf_gblur_init.c| 2 ++ libavfilter/x86/vf_hflip_init.c| 2 ++ libavfilter/x86/vf_limiter_init.c | 2 ++ libavfilter/x86/vf_maskedclamp_init.c | 2 ++ libavfilter/x86/vf_maskedmerge_init.c | 2 ++ libavfilter/x86/vf_overlay_init.c | 2 ++ libavfilter/x86/vf_pp7_init.c | 2 ++ libavfilter/x86/vf_psnr_init.c | 2 ++ libavfilter/x86/vf_removegrain_init.c | 2 ++ libavfilter/x86/vf_ssim_init.c | 2 ++ libavfilter/x86/vf_stereo3d_init.c | 2 ++ libavfilter/x86/vf_threshold_init.c| 2 ++ libavfilter/x86/vf_tinterlace_init.c | 2 ++ libavfilter/x86/vf_transpose_init.c| 2 ++ libavfilter/x86/vf_v360_init.c | 2 ++ libavfilter/x86/vf_w3fdif_init.c | 2 ++ libavfilter/x86/vf_yadif_init.c| 2 ++ libavutil/x86/fixed_dsp_init.c | 2 ++ libavutil/x86/float_dsp_init.c | 2 ++ libavutil/x86/imgutils_init.c | 2 ++ libavutil/x86/lls_init.c | 2 ++ libavutil/x86/pixelutils_init.c| 2 ++ libswresample/x86/audio_convert_init.c | 2 ++ libswresample/x86/resample_init.c | 6 ++ libswscale/x86/rgb2rgb.c | 2 ++ libswscale/x86/swscale.c | 2 ++ 82 files changed, 167 insertions(+), 3 deletions(-) diff --git a/libavcodec/x86/aacencdsp_init.c b/libavcodec/x86/aacencdsp_init.c index 049a2417d9..7dca1d481b 100644 --- a/libavcodec/x86/aacencdsp_init.c +++ b/libavcodec/x86/aacencdsp_init.c @@ -34,6 +34,7 @@ void ff_aac_quantize_bands_sse2(int *out, const float *in, const float *scaled, av_cold void ff_aac_dsp_init_x86(AACEncContext *s) { +#if HAVE_X86ASM int cpu_flags = av_get_cpu_flags(); if (EXTERNAL_SSE(cpu_flags)) @@ -41,4 +42,5 @@ av_cold void ff_aac_dsp_init_x86(AACEncContext *s) if (EXTERNAL_SSE2(cpu_flags)) s->quant_bands = ff_aac_quantize_bands_sse2; +#endif /* HAVE_X86ASM */ } diff --git a/libavcodec/
[FFmpeg-devel] [PATCH v2 4/5] all: Guard if (INLINE*) checks with #if HAVE_INLINE_ASM
Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a Signed-off-by: L. E. Segovia --- libavcodec/x86/hpeldsp_init.c | 2 ++ libavcodec/x86/vc1dsp_init.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/x86/hpeldsp_init.c b/libavcodec/x86/hpeldsp_init.c index 09c48c341e..6bde5a3893 100644 --- a/libavcodec/x86/hpeldsp_init.c +++ b/libavcodec/x86/hpeldsp_init.c @@ -224,8 +224,10 @@ av_cold void ff_hpeldsp_init_x86(HpelDSPContext *c, int flags) { int cpu_flags = av_get_cpu_flags(); +#if HAVE_INLINE_ASM if (INLINE_MMX(cpu_flags)) hpeldsp_init_mmx(c, flags); +#endif if (EXTERNAL_MMXEXT(cpu_flags)) hpeldsp_init_mmxext(c, flags); diff --git a/libavcodec/x86/vc1dsp_init.c b/libavcodec/x86/vc1dsp_init.c index bc63933e83..65fc28ea35 100644 --- a/libavcodec/x86/vc1dsp_init.c +++ b/libavcodec/x86/vc1dsp_init.c @@ -102,7 +102,7 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp) { int cpu_flags = av_get_cpu_flags(); -#if HAVE_6REGS +#if HAVE_6REGS && HAVE_INLINE_ASM if (INLINE_MMX(cpu_flags)) if (EXTERNAL_MMX(cpu_flags)) ff_vc1dsp_init_mmx(dsp); -- 2.38.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2 3/5] all: Replace if (CONFIG_FOO) checks by #if CONFIG_FOO
Continuation of e42aaaf92a4b0c88d60acc12df64c81d0887c26f Signed-off-by: L. E. Segovia --- fftools/ffprobe.c | 16 +++- fftools/opt_common.c| 12 ++-- libavformat/rtmpproto.c | 24 ++-- 3 files changed, 39 insertions(+), 13 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 9b7e82fd8c..b878e258ca 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -3518,9 +3518,9 @@ static void ffprobe_show_program_version(WriterContext *w) av_bprint_finalize(, NULL); } -#define SHOW_LIB_VERSION(libname, LIBNAME) \ -do {\ -if (CONFIG_##LIBNAME) { \ +#define SHOW_LIB_VERSION_0(libname, LIBNAME) +#define SHOW_LIB_VERSION_1(libname, LIBNAME)\ +{ \ unsigned int version = libname##_version(); \ writer_print_section_header(w, SECTION_ID_LIBRARY_VERSION); \ print_str("name","lib" #libname); \ @@ -3530,8 +3530,14 @@ static void ffprobe_show_program_version(WriterContext *w) print_int("version", version); \ print_str("ident", LIB##LIBNAME##_IDENT); \ writer_print_section_footer(w); \ -} \ -} while (0) +} + +#define SHOW_LIB_VERSION_2(cfg, libname, LIBNAME) \ +SHOW_LIB_VERSION_ ## cfg(libname, LIBNAME) +#define SHOW_LIB_VERSION_3(cfg, libname, LIBNAME) \ +SHOW_LIB_VERSION_2(cfg, libname, LIBNAME) +#define SHOW_LIB_VERSION(libname, LIBNAME) \ +SHOW_LIB_VERSION_3(CONFIG_ ## LIBNAME, libname, LIBNAME) static void ffprobe_show_library_versions(WriterContext *w) { diff --git a/fftools/opt_common.c b/fftools/opt_common.c index 8a06df82df..f901dba806 100644 --- a/fftools/opt_common.c +++ b/fftools/opt_common.c @@ -153,8 +153,9 @@ static int warned_cfg = 0; #define SHOW_CONFIG 4 #define SHOW_COPYRIGHT 8 -#define PRINT_LIB_INFO(libname, LIBNAME, flags, level) \ -if (CONFIG_##LIBNAME) { \ +#define PRINT_LIB_INFO_0(libname, LIBNAME, flags, level) +#define PRINT_LIB_INFO_1(libname, LIBNAME, flags, level)\ +{ \ const char *indent = flags & INDENT? " " : ""; \ if (flags & SHOW_VERSION) { \ unsigned int version = libname##_version(); \ @@ -182,6 +183,13 @@ static int warned_cfg = 0; } \ } \ +#define PRINT_LIB_INFO_2(cfg, libname, LIBNAME, flags, level) \ +PRINT_LIB_INFO_ ## cfg(libname, LIBNAME, flags, level) +#define PRINT_LIB_INFO_3(cfg, libname, LIBNAME, flags, level) \ +PRINT_LIB_INFO_2(cfg, libname, LIBNAME, flags, level) +#define PRINT_LIB_INFO(libname, LIBNAME, flags, level) \ +PRINT_LIB_INFO_3(CONFIG_ ## LIBNAME, libname, LIBNAME, flags, level) + static void print_all_libs_info(int flags, int level) { PRINT_LIB_INFO(avutil, AVUTIL, flags, level); diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index f0ef223f05..6d84fcf34f 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -1222,7 +1222,8 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt) for (i = 9; i <= RTMP_HANDSHAKE_PACKET_SIZE; i++) tosend[i] = av_lfg_get() >> 24; -if (CONFIG_FFRTMPCRYPT_PROTOCOL && rt->encrypted) { +#if CONFIG_FFRTMPCRYPT_PROTOCOL +if (rt->encrypted) { /* When the client wants to use RTMPE, we have to change the command * byte to 0x06 which means to use encrypted data and we have to set * the flash version to at least 9.0.115.0. */ @@ -1237,6 +1238,7 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt) if ((ret = ff_rtmpe_gen_pub_key(rt->stream, tosend + 1)) < 0) return ret; } +#endif client_pos = rtmp_handshake_imprint_with_digest(tosend + 1, rt->encrypted); if (client_pos < 0) @@ -1300,7 +1302,8 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt) if (ret < 0) return ret; -if (CONFIG_FFRTMPCRYPT_PROTOCOL && rt->encrypted) { +#if CONFIG_FFRTMPCRYPT_PROTOCOL +if (rt->encrypted) { /* Comp
[FFmpeg-devel] [PATCH v2 2/5] avcodec/x86/hevcdsp_init: Fix indentation after the ARCH_FOO changes
--- libavcodec/x86/hevcdsp_init.c | 454 +- 1 file changed, 227 insertions(+), 227 deletions(-) diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c index 40a295430d..c7060085a2 100644 --- a/libavcodec/x86/hevcdsp_init.c +++ b/libavcodec/x86/hevcdsp_init.c @@ -711,11 +711,11 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_sse2; c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_sse2; #if ARCH_X86_64 -c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_sse2; -c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_sse2; +c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_sse2; +c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_sse2; -c->idct[2] = ff_hevc_idct_16x16_8_sse2; -c->idct[3] = ff_hevc_idct_32x32_8_sse2; +c->idct[2] = ff_hevc_idct_16x16_8_sse2; +c->idct[3] = ff_hevc_idct_32x32_8_sse2; #endif SAO_BAND_INIT(8, sse2); @@ -732,8 +732,8 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) } if (EXTERNAL_SSSE3(cpu_flags)) { #if ARCH_X86_64 -c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_ssse3; -c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_ssse3; +c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_ssse3; +c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_ssse3; #endif SAO_EDGE_INIT(8, ssse3); } @@ -754,11 +754,11 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_avx; c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_avx; #if ARCH_X86_64 -c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_avx; -c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_avx; +c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_avx; +c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_avx; -c->idct[2] = ff_hevc_idct_16x16_8_avx; -c->idct[3] = ff_hevc_idct_32x32_8_avx; +c->idct[2] = ff_hevc_idct_16x16_8_avx; +c->idct[3] = ff_hevc_idct_32x32_8_avx; #endif SAO_BAND_INIT(8, avx); @@ -777,89 +777,89 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->idct_dc[2] = ff_hevc_idct_16x16_dc_8_avx2; c->idct_dc[3] = ff_hevc_idct_32x32_dc_8_avx2; #if ARCH_X86_64 -c->put_hevc_epel[7][0][0] = ff_hevc_put_hevc_pel_pixels32_8_avx2; -c->put_hevc_epel[8][0][0] = ff_hevc_put_hevc_pel_pixels48_8_avx2; -c->put_hevc_epel[9][0][0] = ff_hevc_put_hevc_pel_pixels64_8_avx2; +c->put_hevc_epel[7][0][0] = ff_hevc_put_hevc_pel_pixels32_8_avx2; +c->put_hevc_epel[8][0][0] = ff_hevc_put_hevc_pel_pixels48_8_avx2; +c->put_hevc_epel[9][0][0] = ff_hevc_put_hevc_pel_pixels64_8_avx2; -c->put_hevc_qpel[7][0][0] = ff_hevc_put_hevc_pel_pixels32_8_avx2; -c->put_hevc_qpel[8][0][0] = ff_hevc_put_hevc_pel_pixels48_8_avx2; -c->put_hevc_qpel[9][0][0] = ff_hevc_put_hevc_pel_pixels64_8_avx2; +c->put_hevc_qpel[7][0][0] = ff_hevc_put_hevc_pel_pixels32_8_avx2; +c->put_hevc_qpel[8][0][0] = ff_hevc_put_hevc_pel_pixels48_8_avx2; +c->put_hevc_qpel[9][0][0] = ff_hevc_put_hevc_pel_pixels64_8_avx2; -c->put_hevc_epel_uni[7][0][0] = ff_hevc_put_hevc_uni_pel_pixels32_8_avx2; -c->put_hevc_epel_uni[8][0][0] = ff_hevc_put_hevc_uni_pel_pixels48_8_avx2; -c->put_hevc_epel_uni[9][0][0] = ff_hevc_put_hevc_uni_pel_pixels64_8_avx2; +c->put_hevc_epel_uni[7][0][0] = ff_hevc_put_hevc_uni_pel_pixels32_8_avx2; +c->put_hevc_epel_uni[8][0][0] = ff_hevc_put_hevc_uni_pel_pixels48_8_avx2; +c->put_hevc_epel_uni[9][0][0] = ff_hevc_put_hevc_uni_pel_pixels64_8_avx2; -c->put_hevc_qpel_uni[7][0][0] = ff_hevc_put_hevc_uni_pel_pixels32_8_avx2; -c->put_hevc_qpel_uni[8][0][0] = ff_hevc_put_hevc_uni_pel_pixels48_8_avx2; -c->put_hevc_qpel_uni[9][0][0] = ff_hevc_put_hevc_uni_pel_pixels64_8_avx2; +c->put_hevc_qpel_uni[7][0][0] = ff_hevc_put_hevc_uni_pel_pixels32_8_avx2; +c->put_hevc_qpel_uni[8][0][0] = ff_hevc_put_hevc_uni_pel_pixels48_8_avx2; +c->put_hevc_qpel_uni[9][0][0] = ff_hevc_put_hevc_uni_pel_pixels64_8_avx2; -c->put_hevc_qpel_bi[7][0][0] = ff_hevc_put_hevc_bi_pel_pixels32_8_avx2; -c->put_hevc_qpel_bi[8][0][0] =
[FFmpeg-devel] [PATCH v2 1/5] all: Replace if (ARCH_FOO) checks by #if ARCH_FOO, part 2
Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a Co-authored-by: Nirbheek Chauhan Signed-off-by: L. E. Segovia --- libavcodec/x86/fdctdsp_init.c| 2 ++ libavcodec/x86/flacdsp_init.c| 8 +++-- libavcodec/x86/hevcdsp_init.c| 53 +++- libavcodec/x86/idctdsp_init.c| 9 +++-- libavcodec/x86/mlpdsp_init.c | 6 ++-- libavcodec/x86/vc1dsp_init.c | 6 ++-- libavfilter/x86/colorspacedsp_init.c | 4 ++- libavfilter/x86/vf_atadenoise_init.c | 6 ++-- libavfilter/x86/vf_ssim_init.c | 4 ++- libavfilter/x86/vf_w3fdif_init.c | 4 ++- 10 files changed, 64 insertions(+), 38 deletions(-) diff --git a/libavcodec/x86/fdctdsp_init.c b/libavcodec/x86/fdctdsp_init.c index 92a842433d..4a874a640d 100644 --- a/libavcodec/x86/fdctdsp_init.c +++ b/libavcodec/x86/fdctdsp_init.c @@ -31,8 +31,10 @@ av_cold void ff_fdctdsp_init_x86(FDCTDSPContext *c, AVCodecContext *avctx, if (!high_bit_depth) { if ((dct_algo == FF_DCT_AUTO || dct_algo == FF_DCT_MMX)) { +#if HAVE_INLINE_SSE2 if (INLINE_SSE2(cpu_flags)) c->fdct = ff_fdct_sse2; +#endif } } } diff --git a/libavcodec/x86/flacdsp_init.c b/libavcodec/x86/flacdsp_init.c index 87daed7005..49e67ee2b0 100644 --- a/libavcodec/x86/flacdsp_init.c +++ b/libavcodec/x86/flacdsp_init.c @@ -97,15 +97,19 @@ av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int } if (EXTERNAL_AVX(cpu_flags)) { if (fmt == AV_SAMPLE_FMT_S16) { -if (ARCH_X86_64 && channels == 8) +#if ARCH_X86_64 +if (channels == 8) c->decorrelate[0] = ff_flac_decorrelate_indep8_16_avx; +#endif } else if (fmt == AV_SAMPLE_FMT_S32) { if (channels == 4) c->decorrelate[0] = ff_flac_decorrelate_indep4_32_avx; else if (channels == 6) c->decorrelate[0] = ff_flac_decorrelate_indep6_32_avx; -else if (ARCH_X86_64 && channels == 8) +#if ARCH_X86_64 +else if (channels == 8) c->decorrelate[0] = ff_flac_decorrelate_indep8_32_avx; +#endif } } if (EXTERNAL_XOP(cpu_flags)) { diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c index 6f45e5e0db..40a295430d 100644 --- a/libavcodec/x86/hevcdsp_init.c +++ b/libavcodec/x86/hevcdsp_init.c @@ -710,13 +710,13 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) if (EXTERNAL_SSE2(cpu_flags)) { c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_sse2; c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_sse2; -if (ARCH_X86_64) { +#if ARCH_X86_64 c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_sse2; c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_sse2; c->idct[2] = ff_hevc_idct_16x16_8_sse2; c->idct[3] = ff_hevc_idct_32x32_8_sse2; -} +#endif SAO_BAND_INIT(8, sse2); c->idct_dc[1] = ff_hevc_idct_8x8_dc_8_sse2; @@ -731,14 +731,14 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->add_residual[3] = ff_hevc_add_residual_32_8_sse2; } if (EXTERNAL_SSSE3(cpu_flags)) { -if(ARCH_X86_64) { +#if ARCH_X86_64 c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_ssse3; c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_ssse3; -} +#endif SAO_EDGE_INIT(8, ssse3); } -if (EXTERNAL_SSE4(cpu_flags) && ARCH_X86_64) { - +#if ARCH_X86_64 +if (EXTERNAL_SSE4(cpu_flags)) { EPEL_LINKS(c->put_hevc_epel, 0, 0, pel_pixels, 8, sse4); EPEL_LINKS(c->put_hevc_epel, 0, 1, epel_h, 8, sse4); EPEL_LINKS(c->put_hevc_epel, 1, 0, epel_v, 8, sse4); @@ -749,16 +749,17 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) QPEL_LINKS(c->put_hevc_qpel, 1, 0, qpel_v, 8, sse4); QPEL_LINKS(c->put_hevc_qpel, 1, 1, qpel_hv,8, sse4); } +#endif if (EXTERNAL_AVX(cpu_flags)) { c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_avx; c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_avx; -if (ARCH_X86_64) { +#if ARCH_X86_64 c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_avx; c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_avx; c->idct[2] = ff_hevc_idct_16x16_8_avx; c->idct[3] = ff_hevc_idct_32x32_8_avx; -} +#endif SAO_BAND_INIT(8, avx); c->idct[0] = ff_hevc_idct_4x4_8_avx; @@ -775,7 +776,7 @@ voi
[FFmpeg-devel] [PATCH v2 0/5] Fix FFmpeg compilation without DCE
Hi all, Thanks again for the review of the previous version of the patchset. v2 changes: - Split indentation fixes for hevcdsp_init into its own commit - Fixed spurious indentation in vf_ssim_init - Implemented the macro approach for expanding the CONFIG_FOO checks in fftools - Added the missing HAVE_X86ASM check in vc1dsp_init - Added a missing HAVE_INLINE_ASM check in hpeldsp_init (see below) - Fixed the HAVE_X86ASM check wrongly covering the INLINE_FOO clause in hpeldsp_init - Removed the duplicate HAVE_X86ASM check in me_cmp_init - Inlined the HAVE_X86ASM and ARCH_X86_64 checks in mlpdsp_init and vf_convolution_init L. E. Segovia (5): all: Replace if (ARCH_FOO) checks by #if ARCH_FOO, part 2 avcodec/x86/hevcdsp_init: Fix indentation after the ARCH_FOO changes all: Replace if (CONFIG_FOO) checks by #if CONFIG_FOO all: Guard if (INLINE*) checks with #if HAVE_INLINE_ASM all: Guard if (EXTERNAL*) checks with #if HAVE_X86ASM fftools/ffprobe.c | 16 +- fftools/opt_common.c | 12 +- libavcodec/x86/aacencdsp_init.c| 2 + libavcodec/x86/aacpsdsp_init.c | 2 + libavcodec/x86/ac3dsp_init.c | 4 + libavcodec/x86/audiodsp_init.c | 2 + libavcodec/x86/bswapdsp_init.c | 2 + libavcodec/x86/cavsdsp.c | 2 + libavcodec/x86/celt_pvq_init.c | 2 + libavcodec/x86/cfhddsp_init.c | 2 + libavcodec/x86/cfhdencdsp_init.c | 2 + libavcodec/x86/dcadsp_init.c | 2 + libavcodec/x86/dct_init.c | 2 + libavcodec/x86/dnxhdenc_init.c | 2 + libavcodec/x86/exrdsp_init.c | 2 + libavcodec/x86/fdctdsp_init.c | 2 + libavcodec/x86/fft_init.c | 2 + libavcodec/x86/flacdsp_init.c | 8 +- libavcodec/x86/g722dsp_init.c | 2 + libavcodec/x86/h263dsp_init.c | 2 + libavcodec/x86/h264_intrapred_init.c | 2 + libavcodec/x86/h264chroma_init.c | 2 + libavcodec/x86/hevcdsp_init.c | 549 +++-- libavcodec/x86/hpeldsp_init.c | 4 + libavcodec/x86/hpeldsp_vp3_init.c | 2 + libavcodec/x86/huffyuvdsp_init.c | 2 + libavcodec/x86/huffyuvencdsp_init.c| 2 + libavcodec/x86/idctdsp_init.c | 11 +- libavcodec/x86/jpeg2000dsp_init.c | 2 + libavcodec/x86/lossless_videodsp_init.c| 2 + libavcodec/x86/lossless_videoencdsp_init.c | 2 + libavcodec/x86/mdct15_init.c | 2 + libavcodec/x86/me_cmp_init.c | 2 + libavcodec/x86/mlpdsp_init.c | 6 +- libavcodec/x86/mpegvideoencdsp_init.c | 2 + libavcodec/x86/opusdsp_init.c | 2 + libavcodec/x86/pixblockdsp_init.c | 2 + libavcodec/x86/pngdsp_init.c | 2 + libavcodec/x86/proresdsp_init.c| 2 + libavcodec/x86/rv34dsp_init.c | 2 + libavcodec/x86/sbcdsp_init.c | 2 + libavcodec/x86/sbrdsp_init.c | 2 + libavcodec/x86/svq1enc_init.c | 2 + libavcodec/x86/utvideodsp_init.c | 2 + libavcodec/x86/v210enc_init.c | 2 + libavcodec/x86/vc1dsp_init.c | 6 +- libavcodec/x86/vorbisdsp_init.c| 2 + libavcodec/x86/vp3dsp_init.c | 2 + libavcodec/x86/vp6dsp_init.c | 2 + libavfilter/x86/af_afir_init.c | 2 + libavfilter/x86/af_anlmdn_init.c | 2 + libavfilter/x86/af_volume_init.c | 2 + libavfilter/x86/avf_showcqt_init.c | 2 + libavfilter/x86/colorspacedsp_init.c | 6 +- libavfilter/x86/vf_atadenoise_init.c | 8 +- libavfilter/x86/vf_blend_init.c| 2 + libavfilter/x86/vf_bwdif_init.c| 2 + libavfilter/x86/vf_convolution_init.c | 2 +- libavfilter/x86/vf_framerate_init.c| 2 + libavfilter/x86/vf_fspp_init.c | 2 + libavfilter/x86/vf_gblur_init.c| 2 + libavfilter/x86/vf_hflip_init.c| 2 + libavfilter/x86/vf_limiter_init.c | 2 + libavfilter/x86/vf_maskedclamp_init.c | 2 + libavfilter/x86/vf_maskedmerge_init.c | 2 + libavfilter/x86/vf_overlay_init.c | 2 + libavfilter/x86/vf_pp7_init.c | 2 + libavfilter/x86/vf_psnr_init.c | 2 + libavfilter/x86/vf_removegrain_init.c | 2 + libavfilter/x86/vf_ssim_init.c | 6 +- libavfilter/x86/vf_stereo3d_init.c | 2 + libavfilter/x86/vf_threshold_init.c| 2 + libavfilter/x86/vf_tinterlace_init.c | 2 + libavfilter/x86/vf_transpose_init.c| 2 + libavfilter/x86/vf_v360_init.c | 2 + libavfilter/x86/vf_w3fdif_init.c | 6 +- libavfilter/x86/vf_yadif_init.c| 2
Re: [FFmpeg-devel] [PATCH 1/4] all: Replace if (ARCH_FOO) checks by #if ARCH_FOO, part 2
Hi! Thanks for the review. The comments will be fixed in the next version of the patchset. Just a couple remarks: re dcadsp_init -- this one comes from 4.4.x having a clause there to support SSE, which also checks for the x86-32 architecture [1]. I've removed it for the current version. re flacdsp_init -- ff_flac_decorrelate_indep8_16_avx and ff_flac_decorrelate_indep8_32_avx are from their inception only generated for x86-64 [2][3]. This check was missing from the C side, implying it relied on DCE to pass linking. [1]: https://github.com/FFmpeg/FFmpeg/blob/release/4.4/libavcodec/x86/dcadsp_init.c#L40-L41 [2]: https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/x86/flacdsp.asm#L315-L318 [3]: https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/x86/flacdsp.asm#L323-L326 On 01/11/2022 19:28, andreas.rheinhardt at outlook.com (Andreas Rheinhardt) wrote: > L. E. Segovia: >> Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a >> >> Co-authored-by: Nirbheek Chauhan >> >> Signed-off-by: L. E. Segovia >> --- >> libavcodec/x86/dcadsp_init.c | 2 + >> libavcodec/x86/fdctdsp_init.c| 2 + >> libavcodec/x86/flacdsp_init.c| 8 +- >> libavcodec/x86/hevcdsp_init.c| 463 ++- >> libavcodec/x86/idctdsp_init.c| 9 +- >> libavcodec/x86/mlpdsp_init.c | 6 +- >> libavcodec/x86/vc1dsp_init.c | 6 +- >> libavfilter/x86/colorspacedsp_init.c | 4 +- >> libavfilter/x86/vf_atadenoise_init.c | 6 +- >> libavfilter/x86/vf_ssim_init.c | 6 +- >> libavfilter/x86/vf_w3fdif_init.c | 4 +- >> 11 files changed, 272 insertions(+), 244 deletions(-) >> >> diff --git a/libavcodec/x86/dcadsp_init.c b/libavcodec/x86/dcadsp_init.c >> index 0c78dd1c9e..3c125f33fd 100644 >> --- a/libavcodec/x86/dcadsp_init.c >> +++ b/libavcodec/x86/dcadsp_init.c >> @@ -36,6 +36,7 @@ av_cold void ff_dcadsp_init_x86(DCADSPContext *s) >> { >> int cpu_flags = av_get_cpu_flags(); >> >> +#if ARCH_X86_32 > > This check is obviously wrong. You are disabling these functions for x64. > >> if (EXTERNAL_SSE2(cpu_flags)) >> s->lfe_fir_float[0] = ff_lfe_fir0_float_sse2; >> if (EXTERNAL_SSE3(cpu_flags)) >> @@ -46,4 +47,5 @@ av_cold void ff_dcadsp_init_x86(DCADSPContext *s) >> } >> if (EXTERNAL_FMA3(cpu_flags)) >> s->lfe_fir_float[0] = ff_lfe_fir0_float_fma3; >> +#endif >> } >> diff --git a/libavcodec/x86/fdctdsp_init.c b/libavcodec/x86/fdctdsp_init.c >> index 92a842433d..4a874a640d 100644 >> --- a/libavcodec/x86/fdctdsp_init.c >> +++ b/libavcodec/x86/fdctdsp_init.c >> @@ -31,8 +31,10 @@ av_cold void ff_fdctdsp_init_x86(FDCTDSPContext *c, >> AVCodecContext *avctx, >> >> if (!high_bit_depth) { >> if ((dct_algo == FF_DCT_AUTO || dct_algo == FF_DCT_MMX)) { >> +#if HAVE_INLINE_SSE2 >> if (INLINE_SSE2(cpu_flags)) >> c->fdct = ff_fdct_sse2; >> +#endif >> } >> } >> } >> diff --git a/libavcodec/x86/flacdsp_init.c b/libavcodec/x86/flacdsp_init.c >> index 87daed7005..49e67ee2b0 100644 >> --- a/libavcodec/x86/flacdsp_init.c >> +++ b/libavcodec/x86/flacdsp_init.c >> @@ -97,15 +97,19 @@ av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum >> AVSampleFormat fmt, int >> } >> if (EXTERNAL_AVX(cpu_flags)) { >> if (fmt == AV_SAMPLE_FMT_S16) { >> -if (ARCH_X86_64 && channels == 8) >> +#if ARCH_X86_64 >> +if (channels == 8) >> c->decorrelate[0] = ff_flac_decorrelate_indep8_16_avx; >> +#endif >> } else if (fmt == AV_SAMPLE_FMT_S32) { >> if (channels == 4) >> c->decorrelate[0] = ff_flac_decorrelate_indep4_32_avx; >> else if (channels == 6) >> c->decorrelate[0] = ff_flac_decorrelate_indep6_32_avx; >> -else if (ARCH_X86_64 && channels == 8) >> +#if ARCH_X86_64 >> +else if (channels == 8) >> c->decorrelate[0] = ff_flac_decorrelate_indep8_32_avx; >> +#endif > > Why does the last function need ARCH_X86_64? And why only the last? > >> } >> } >> if (EXTERNAL_XOP(cpu_flags)) { >> diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c >> index 6f45e5e0db..c7060085a2 100644 >> --- a/libavcodec/x86/hevcdsp_init.c >> +++ b/libavcodec/x86/hevcdsp_init.c >> @@ -710,13 +710,13 @@ void ff_hevc_dsp_init_x86(HEVCD
[FFmpeg-devel] [PATCH 4/4] all: Guard if (EXTERNAL*) checks with #if HAVE_X86ASM
Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a Signed-off-by: L. E. Segovia --- libavcodec/x86/aacencdsp_init.c| 2 ++ libavcodec/x86/aacpsdsp_init.c | 2 ++ libavcodec/x86/ac3dsp_init.c | 4 libavcodec/x86/audiodsp_init.c | 2 ++ libavcodec/x86/bswapdsp_init.c | 2 ++ libavcodec/x86/cavsdsp.c | 2 ++ libavcodec/x86/celt_pvq_init.c | 2 ++ libavcodec/x86/cfhddsp_init.c | 2 ++ libavcodec/x86/cfhdencdsp_init.c | 2 ++ libavcodec/x86/dcadsp_init.c | 2 ++ libavcodec/x86/dct_init.c | 2 ++ libavcodec/x86/dnxhdenc_init.c | 2 ++ libavcodec/x86/exrdsp_init.c | 2 ++ libavcodec/x86/fft_init.c | 2 ++ libavcodec/x86/g722dsp_init.c | 2 ++ libavcodec/x86/h263dsp_init.c | 2 ++ libavcodec/x86/h264_intrapred_init.c | 2 ++ libavcodec/x86/h264chroma_init.c | 2 ++ libavcodec/x86/hevcdsp_init.c | 2 ++ libavcodec/x86/hpeldsp_init.c | 2 ++ libavcodec/x86/hpeldsp_vp3_init.c | 2 ++ libavcodec/x86/huffyuvdsp_init.c | 2 ++ libavcodec/x86/huffyuvencdsp_init.c| 2 ++ libavcodec/x86/idctdsp_init.c | 2 ++ libavcodec/x86/jpeg2000dsp_init.c | 2 ++ libavcodec/x86/lossless_videodsp_init.c| 2 ++ libavcodec/x86/lossless_videoencdsp_init.c | 2 ++ libavcodec/x86/mdct15_init.c | 2 ++ libavcodec/x86/me_cmp_init.c | 2 ++ libavcodec/x86/mlpdsp_init.c | 2 ++ libavcodec/x86/mpegvideoencdsp_init.c | 2 ++ libavcodec/x86/opusdsp_init.c | 2 ++ libavcodec/x86/pixblockdsp_init.c | 2 ++ libavcodec/x86/pngdsp_init.c | 2 ++ libavcodec/x86/proresdsp_init.c| 2 ++ libavcodec/x86/rv34dsp_init.c | 2 ++ libavcodec/x86/sbcdsp_init.c | 2 ++ libavcodec/x86/sbrdsp_init.c | 2 ++ libavcodec/x86/svq1enc_init.c | 2 ++ libavcodec/x86/utvideodsp_init.c | 2 ++ libavcodec/x86/v210enc_init.c | 2 ++ libavcodec/x86/vorbisdsp_init.c| 2 ++ libavcodec/x86/vp3dsp_init.c | 2 ++ libavcodec/x86/vp6dsp_init.c | 2 ++ libavfilter/x86/af_afir_init.c | 2 ++ libavfilter/x86/af_anlmdn_init.c | 2 ++ libavfilter/x86/af_volume_init.c | 2 ++ libavfilter/x86/avf_showcqt_init.c | 2 ++ libavfilter/x86/colorspacedsp_init.c | 2 ++ libavfilter/x86/vf_atadenoise_init.c | 2 ++ libavfilter/x86/vf_blend_init.c| 2 ++ libavfilter/x86/vf_bwdif_init.c| 2 ++ libavfilter/x86/vf_convolution_init.c | 2 ++ libavfilter/x86/vf_framerate_init.c| 2 ++ libavfilter/x86/vf_fspp_init.c | 2 ++ libavfilter/x86/vf_gblur_init.c| 2 ++ libavfilter/x86/vf_hflip_init.c| 2 ++ libavfilter/x86/vf_limiter_init.c | 2 ++ libavfilter/x86/vf_maskedclamp_init.c | 2 ++ libavfilter/x86/vf_maskedmerge_init.c | 2 ++ libavfilter/x86/vf_overlay_init.c | 2 ++ libavfilter/x86/vf_pp7_init.c | 2 ++ libavfilter/x86/vf_psnr_init.c | 2 ++ libavfilter/x86/vf_removegrain_init.c | 2 ++ libavfilter/x86/vf_ssim_init.c | 2 ++ libavfilter/x86/vf_stereo3d_init.c | 2 ++ libavfilter/x86/vf_threshold_init.c| 2 ++ libavfilter/x86/vf_tinterlace_init.c | 2 ++ libavfilter/x86/vf_transpose_init.c| 2 ++ libavfilter/x86/vf_v360_init.c | 2 ++ libavfilter/x86/vf_w3fdif_init.c | 2 ++ libavfilter/x86/vf_yadif_init.c| 2 ++ libavutil/x86/fixed_dsp_init.c | 2 ++ libavutil/x86/float_dsp_init.c | 2 ++ libavutil/x86/imgutils_init.c | 2 ++ libavutil/x86/lls_init.c | 2 ++ libavutil/x86/pixelutils_init.c| 2 ++ libswresample/x86/audio_convert_init.c | 2 ++ libswresample/x86/resample_init.c | 6 ++ libswscale/x86/rgb2rgb.c | 2 ++ libswscale/x86/swscale.c | 2 ++ 81 files changed, 168 insertions(+) diff --git a/libavcodec/x86/aacencdsp_init.c b/libavcodec/x86/aacencdsp_init.c index 049a2417d9..7dca1d481b 100644 --- a/libavcodec/x86/aacencdsp_init.c +++ b/libavcodec/x86/aacencdsp_init.c @@ -34,6 +34,7 @@ void ff_aac_quantize_bands_sse2(int *out, const float *in, const float *scaled, av_cold void ff_aac_dsp_init_x86(AACEncContext *s) { +#if HAVE_X86ASM int cpu_flags = av_get_cpu_flags(); if (EXTERNAL_SSE(cpu_flags)) @@ -41,4 +42,5 @@ av_cold void ff_aac_dsp_init_x86(AACEncContext *s) if (EXTERNAL_SSE2(cpu_flags)) s->quant_bands = ff_aac_quantize_bands_sse2; +#endif /* HAVE_X86ASM */ } diff --git a/libavcodec/x86/aacpsdsp_init.c b/libavcodec/x86/aacpsdsp_init.c index 0b0ee07
[FFmpeg-devel] [PATCH 3/4] all: Guard if (INLINE*) checks with #if HAVE_INLINE_ASM
Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a Signed-off-by: L. E. Segovia --- libavcodec/x86/vc1dsp_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/x86/vc1dsp_init.c b/libavcodec/x86/vc1dsp_init.c index bc63933e83..65fc28ea35 100644 --- a/libavcodec/x86/vc1dsp_init.c +++ b/libavcodec/x86/vc1dsp_init.c @@ -102,7 +102,7 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp) { int cpu_flags = av_get_cpu_flags(); -#if HAVE_6REGS +#if HAVE_6REGS && HAVE_INLINE_ASM if (INLINE_MMX(cpu_flags)) if (EXTERNAL_MMX(cpu_flags)) ff_vc1dsp_init_mmx(dsp); -- 2.37.1.windows.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/4] all: Replace if (ARCH_FOO) checks by #if ARCH_FOO, part 2
Continuation of 40e6575aa3eed64cd32bf28c00ae57edc5acb25a Co-authored-by: Nirbheek Chauhan Signed-off-by: L. E. Segovia --- libavcodec/x86/dcadsp_init.c | 2 + libavcodec/x86/fdctdsp_init.c| 2 + libavcodec/x86/flacdsp_init.c| 8 +- libavcodec/x86/hevcdsp_init.c| 463 ++- libavcodec/x86/idctdsp_init.c| 9 +- libavcodec/x86/mlpdsp_init.c | 6 +- libavcodec/x86/vc1dsp_init.c | 6 +- libavfilter/x86/colorspacedsp_init.c | 4 +- libavfilter/x86/vf_atadenoise_init.c | 6 +- libavfilter/x86/vf_ssim_init.c | 6 +- libavfilter/x86/vf_w3fdif_init.c | 4 +- 11 files changed, 272 insertions(+), 244 deletions(-) diff --git a/libavcodec/x86/dcadsp_init.c b/libavcodec/x86/dcadsp_init.c index 0c78dd1c9e..3c125f33fd 100644 --- a/libavcodec/x86/dcadsp_init.c +++ b/libavcodec/x86/dcadsp_init.c @@ -36,6 +36,7 @@ av_cold void ff_dcadsp_init_x86(DCADSPContext *s) { int cpu_flags = av_get_cpu_flags(); +#if ARCH_X86_32 if (EXTERNAL_SSE2(cpu_flags)) s->lfe_fir_float[0] = ff_lfe_fir0_float_sse2; if (EXTERNAL_SSE3(cpu_flags)) @@ -46,4 +47,5 @@ av_cold void ff_dcadsp_init_x86(DCADSPContext *s) } if (EXTERNAL_FMA3(cpu_flags)) s->lfe_fir_float[0] = ff_lfe_fir0_float_fma3; +#endif } diff --git a/libavcodec/x86/fdctdsp_init.c b/libavcodec/x86/fdctdsp_init.c index 92a842433d..4a874a640d 100644 --- a/libavcodec/x86/fdctdsp_init.c +++ b/libavcodec/x86/fdctdsp_init.c @@ -31,8 +31,10 @@ av_cold void ff_fdctdsp_init_x86(FDCTDSPContext *c, AVCodecContext *avctx, if (!high_bit_depth) { if ((dct_algo == FF_DCT_AUTO || dct_algo == FF_DCT_MMX)) { +#if HAVE_INLINE_SSE2 if (INLINE_SSE2(cpu_flags)) c->fdct = ff_fdct_sse2; +#endif } } } diff --git a/libavcodec/x86/flacdsp_init.c b/libavcodec/x86/flacdsp_init.c index 87daed7005..49e67ee2b0 100644 --- a/libavcodec/x86/flacdsp_init.c +++ b/libavcodec/x86/flacdsp_init.c @@ -97,15 +97,19 @@ av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int } if (EXTERNAL_AVX(cpu_flags)) { if (fmt == AV_SAMPLE_FMT_S16) { -if (ARCH_X86_64 && channels == 8) +#if ARCH_X86_64 +if (channels == 8) c->decorrelate[0] = ff_flac_decorrelate_indep8_16_avx; +#endif } else if (fmt == AV_SAMPLE_FMT_S32) { if (channels == 4) c->decorrelate[0] = ff_flac_decorrelate_indep4_32_avx; else if (channels == 6) c->decorrelate[0] = ff_flac_decorrelate_indep6_32_avx; -else if (ARCH_X86_64 && channels == 8) +#if ARCH_X86_64 +else if (channels == 8) c->decorrelate[0] = ff_flac_decorrelate_indep8_32_avx; +#endif } } if (EXTERNAL_XOP(cpu_flags)) { diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c index 6f45e5e0db..c7060085a2 100644 --- a/libavcodec/x86/hevcdsp_init.c +++ b/libavcodec/x86/hevcdsp_init.c @@ -710,13 +710,13 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) if (EXTERNAL_SSE2(cpu_flags)) { c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_sse2; c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_sse2; -if (ARCH_X86_64) { -c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_sse2; -c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_sse2; +#if ARCH_X86_64 +c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_sse2; +c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_sse2; -c->idct[2] = ff_hevc_idct_16x16_8_sse2; -c->idct[3] = ff_hevc_idct_32x32_8_sse2; -} +c->idct[2] = ff_hevc_idct_16x16_8_sse2; +c->idct[3] = ff_hevc_idct_32x32_8_sse2; +#endif SAO_BAND_INIT(8, sse2); c->idct_dc[1] = ff_hevc_idct_8x8_dc_8_sse2; @@ -731,14 +731,14 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->add_residual[3] = ff_hevc_add_residual_32_8_sse2; } if (EXTERNAL_SSSE3(cpu_flags)) { -if(ARCH_X86_64) { -c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_ssse3; -c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_ssse3; -} +#if ARCH_X86_64 +c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_ssse3; +c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_ssse3; +#endif SAO_EDGE_INIT(8, ssse3); } -if (EXTERNAL_SSE4(cpu_flags) && ARCH_X86_64) { - +#if ARCH_X86_64 +if (EXTERNAL_SSE4(cpu_flags)) { EPEL_LINKS(c->put_hevc_epel, 0
[FFmpeg-devel] [PATCH 2/4] all: Replace if (CONFIG_FOO) checks by #if CONFIG_FOO
Continuation of e42aaaf92a4b0c88d60acc12df64c81d0887c26f Signed-off-by: L. E. Segovia --- fftools/ffprobe.c | 22 ++ fftools/opt_common.c| 18 +- libavformat/rtmpproto.c | 24 ++-- 3 files changed, 53 insertions(+), 11 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 9b7e82fd8c..c16c68ee92 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -3519,8 +3519,7 @@ static void ffprobe_show_program_version(WriterContext *w) } #define SHOW_LIB_VERSION(libname, LIBNAME) \ -do {\ -if (CONFIG_##LIBNAME) { \ +{ \ unsigned int version = libname##_version(); \ writer_print_section_header(w, SECTION_ID_LIBRARY_VERSION); \ print_str("name","lib" #libname); \ @@ -3530,20 +3529,35 @@ static void ffprobe_show_program_version(WriterContext *w) print_int("version", version); \ print_str("ident", LIB##LIBNAME##_IDENT); \ writer_print_section_footer(w); \ -} \ -} while (0) +} static void ffprobe_show_library_versions(WriterContext *w) { writer_print_section_header(w, SECTION_ID_LIBRARY_VERSIONS); +#if CONFIG_AVUTIL SHOW_LIB_VERSION(avutil, AVUTIL); +#endif +#if CONFIG_AVCODEC SHOW_LIB_VERSION(avcodec,AVCODEC); +#endif +#if CONFIG_AVFORMAT SHOW_LIB_VERSION(avformat, AVFORMAT); +#endif +#if CONFIG_AVDEVICE SHOW_LIB_VERSION(avdevice, AVDEVICE); +#endif +#if CONFIG_AVFILTER SHOW_LIB_VERSION(avfilter, AVFILTER); +#endif +#if CONFIG_SWSCALE SHOW_LIB_VERSION(swscale,SWSCALE); +#endif +#if CONFIG_SWRESAMPLE SHOW_LIB_VERSION(swresample, SWRESAMPLE); +#endif +#if CONFIG_POSTPROC SHOW_LIB_VERSION(postproc, POSTPROC); +#endif writer_print_section_footer(w); } diff --git a/fftools/opt_common.c b/fftools/opt_common.c index 8a06df82df..243eb4e3a1 100644 --- a/fftools/opt_common.c +++ b/fftools/opt_common.c @@ -154,7 +154,7 @@ static int warned_cfg = 0; #define SHOW_COPYRIGHT 8 #define PRINT_LIB_INFO(libname, LIBNAME, flags, level) \ -if (CONFIG_##LIBNAME) { \ +{ \ const char *indent = flags & INDENT? " " : ""; \ if (flags & SHOW_VERSION) { \ unsigned int version = libname##_version(); \ @@ -184,14 +184,30 @@ static int warned_cfg = 0; static void print_all_libs_info(int flags, int level) { +#if CONFIG_AVUTIL PRINT_LIB_INFO(avutil, AVUTIL, flags, level); +#endif +#if CONFIG_AVCODEC PRINT_LIB_INFO(avcodec,AVCODEC,flags, level); +#endif +#if CONFIG_AVFORMAT PRINT_LIB_INFO(avformat, AVFORMAT, flags, level); +#endif +#if CONFIG_AVDEVICE PRINT_LIB_INFO(avdevice, AVDEVICE, flags, level); +#endif +#if CONFIG_AVFILTER PRINT_LIB_INFO(avfilter, AVFILTER, flags, level); +#endif +#if CONFIG_SWSCALE PRINT_LIB_INFO(swscale,SWSCALE,flags, level); +#endif +#if CONFIG_SWRESAMPLE PRINT_LIB_INFO(swresample, SWRESAMPLE, flags, level); +#endif +#if CONFIG_POSTPROC PRINT_LIB_INFO(postproc, POSTPROC, flags, level); +#endif } static void print_program_info(int flags, int level) diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index f0ef223f05..6d84fcf34f 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -1222,7 +1222,8 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt) for (i = 9; i <= RTMP_HANDSHAKE_PACKET_SIZE; i++) tosend[i] = av_lfg_get() >> 24; -if (CONFIG_FFRTMPCRYPT_PROTOCOL && rt->encrypted) { +#if CONFIG_FFRTMPCRYPT_PROTOCOL +if (rt->encrypted) { /* When the client wants to use RTMPE, we have to change the command * byte to 0x06 which means to use encrypted data and we have to set * the flash version to at least 9.0.115.0. */ @@ -1237,6 +1238,7 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt) if ((ret = ff_rtmpe_gen_pub_key(rt->stream, tosend + 1)) < 0) return ret; } +#endif client_pos = rtmp_handshake_imprint_with_digest(tosend + 1, rt->encrypted); if (client_pos < 0) @@ -1300,7 +1302,8 @@ static int rtmp_handshake(URLContext *s, RTMPContext *rt) if (ret < 0) return ret; -if (C
[FFmpeg-devel] [PATCH 0/4] Fix FFmpeg compilation without DCE
Hi all, This is a patch to fix building FFmpeg without having DCE enabled. This was previously attempted by Andreas Rheinhardt in commit 40e6575aa3eed64cd32bf28c00ae57edc5acb25a. However, this is not remotely enough for MSVC; one can quickly check for this by configuring the build without any optimizations, and then overriding OPTFLAGS with /Od: ../configure --disable-asm --disable-optimizations --optflags=-Od --enable-shared --disable-static --toolchain=msvc Issuing make should yield the first of many LNK2019 errors: LD libavformat/avformat-59.dll Creating library libavformat/avformat.lib and object libavformat/avformat.exp rtmpproto.o : error LNK2019: unresolved external symbol ff_rtmpe_gen_pub_key referenced in function rtmp_handshake rtmpproto.o : error LNK2019: unresolved external symbol ff_rtmpe_compute_secret_key referenced in function rtmp_handshake rtmpproto.o : error LNK2019: unresolved external symbol ff_rtmpe_encrypt_sig referenced in function rtmp_handshake rtmpproto.o : error LNK2019: unresolved external symbol ff_rtmpe_update_keystream referenced in function rtmp_handshake libavformat\avformat-59.dll : fatal error LNK1120: 4 unresolved externals make: *** [/c/Users/Amalia/Desktop/ffmpeg/ffbuild/library.mak:119: libavformat/avformat-59.dll] Error 96 The proposed patchset comprehensively converts all instances of ARCH_FOO, CONFIG_FOO, INLINE_FOO and EXTERNAL_FOO to the equivalent preprocessor guards. L. E. Segovia (4): all: Replace if (ARCH_FOO) checks by #if ARCH_FOO, part 2 all: Replace if (CONFIG_FOO) checks by #if CONFIG_FOO all: Guard if (INLINE*) checks with #if HAVE_INLINE_ASM all: Guard if (EXTERNAL*) checks with #if HAVE_X86ASM fftools/ffprobe.c | 22 +- fftools/opt_common.c | 18 +- libavcodec/x86/aacencdsp_init.c| 2 + libavcodec/x86/aacpsdsp_init.c | 2 + libavcodec/x86/ac3dsp_init.c | 4 + libavcodec/x86/audiodsp_init.c | 2 + libavcodec/x86/bswapdsp_init.c | 2 + libavcodec/x86/cavsdsp.c | 2 + libavcodec/x86/celt_pvq_init.c | 2 + libavcodec/x86/cfhddsp_init.c | 2 + libavcodec/x86/cfhdencdsp_init.c | 2 + libavcodec/x86/dcadsp_init.c | 4 + libavcodec/x86/dct_init.c | 2 + libavcodec/x86/dnxhdenc_init.c | 2 + libavcodec/x86/exrdsp_init.c | 2 + libavcodec/x86/fdctdsp_init.c | 2 + libavcodec/x86/fft_init.c | 2 + libavcodec/x86/flacdsp_init.c | 8 +- libavcodec/x86/g722dsp_init.c | 2 + libavcodec/x86/h263dsp_init.c | 2 + libavcodec/x86/h264_intrapred_init.c | 2 + libavcodec/x86/h264chroma_init.c | 2 + libavcodec/x86/hevcdsp_init.c | 465 +++-- libavcodec/x86/hpeldsp_init.c | 2 + libavcodec/x86/hpeldsp_vp3_init.c | 2 + libavcodec/x86/huffyuvdsp_init.c | 2 + libavcodec/x86/huffyuvencdsp_init.c| 2 + libavcodec/x86/idctdsp_init.c | 11 +- libavcodec/x86/jpeg2000dsp_init.c | 2 + libavcodec/x86/lossless_videodsp_init.c| 2 + libavcodec/x86/lossless_videoencdsp_init.c | 2 + libavcodec/x86/mdct15_init.c | 2 + libavcodec/x86/me_cmp_init.c | 2 + libavcodec/x86/mlpdsp_init.c | 8 +- libavcodec/x86/mpegvideoencdsp_init.c | 2 + libavcodec/x86/opusdsp_init.c | 2 + libavcodec/x86/pixblockdsp_init.c | 2 + libavcodec/x86/pngdsp_init.c | 2 + libavcodec/x86/proresdsp_init.c| 2 + libavcodec/x86/rv34dsp_init.c | 2 + libavcodec/x86/sbcdsp_init.c | 2 + libavcodec/x86/sbrdsp_init.c | 2 + libavcodec/x86/svq1enc_init.c | 2 + libavcodec/x86/utvideodsp_init.c | 2 + libavcodec/x86/v210enc_init.c | 2 + libavcodec/x86/vc1dsp_init.c | 6 +- libavcodec/x86/vorbisdsp_init.c| 2 + libavcodec/x86/vp3dsp_init.c | 2 + libavcodec/x86/vp6dsp_init.c | 2 + libavfilter/x86/af_afir_init.c | 2 + libavfilter/x86/af_anlmdn_init.c | 2 + libavfilter/x86/af_volume_init.c | 2 + libavfilter/x86/avf_showcqt_init.c | 2 + libavfilter/x86/colorspacedsp_init.c | 6 +- libavfilter/x86/vf_atadenoise_init.c | 8 +- libavfilter/x86/vf_blend_init.c| 2 + libavfilter/x86/vf_bwdif_init.c| 2 + libavfilter/x86/vf_convolution_init.c | 2 + libavfilter/x86/vf_framerate_init.c| 2 + libavfilter/x86/vf_fspp_init.c | 2 + libavfilter/x86/vf_gblur_init.c| 2 + libavfilter/x86/vf_hflip_init.c| 2 + libavfilter/x86