[FFmpeg-cvslog] lavu/riscv: fix av_clip_int16
Rémi Denis-Courmont
git at videolan.org
Wed Sep 14 20:38:32 EEST 2022
ffmpeg | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Sep 14 20:34:19 2022 +0300| [a5ce44f30108a0683a123354e52210a20026fb5c] | committer: James Almer
lavu/riscv: fix av_clip_int16
Some serious copy-paste / squash / rebase mismanipulation here.
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a5ce44f30108a0683a123354e52210a20026fb5c
---
libavutil/riscv/intmath.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavutil/riscv/intmath.h b/libavutil/riscv/intmath.h
index 78f7ba930a..3263a79dc4 100644
--- a/libavutil/riscv/intmath.h
+++ b/libavutil/riscv/intmath.h
@@ -41,10 +41,10 @@ static av_always_inline av_const int8_t av_clip_int8_rvi(int a)
#define av_clip_int16 av_clip_int16_rvi
static av_always_inline av_const int16_t av_clip_int16_rvi(int a)
{
- union { uint8_t u; int8_t s; } u = { .u = a };
+ union { uint16_t u; int16_t s; } u = { .u = a };
if (a != u.s)
- a = ((a >> 31) ^ 0x7F);
+ a = ((a >> 31) ^ 0x7FFF);
return a;
}
More information about the ffmpeg-cvslog
mailing list