diff mbox series

[FFmpeg-devel] avcodec/x86/mpegvideoenc: remove av_assert2() for variable alignment

Message ID 20240822010523.2312-1-ramiro.polla@gmail.com
State New
Headers show
Series [FFmpeg-devel] avcodec/x86/mpegvideoenc: remove av_assert2() for variable alignment | expand

Checks

Context Check Description
yinshiyou/configure_loongarch64 warning Failed to apply patch
andriy/configure_x86 warning Failed to apply patch

Commit Message

Ramiro Polla Aug. 22, 2024, 1:05 a.m. UTC
It's safe to assume that LOCAL_ALIGNED_16 does indeed align. Otherwise
we would have many more problems...

This assert was added in f8188626 all the way back in 2003.
---
 libavcodec/x86/mpegvideoenc_template.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Ramiro Polla Aug. 28, 2024, 12:12 p.m. UTC | #1
On Thu, Aug 22, 2024 at 3:05 AM Ramiro Polla <ramiro.polla@gmail.com> wrote:
> It's safe to assume that LOCAL_ALIGNED_16 does indeed align. Otherwise
> we would have many more problems...
>
> This assert was added in f8188626 all the way back in 2003.
> ---
>  libavcodec/x86/mpegvideoenc_template.c | 2 --
>  1 file changed, 2 deletions(-)

I'll apply in a couple of days if there are no objections.
Ramiro Polla Sept. 3, 2024, 3:07 p.m. UTC | #2
On Wed, Aug 28, 2024 at 2:12 PM Ramiro Polla <ramiro.polla@gmail.com> wrote:
> On Thu, Aug 22, 2024 at 3:05 AM Ramiro Polla <ramiro.polla@gmail.com> wrote:
> > It's safe to assume that LOCAL_ALIGNED_16 does indeed align. Otherwise
> > we would have many more problems...
> >
> > This assert was added in f8188626 all the way back in 2003.
> > ---
> >  libavcodec/x86/mpegvideoenc_template.c | 2 --
> >  1 file changed, 2 deletions(-)
>
> I'll apply in a couple of days if there are no objections.

The patch I had sent was from another branch and thus didn't apply
cleanly, but it was a small change so I pushed it.
diff mbox series

Patch

diff --git a/libavcodec/x86/mpegvideoenc_template.c b/libavcodec/x86/mpegvideoenc_template.c
index eedbd752ac..3cc322b10e 100644
--- a/libavcodec/x86/mpegvideoenc_template.c
+++ b/libavcodec/x86/mpegvideoenc_template.c
@@ -101,8 +101,6 @@  static int RENAME(dct_quantize)(MpegEncContext *s,
     const uint8_t *scantable;
     const uint16_t *inv_scantable_p1;
 
-    av_assert2((7&(uintptr_t)(&temp_block[0])) == 0); //did gcc align it correctly?
-
     //s->fdct (block);
     RENAME_FDCT(ff_fdct)(block); // cannot be anything else ...