* [FFmpeg-devel] [PATCH 2/4] avcodec/amfenc_av1: use AV_WL32A
2024-07-26 2:15 [FFmpeg-devel] [PATCH 1/4] avutil/intreadwrite: add missing aligned read/write macros James Almer
@ 2024-07-26 2:15 ` James Almer
2024-07-26 2:15 ` [FFmpeg-devel] [PATCH 3/4] avformat/matroskadec: " James Almer
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: James Almer @ 2024-07-26 2:15 UTC (permalink / raw)
To: ffmpeg-devel
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavcodec/amfenc_av1.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavcodec/amfenc_av1.c b/libavcodec/amfenc_av1.c
index d984779063..97d1ea025c 100644
--- a/libavcodec/amfenc_av1.c
+++ b/libavcodec/amfenc_av1.c
@@ -535,10 +535,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
avctx->nb_coded_side_data++;
//top, bottom, left,right
- AV_WL32(crop + 0, 0);
- AV_WL32(crop + 1, crop_bottom);
- AV_WL32(crop + 2, 0);
- AV_WL32(crop + 3, crop_right);
+ AV_WL32A(crop + 0, 0);
+ AV_WL32A(crop + 1, crop_bottom);
+ AV_WL32A(crop + 2, 0);
+ AV_WL32A, crop + 3, crop_right);
avctx->coded_side_data[avctx->nb_coded_side_data - 1].type = AV_PKT_DATA_FRAME_CROPPING;
avctx->coded_side_data[avctx->nb_coded_side_data - 1].data = (uint8_t*)crop;
--
2.45.2
_______________________________________________
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".
^ permalink raw reply [flat|nested] 6+ messages in thread
* [FFmpeg-devel] [PATCH 3/4] avformat/matroskadec: use AV_WL32A
2024-07-26 2:15 [FFmpeg-devel] [PATCH 1/4] avutil/intreadwrite: add missing aligned read/write macros James Almer
2024-07-26 2:15 ` [FFmpeg-devel] [PATCH 2/4] avcodec/amfenc_av1: use AV_WL32A James Almer
@ 2024-07-26 2:15 ` James Almer
2024-07-26 2:15 ` [FFmpeg-devel] [PATCH 4/4] avformat/mov: use AV_WL*A James Almer
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: James Almer @ 2024-07-26 2:15 UTC (permalink / raw)
To: ffmpeg-devel
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavformat/matroskadec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index aa28a37da4..c8741ff2af 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -4059,9 +4059,9 @@ static int matroska_parse_frame(MatroskaDemuxContext *matroska,
(AVRational){1, 1000000000},
(AVRational){1, st->codecpar->sample_rate});
if (discard_padding > 0) {
- AV_WL32(side_data + 4, discard_padding);
+ AV_WL32A(side_data + 4, discard_padding);
} else {
- AV_WL32(side_data, -discard_padding);
+ AV_WL32A(side_data, -discard_padding);
}
}
--
2.45.2
_______________________________________________
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".
^ permalink raw reply [flat|nested] 6+ messages in thread
* [FFmpeg-devel] [PATCH 4/4] avformat/mov: use AV_WL*A
2024-07-26 2:15 [FFmpeg-devel] [PATCH 1/4] avutil/intreadwrite: add missing aligned read/write macros James Almer
2024-07-26 2:15 ` [FFmpeg-devel] [PATCH 2/4] avcodec/amfenc_av1: use AV_WL32A James Almer
2024-07-26 2:15 ` [FFmpeg-devel] [PATCH 3/4] avformat/matroskadec: " James Almer
@ 2024-07-26 2:15 ` James Almer
2024-07-26 5:47 ` [FFmpeg-devel] [PATCH 1/4] avutil/intreadwrite: add missing aligned read/write macros Rémi Denis-Courmont
2024-07-30 0:26 ` James Almer
4 siblings, 0 replies; 6+ messages in thread
From: James Almer @ 2024-07-26 2:15 UTC (permalink / raw)
To: ffmpeg-devel
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavformat/mov.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index b74e43e214..a8e342dc4f 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1282,10 +1282,10 @@ static int mov_read_clap(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (!sd)
return AVERROR(ENOMEM);
- AV_WL32(sd->data, top);
- AV_WL32(sd->data + 4, bottom);
- AV_WL32(sd->data + 8, left);
- AV_WL32(sd->data + 12, right);
+ AV_WL32A(sd->data, top);
+ AV_WL32A(sd->data + 4, bottom);
+ AV_WL32A(sd->data + 8, left);
+ AV_WL32A(sd->data + 12, right);
return 0;
}
@@ -8170,8 +8170,8 @@ static int mov_read_dops(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if ((ret = ff_alloc_extradata(st->codecpar, size)) < 0)
return ret;
- AV_WL32(st->codecpar->extradata, MKTAG('O','p','u','s'));
- AV_WL32(st->codecpar->extradata + 4, MKTAG('H','e','a','d'));
+ AV_WL32A(st->codecpar->extradata, MKTAG('O','p','u','s'));
+ AV_WL32A(st->codecpar->extradata + 4, MKTAG('H','e','a','d'));
AV_WB8(st->codecpar->extradata + 8, 1); /* OpusHead version */
avio_read(pb, st->codecpar->extradata + 9, size - 9);
@@ -8179,10 +8179,10 @@ static int mov_read_dops(MOVContext *c, AVIOContext *pb, MOVAtom atom)
little-endian; aside from the preceeding magic and version they're
otherwise currently identical. Data after output gain at offset 16
doesn't need to be bytewapped. */
- pre_skip = AV_RB16(st->codecpar->extradata + 10);
- AV_WL16(st->codecpar->extradata + 10, pre_skip);
- AV_WL32(st->codecpar->extradata + 12, AV_RB32(st->codecpar->extradata + 12));
- AV_WL16(st->codecpar->extradata + 16, AV_RB16(st->codecpar->extradata + 16));
+ pre_skip = AV_RB16A(st->codecpar->extradata + 10);
+ AV_WL16A(st->codecpar->extradata + 10, pre_skip);
+ AV_WL32A(st->codecpar->extradata + 12, AV_RB32A(st->codecpar->extradata + 12));
+ AV_WL16A(st->codecpar->extradata + 16, AV_RB16A(st->codecpar->extradata + 16));
st->codecpar->initial_padding = pre_skip;
st->codecpar->seek_preroll = av_rescale_q(OPUS_SEEK_PREROLL_MS,
--
2.45.2
_______________________________________________
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".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/4] avutil/intreadwrite: add missing aligned read/write macros
2024-07-26 2:15 [FFmpeg-devel] [PATCH 1/4] avutil/intreadwrite: add missing aligned read/write macros James Almer
` (2 preceding siblings ...)
2024-07-26 2:15 ` [FFmpeg-devel] [PATCH 4/4] avformat/mov: use AV_WL*A James Almer
@ 2024-07-26 5:47 ` Rémi Denis-Courmont
2024-07-30 0:26 ` James Almer
4 siblings, 0 replies; 6+ messages in thread
From: Rémi Denis-Courmont @ 2024-07-26 5:47 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Le 26 juillet 2024 05:15:32 GMT+03:00, James Almer <jamrial@gmail.com> a écrit :
>Signed-off-by: James Almer <jamrial@gmail.com>
>---
> doc/APIchanges | 3 +++
> libavutil/intreadwrite.h | 39 +++++++++++++++++++++++++++++++++++++++
> libavutil/version.h | 2 +-
> 3 files changed, 43 insertions(+), 1 deletion(-)
LGTM
>
>diff --git a/doc/APIchanges b/doc/APIchanges
>index fb54c3fbc9..d26e05e0ff 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-26 - xxxxxxxxx - lavu 59.30.100 - cpu.h
>+ Add AV_{R,W}{L,B}{16,32}A and AV_{R,W}B64A.
>+
> 2024-07-25 - xxxxxxxxx - lavu 59.29.100 - cpu.h
> Add AV_CPU_FLAG_RVB.
>
>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 852eeef1d6..028d072873 100644
>--- a/libavutil/version.h
>+++ b/libavutil/version.h
>@@ -79,7 +79,7 @@
> */
>
> #define LIBAVUTIL_VERSION_MAJOR 59
>-#define LIBAVUTIL_VERSION_MINOR 29
>+#define LIBAVUTIL_VERSION_MINOR 30
> #define LIBAVUTIL_VERSION_MICRO 100
>
> #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
_______________________________________________
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".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/4] avutil/intreadwrite: add missing aligned read/write macros
2024-07-26 2:15 [FFmpeg-devel] [PATCH 1/4] avutil/intreadwrite: add missing aligned read/write macros James Almer
` (3 preceding siblings ...)
2024-07-26 5:47 ` [FFmpeg-devel] [PATCH 1/4] avutil/intreadwrite: add missing aligned read/write macros Rémi Denis-Courmont
@ 2024-07-30 0:26 ` James Almer
4 siblings, 0 replies; 6+ messages in thread
From: James Almer @ 2024-07-30 0:26 UTC (permalink / raw)
To: ffmpeg-devel
On 7/25/2024 11:15 PM, James Almer wrote:
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
> doc/APIchanges | 3 +++
> libavutil/intreadwrite.h | 39 +++++++++++++++++++++++++++++++++++++++
> libavutil/version.h | 2 +-
> 3 files changed, 43 insertions(+), 1 deletion(-)
Will apply set.
_______________________________________________
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".
^ permalink raw reply [flat|nested] 6+ messages in thread