Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 1/5] avcodec/ppc/hpeldsp_altivec: Fix left-shift of negative number
Date: Mon, 1 Apr 2024 20:41:00 +0200
Message-ID: <GV1P250MB0737F16F5C44660928E6793E8F3F2@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <GV1P250MB07377A6CF76BB88E41854D698F3A2@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM>

Andreas Rheinhardt:
> It is UB and affected e.g. the vp5 and vp61 FATE tests:
> https://fate.ffmpeg.org/report.cgi?time=20240327083327&slot=ppc-linux-gcc-13.2-ubsan-altivec-qemu
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavcodec/ppc/hpeldsp_altivec.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/ppc/hpeldsp_altivec.c b/libavcodec/ppc/hpeldsp_altivec.c
> index a531b6b6ec..4bf6b28ed6 100644
> --- a/libavcodec/ppc/hpeldsp_altivec.c
> +++ b/libavcodec/ppc/hpeldsp_altivec.c
> @@ -41,9 +41,9 @@ void ff_put_pixels16_altivec(uint8_t *block, const uint8_t *pixels, ptrdiff_t li
>      register vector unsigned char pixelsv1D;
>  
>      int i;
> -    register ptrdiff_t line_size_2 = line_size << 1;
> +    register ptrdiff_t line_size_2 = line_size * (1 << 1);
>      register ptrdiff_t line_size_3 = line_size + line_size_2;
> -    register ptrdiff_t line_size_4 = line_size << 2;
> +    register ptrdiff_t line_size_4 = line_size * (1 << 2);
>  
>  // hand-unrolling the loop by 4 gains about 15%
>  // mininum execution time goes from 74 to 60 cycles

Will apply the remainder of this patchset tomorrow unless there are
objections.

- Andreas

_______________________________________________
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:[~2024-04-01 18:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29  3:23 Andreas Rheinhardt
2024-03-29  3:24 ` [FFmpeg-devel] [PATCH 2/5] fate/ffmpeg: Explicitly set pix fmt for sub2video tests Andreas Rheinhardt
2024-03-29 14:28   ` Sean McGovern
2024-03-29 14:45     ` Andreas Rheinhardt
2024-03-29  3:24 ` [FFmpeg-devel] [PATCH 3/5] avcodec/pngdsp: Fix unaligned accesses, effective type violations Andreas Rheinhardt
2024-03-29  3:24 ` [FFmpeg-devel] [PATCH 4/5] avfilter/vf_spp: Fix left-shift of negative value Andreas Rheinhardt
2024-03-29  3:24 ` [FFmpeg-devel] [PATCH 5/5] avcodec/huffyuvencdsp: Fix load of misaligned values Andreas Rheinhardt
2024-03-29 16:45 ` [FFmpeg-devel] [PATCH 6/6] fate/image: Fix EXR tests on big endian Andreas Rheinhardt
2024-03-30 18:28   ` Sean McGovern
2024-03-29 18:07 ` [FFmpeg-devel] [PATCH 7/7] fate/video: Only use bitexact IDCT in avid meridian Andreas Rheinhardt
2024-03-29 18:11 ` [FFmpeg-devel] [PATCH 8/8] fate/filter-video: Always use little endian pixel format Andreas Rheinhardt
2024-03-29 18:26 ` [FFmpeg-devel] [PATCH 9/9] fate/filter-video: Insert scale, format filters in filter-yadif tests Andreas Rheinhardt
2024-03-29 18:45 ` [FFmpeg-devel] [PATCH v2 9/9] fate/filter-video: Insert scale, format filters in filter-yadif, bwdif10 Andreas Rheinhardt
2024-03-30  3:15 ` [FFmpeg-devel] [PATCH 10/12] fate/fits: Fix tests on BE Andreas Rheinhardt
2024-03-30  3:15 ` [FFmpeg-devel] [PATCH 11/12] avcodec/vlc, bitstream: Fix multi VLC with uint8_t syms " Andreas Rheinhardt
2024-03-30  3:15 ` [FFmpeg-devel] [PATCH 12/12] avcodec/vlc: Use union of uint8_t and uint16_t in VLC_MULTI_ELEM Andreas Rheinhardt
2024-03-30  3:39 ` [FFmpeg-devel] [PATCH v2 " Andreas Rheinhardt
2024-04-01 18:41 ` Andreas Rheinhardt [this message]

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=GV1P250MB0737F16F5C44660928E6793E8F3F2@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \
    --to=andreas.rheinhardt@outlook.com \
    --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