lavu/riscv: fix av_clip_int16

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

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Rémi Denis-Courmont 2022-09-14 20:34:19 +03:00 committed by James Almer
parent e867a29ec1
commit a5ce44f301
1 changed files with 2 additions and 2 deletions

View File

@ -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 #define av_clip_int16 av_clip_int16_rvi
static av_always_inline av_const int16_t av_clip_int16_rvi(int a) 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) if (a != u.s)
a = ((a >> 31) ^ 0x7F); a = ((a >> 31) ^ 0x7FFF);
return a; return a;
} }