mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
e867a29ec1
commit
a5ce44f301
|
@ -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…
Reference in New Issue