mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
Fix alpha overflow when converting from RGBA64 to RGBA.
Fixes converting the sample from ticket #503 to 32bit RGB.
This commit is contained in:
parent
409a3bda07
commit
4a9f466b99
1 changed files with 2 additions and 2 deletions
|
|
@ -1040,8 +1040,8 @@ yuv2rgb_1_c_template(SwsContext *c, const int16_t *buf0,
|
|||
*b = c->table_bU[U + YUVRGB_TABLE_HEADROOM];
|
||||
|
||||
if (hasAlpha) {
|
||||
A1 = (abuf0[i * 2 ] + 64) >> 7;
|
||||
A2 = (abuf0[i * 2 + 1] + 64) >> 7;
|
||||
A1 = abuf0[i * 2 ] * 255 + 16384 >> 15;
|
||||
A2 = abuf0[i * 2 + 1] * 255 + 16384 >> 15;
|
||||
}
|
||||
|
||||
yuv2rgb_write(dest, i, Y1, Y2, hasAlpha ? A1 : 0, hasAlpha ? A2 : 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue