lavu/riscv: fix av_clip_int16

Some serious copy-paste / squash / rebase mismanipulation here.

Signed-off-by: James Almer <jamrial@gmail.com>
pull/388/head
Rémi Denis-Courmont 2 years ago committed by James Almer
parent e867a29ec1
commit a5ce44f301
  1. 4
      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;
}

Loading…
Cancel
Save