History

swscale/swscale_unscaled: fix planarRgbToplanarRgbWrapper() for formats with bpc between 9-14 bits

Currently, planarRgbToplanarRgbWrapper() always sets the alpha value to 255, without taking the bit depth into consideration. This commit restricts the alpha value to the bit depth.

Ramiro Polla committed 1 year ago

Commit d028cf01 parent 748e9601 file · +9 −2Browse files

Unified · Split

libswscale/swscale_unscaled.c+9−2
@@ -1378,8 +1378,15 @@ static int planarRgbToplanarRgbWrapper(SwsInternal *c, · 1377 unmodified lines
1378 dst[1], dstStride[1]);1378 dst[1], dstStride[1]);
1379 ff_copyPlane(src[2], srcStride[2], srcSliceY, srcSliceH, c->opts.src_w,1379 ff_copyPlane(src[2], srcStride[2], srcSliceY, srcSliceH, c->opts.src_w,
1380 dst[2], dstStride[2]);1380 dst[2], dstStride[2]);
1381 if (dst[3])1381 if (dst[3]) {
1382 fillPlane(dst[3], dstStride[3], c->opts.src_w, srcSliceH, srcSliceY, 255);1382 if (is16BPS(c->opts.dst_format) || isNBPS(c->opts.dst_format)) {
1383 const AVPixFmtDescriptor *desc_dst = av_pix_fmt_desc_get(c->opts.dst_format);
1384 fillPlane16(dst[3], dstStride[3], c->opts.src_w, srcSliceH, srcSliceY, 1,
1385 desc_dst->comp[3].depth, isBE(c->opts.dst_format));
1386 } else {
1387 fillPlane(dst[3], dstStride[3], c->opts.src_w, srcSliceH, srcSliceY, 255);
1388 }
1389 }
1383 1390
1384 return srcSliceH;1391 return srcSliceH;
1385}1392}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t