Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Anton Khirnov <anton@khirnov.net>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH v2 26/33] avutil: remove FF_API_DECLARE_ALIGNED
Date: Sat,  4 Feb 2023 11:41:57 +0100
Message-ID: <20230204104204.20721-27-anton@khirnov.net> (raw)
In-Reply-To: <20230204104204.20721-1-anton@khirnov.net>

From: James Almer <jamrial@gmail.com>

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/qdmc.c        |  1 +
 libavutil/mem.h          | 80 ----------------------------------------
 libavutil/mem_internal.h |  2 -
 libavutil/version.h      |  1 -
 4 files changed, 1 insertion(+), 83 deletions(-)

diff --git a/libavcodec/qdmc.c b/libavcodec/qdmc.c
index 4b582dc3491..081c4dd46f0 100644
--- a/libavcodec/qdmc.c
+++ b/libavcodec/qdmc.c
@@ -25,6 +25,7 @@
 #define BITSTREAM_READER_LE
 
 #include "libavutil/channel_layout.h"
+#include "libavutil/mem_internal.h"
 #include "libavutil/thread.h"
 #include "libavutil/tx.h"
 
diff --git a/libavutil/mem.h b/libavutil/mem.h
index c9c4fcf1ff0..b093b3b5cb0 100644
--- a/libavutil/mem.h
+++ b/libavutil/mem.h
@@ -51,86 +51,6 @@
  * @{
  */
 
-#if FF_API_DECLARE_ALIGNED
-/**
- *
- * @defgroup lavu_mem_macros Alignment Macros
- * Helper macros for declaring aligned variables.
- * @{
- */
-
-/**
- * @def DECLARE_ALIGNED(n,t,v)
- * Declare a variable that is aligned in memory.
- *
- * @code{.c}
- * DECLARE_ALIGNED(16, uint16_t, aligned_int) = 42;
- * DECLARE_ALIGNED(32, uint8_t, aligned_array)[128];
- *
- * // The default-alignment equivalent would be
- * uint16_t aligned_int = 42;
- * uint8_t aligned_array[128];
- * @endcode
- *
- * @param n Minimum alignment in bytes
- * @param t Type of the variable (or array element)
- * @param v Name of the variable
- */
-
-/**
- * @def DECLARE_ASM_ALIGNED(n,t,v)
- * Declare an aligned variable appropriate for use in inline assembly code.
- *
- * @code{.c}
- * DECLARE_ASM_ALIGNED(16, uint64_t, pw_08) = UINT64_C(0x0008000800080008);
- * @endcode
- *
- * @param n Minimum alignment in bytes
- * @param t Type of the variable (or array element)
- * @param v Name of the variable
- */
-
-/**
- * @def DECLARE_ASM_CONST(n,t,v)
- * Declare a static constant aligned variable appropriate for use in inline
- * assembly code.
- *
- * @code{.c}
- * DECLARE_ASM_CONST(16, uint64_t, pw_08) = UINT64_C(0x0008000800080008);
- * @endcode
- *
- * @param n Minimum alignment in bytes
- * @param t Type of the variable (or array element)
- * @param v Name of the variable
- */
-
-#if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1110 || defined(__SUNPRO_C)
-    #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (n))) v
-    #define DECLARE_ASM_ALIGNED(n,t,v)  t __attribute__ ((aligned (n))) v
-    #define DECLARE_ASM_CONST(n,t,v)    const t __attribute__ ((aligned (n))) v
-#elif defined(__DJGPP__)
-    #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (FFMIN(n, 16)))) v
-    #define DECLARE_ASM_ALIGNED(n,t,v)  t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v
-    #define DECLARE_ASM_CONST(n,t,v)    static const t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v
-#elif defined(__GNUC__) || defined(__clang__)
-    #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (n))) v
-    #define DECLARE_ASM_ALIGNED(n,t,v)  t av_used __attribute__ ((aligned (n))) v
-    #define DECLARE_ASM_CONST(n,t,v)    static const t av_used __attribute__ ((aligned (n))) v
-#elif defined(_MSC_VER)
-    #define DECLARE_ALIGNED(n,t,v)      __declspec(align(n)) t v
-    #define DECLARE_ASM_ALIGNED(n,t,v)  __declspec(align(n)) t v
-    #define DECLARE_ASM_CONST(n,t,v)    __declspec(align(n)) static const t v
-#else
-    #define DECLARE_ALIGNED(n,t,v)      t v
-    #define DECLARE_ASM_ALIGNED(n,t,v)  t v
-    #define DECLARE_ASM_CONST(n,t,v)    static const t v
-#endif
-
-/**
- * @}
- */
-#endif
-
 /**
  * @defgroup lavu_mem_attrs Function Attributes
  * Function attributes applicable to memory handling functions.
diff --git a/libavutil/mem_internal.h b/libavutil/mem_internal.h
index 955e31a6981..2448c606f19 100644
--- a/libavutil/mem_internal.h
+++ b/libavutil/mem_internal.h
@@ -30,7 +30,6 @@
 #include "mem.h"
 #include "version.h"
 
-#if !FF_API_DECLARE_ALIGNED
 /**
  * @def DECLARE_ALIGNED(n,t,v)
  * Declare a variable that is aligned in memory.
@@ -97,7 +96,6 @@
     #define DECLARE_ASM_ALIGNED(n,t,v)  t v
     #define DECLARE_ASM_CONST(n,t,v)    static const t v
 #endif
-#endif
 
 // Some broken preprocessors need a second expansion
 // to be forced to tokenize __VA_ARGS__
diff --git a/libavutil/version.h b/libavutil/version.h
index 38769962cc3..6014743947c 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -105,7 +105,6 @@
  * @{
  */
 
-#define FF_API_DECLARE_ALIGNED          (LIBAVUTIL_VERSION_MAJOR < 58)
 #define FF_API_COLORSPACE_NAME          (LIBAVUTIL_VERSION_MAJOR < 58)
 #define FF_API_AV_MALLOCZ_ARRAY         (LIBAVUTIL_VERSION_MAJOR < 58)
 #define FF_API_FIFO_PEEK2               (LIBAVUTIL_VERSION_MAJOR < 58)
-- 
2.35.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-request@ffmpeg.org with subject "unsubscribe".

  parent reply	other threads:[~2023-02-04 10:48 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-04 10:41 [FFmpeg-devel] [PATCH v2] Major library version bump Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 01/33] avformat/avformat: Remove AVOutputFormat.data_codec Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 02/33] avformat/avformat: Move codecpar up in AVStream Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 03/33] avcodec: Make avcodec_decode_subtitle2 accept a const AVPacket* Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 04/33] avformat/demux: Avoid stack packet when decoding frame Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 05/33] avformat/avformat: Move AVOutputFormat internals out of public header Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 06/33] avcodec/avcodec: Remove AV_CODEC_FLAG2_DROP_FRAME_TIMECODE Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 07/33] avcodec: remove FF_API_OPENH264_SLICE_MODE Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 08/33] avcodec: remove FF_API_OPENH264_CABAC Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 09/33] avcodec: remove FF_API_UNUSED_CODEC_CAPS Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 10/33] avcodec: remove FF_API_THREAD_SAFE_CALLBACKS Anton Khirnov
