Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/5] avcodec/ppc/hpeldsp_altivec: Fix left-shift of negative number
@ 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
                   ` (13 more replies)
  0 siblings, 14 replies; 18+ messages in thread
From: Andreas Rheinhardt @ 2024-03-29  3:23 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: 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
-- 
2.40.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".

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-04-01 18:41 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-29  3:23 [FFmpeg-devel] [PATCH 1/5] avcodec/ppc/hpeldsp_altivec: Fix left-shift of negative number 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 ` [FFmpeg-devel] [PATCH 1/5] avcodec/ppc/hpeldsp_altivec: Fix left-shift of negative number Andreas Rheinhardt

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