[libbluray-devel] BDGraphics: optimize scaling of transparent areas
Ian Curtis
git at videolan.org
Fri Apr 11 12:42:30 CEST 2014
libbluray | branch: master | Ian Curtis <i.curtis at gmail.com> | Mon Apr 7 11:21:32 2014 +0300| [36f17664cd0103680f9c011114d9f0d9322e98c3] | committer: hpi1
BDGraphics: optimize scaling of transparent areas
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=36f17664cd0103680f9c011114d9f0d9322e98c3
---
src/libbluray/bdj/java/java/awt/BDGraphicsBase.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java b/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java
index a4762c5..491ad7d 100644
--- a/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java
+++ b/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java
@@ -1141,6 +1141,11 @@ abstract class BDGraphicsBase extends Graphics2D implements ConstrainableGraphic
int cA = (c >> 24) & 0xff;
int dA = (d >> 24) & 0xff;
+ if (aA + bA + cA + dA < 1) {
+ outImage[position++] = 0;
+ continue;
+ }
+
// blue element
// Yb = Ab(1-w)(1-h) + Bb(w)(1-h) + Cb(h)(1-w) + Db(wh)
blue = (a & 0xff) * (1-x_diff) * (1-y_diff) * aA +
More information about the libbluray-devel
mailing list