[FFmpeg-cvslog] avutil/intreadwrite: add missing aligned read/write macros

James Almer git at videolan.org
Tue Jul 30 03:33:30 EEST 2024


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Jul 25 23:15:32 2024 -0300| [753f2aeed768fba7227e142e59ac29e307ab201a] | committer: James Almer

avutil/intreadwrite: add missing aligned read/write macros

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=753f2aeed768fba7227e142e59ac29e307ab201a
---

 doc/APIchanges           |  3 +++
 libavutil/intreadwrite.h | 39 +++++++++++++++++++++++++++++++++++++++
 libavutil/version.h      |  2 +-
 3 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index fb1e7e2dd8..6937718e83 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07
 
 API changes, most recent first:
 
+2024-07-29 - xxxxxxxxx - lavu 59.31.100 - intreadwrite.h
+  Add AV_{R,W}{L,B}{16,32}A and AV_{R,W}B64A.
+
 2024-07-28 - xxxxxxxxxx - lavu 59.30.100 - dovi_meta.h
   Add AVDOVIDecoderConfigurationRecord.dv_md_compression.
 
diff --git a/libavutil/intreadwrite.h b/libavutil/intreadwrite.h
index 8abc3b9105..120bdbc8f0 100644
--- a/libavutil/intreadwrite.h
+++ b/libavutil/intreadwrite.h
@@ -539,9 +539,41 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias;
 #if AV_HAVE_BIGENDIAN
 #   define AV_RLA(s, p)    av_bswap##s(AV_RN##s##A(p))
 #   define AV_WLA(s, p, v) AV_WN##s##A(p, av_bswap##s(v))
+#   define AV_RBA(s, p)    AV_RN##s##A(p)
+#   define AV_WBA(s, p, v) AV_WN##s##A(p, v)
 #else
 #   define AV_RLA(s, p)    AV_RN##s##A(p)
 #   define AV_WLA(s, p, v) AV_WN##s##A(p, v)
+#   define AV_RBA(s, p)    av_bswap##s(AV_RN##s##A(p))
+#   define AV_WBA(s, p, v) AV_WN##s##A(p, av_bswap##s(v))
+#endif
+
+#ifndef AV_RL16A
+#   define AV_RL16A(p) AV_RLA(16, p)
+#endif
+#ifndef AV_WL16A
+#   define AV_WL16A(p, v) AV_WLA(16, p, v)
+#endif
+
+#ifndef AV_RB16A
+#   define AV_RB16A(p) AV_RBA(16, p)
+#endif
+#ifndef AV_WB16A
+#   define AV_WB16A(p, v) AV_WBA(16, p, v)
+#endif
+
+#ifndef AV_RL32A
+#   define AV_RL32A(p) AV_RLA(32, p)
+#endif
+#ifndef AV_WL32A
+#   define AV_WL32A(p, v) AV_WLA(32, p, v)
+#endif
+
+#ifndef AV_RB32A
+#   define AV_RB32A(p) AV_RBA(32, p)
+#endif
+#ifndef AV_WB32A
+#   define AV_WB32A(p, v) AV_WBA(32, p, v)
 #endif
 
 #ifndef AV_RL64A
@@ -551,6 +583,13 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias;
 #   define AV_WL64A(p, v) AV_WLA(64, p, v)
 #endif
 
+#ifndef AV_RB64A
+#   define AV_RB64A(p) AV_RBA(64, p)
+#endif
+#ifndef AV_WB64A
+#   define AV_WB64A(p, v) AV_WBA(64, p, v)
+#endif
+
 /*
  * The AV_COPYxxU macros are suitable for copying data to/from unaligned
  * memory locations.
diff --git a/libavutil/version.h b/libavutil/version.h
index 028d072873..24418600f0 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -79,7 +79,7 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR  59
-#define LIBAVUTIL_VERSION_MINOR  30
+#define LIBAVUTIL_VERSION_MINOR  31
 #define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \



More information about the ffmpeg-cvslog mailing list