2023-02-05 21:04   ` Michael Niedermayer
2023-02-07  7:58     ` [FFmpeg-devel] [PATCH v2.5 " Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 11/33] avcodec: remove FF_API_DEBUG_MV Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 12/33] avcodec: remove FF_API_GET_FRAME_CLASS Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 13/33] avcodec: remove FF_API_AUTO_THREADS Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 14/33] avcodec: remove FF_API_AVCTX_TIMEBASE Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 15/33] avcodec: remove FF_API_FLAG_TRUNCATED Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 16/33] avcodec: remove FF_API_SUB_TEXT_FORMAT Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 17/33] avformat: remove FF_API_LAVF_PRIV_OPT Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 18/33] avformat: remove FF_API_AVIOCONTEXT_WRITTEN Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 19/33] avformat: remove FF_HLS_TS_OPTIONS Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 20/33] avformat: remove FF_API_AVSTREAM_CLASS Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 21/33] avfilter: remove FF_API_SWS_PARAM_OPTION Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 22/33] avfilter: remove FF_API_BUFFERSINK_ALLOC Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 23/33] avfilter: remove FF_API_PAD_COUNT Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 24/33] avdevice: remove FF_API_DEVICE_CAPABILITIES Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 25/33] avutil: remove FF_API_D2STR Anton Khirnov
2023-02-04 10:41 ` Anton Khirnov [this message]
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 27/33] avutil: remove FF_API_COLORSPACE_NAME Anton Khirnov
2023-02-04 10:41 ` [FFmpeg-devel] [PATCH v2 28/33] avutil: remove FF_API_AV_MALLOCZ_ARRAY Anton Khirnov
2023-02-04 10:42 ` [FFmpeg-devel] [PATCH v2 29/33] avutil/{color_utils, csp}: merge color_utils into csp and expose API Anton Khirnov
2023-02-04 16:27   ` Ronald S. Bultje
2023-02-04 10:42 ` [FFmpeg-devel] [PATCH v2 30/33] avutil/version: postpone the remaining API deprecations Anton Khirnov
2023-02-04 10:42 ` [FFmpeg-devel] [PATCH v2 31/33] avcodec/version: " Anton Khirnov
2023-02-04 10:42 ` [FFmpeg-devel] [PATCH v2 32/33] avformat/version: " Anton Khirnov
2023-02-04 10:42 ` [FFmpeg-devel] [PATCH v2 33/33] Bump major versions of all libraries Anton Khirnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230204104204.20721-27-anton@khirnov.net \
    --to=anton@khirnov.net \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git