mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-29 13:39:06 +00:00
Premultiply YUVA alpha in FFMpegReaderImplementation.
This commit is contained in:
parent
9b59ef00af
commit
846cabeda5
@ -240,7 +240,7 @@ bool FFMpegReaderImplementation::renderFrame(QImage &to, bool &hasAlpha, const Q
|
|||||||
int toLinesize[AV_NUM_DATA_POINTERS] = { int(to.bytesPerLine()), 0 };
|
int toLinesize[AV_NUM_DATA_POINTERS] = { int(to.bytesPerLine()), 0 };
|
||||||
sws_scale(_swsContext, _frame->data, _frame->linesize, 0, _frame->height, toData, toLinesize);
|
sws_scale(_swsContext, _frame->data, _frame->linesize, 0, _frame->height, toData, toLinesize);
|
||||||
}
|
}
|
||||||
if (bgra) {
|
if (hasAlpha) {
|
||||||
FFmpeg::PremultiplyInplace(to);
|
FFmpeg::PremultiplyInplace(to);
|
||||||
}
|
}
|
||||||
if (_rotation != Rotation::None) {
|
if (_rotation != Rotation::None) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user