Skip to content

Commit b3a4648

Browse files
authored
Merge pull request #6 from umjammer/0.2.6
0.2.6
2 parents 4832560 + db9a42b commit b3a4648

File tree

16 files changed

+629
-1039
lines changed

16 files changed

+629
-1039
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
# vavi-image-webp
88

9-
<img src="https://upload.wikimedia.org/wikipedia/commons/0/00/WebP_logo_2010.png" width="160" /><sub>© <a href="https://developers.google.com/speed/webp">Google</a></sub>
9+
<img alt="webp logo" src="https://upload.wikimedia.org/wikipedia/commons/0/00/WebP_logo_2010.png" width="100" /> <sub>© <a href="https://developers.google.com/speed/webp">Google</a></sub>
1010

1111
An implementation of the VP8 image/video codec in _**pure Java**_.
1212

1313
## Install
1414

15-
https://jitpack.io/#umjammer/vavi-image-webp
15+
* [maven](https://jitpack.io/#umjammer/vavi-image-webp)
1616

1717
## Usage
1818

@@ -23,3 +23,5 @@ https://jitpack.io/#umjammer/vavi-image-webp
2323
## Reference
2424

2525
* [Original](https://sourceforge.net/projects/javavp8decoder/)
26+
27+
## TODO

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>vavi</groupId>
55
<artifactId>vavi-image-webp</artifactId>
6-
<version>0.2.5</version>
6+
<version>0.2.6</version>
77

88
<name>Java VP8 Decoder</name>
99
<scm>
@@ -35,15 +35,15 @@
3535
<plugin>
3636
<groupId>org.apache.maven.plugins</groupId>
3737
<artifactId>maven-compiler-plugin</artifactId>
38-
<version>3.11.0</version>
38+
<version>3.12.1</version>
3939
<configuration>
4040
<release>17</release>
4141
</configuration>
4242
</plugin>
4343
<plugin>
4444
<groupId>org.apache.maven.plugins</groupId>
4545
<artifactId>maven-surefire-plugin</artifactId>
46-
<version>3.2.2</version>
46+
<version>3.2.5</version>
4747
<configuration>
4848
<argLine>
4949
-Djava.util.logging.config.file=${project.build.testOutputDirectory}/logging.properties
@@ -95,7 +95,7 @@
9595
<dependency>
9696
<groupId>org.junit</groupId>
9797
<artifactId>junit-bom</artifactId>
98-
<version>5.10.2</version>
98+
<version>5.12.2</version>
9999
<type>pom</type>
100100
<scope>import</scope>
101101
</dependency>
@@ -128,7 +128,7 @@
128128
<dependency>
129129
<groupId>com.github.umjammer</groupId>
130130
<artifactId>vavi-commons</artifactId>
131-
<version>1.1.10</version>
131+
<version>1.1.14</version>
132132
<scope>test</scope>
133133
</dependency>
134134
</dependencies>

src/main/java/net/sf/javavp8decoder/imageio/WebPImageReader.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
import java.awt.image.BufferedImage;
2222
import java.awt.image.DataBuffer;
2323
import java.io.IOException;
24+
import java.lang.System.Logger;
25+
import java.lang.System.Logger.Level;
2426
import java.util.ArrayList;
2527
import java.util.Iterator;
26-
import java.util.logging.Level;
27-
import java.util.logging.Logger;
2828

2929
import javax.imageio.IIOException;
3030
import javax.imageio.ImageReadParam;
@@ -37,10 +37,12 @@
3737

3838
import net.sf.javavp8decoder.vp8Decoder.VP8Frame;
3939

40+
import static java.lang.System.getLogger;
41+
4042

4143
public class WebPImageReader extends ImageReader implements IIOReadProgressListener {
4244

43-
private static final Logger logger = Logger.getLogger(WebPImageReader.class.getName());
45+
private static final Logger logger = getLogger(WebPImageReader.class.getName());
4446

4547
// Constants enumerating the values of colorType
4648
static final int COLOR_TYPE_GRAY = 0;
@@ -224,14 +226,10 @@ public void readHeader() throws IIOException {
224226
}
225227
decoder.decodeFrame(false);
226228
} catch (IOException e) {
227-
if (logger.isLoggable(Level.FINE)) {
228-
e.printStackTrace();
229-
}
229+
logger.log(Level.DEBUG, e.getMessage(), e);
230230
}
231231
} catch (IOException e) {
232-
if (logger.isLoggable(Level.FINE)) {
233-
e.printStackTrace();
234-
}
232+
logger.log(Level.DEBUG, e.getMessage(), e);
235233
}
236234
this.width = decoder.getWidth();
237235
this.height = decoder.getHeight();

src/main/java/net/sf/javavp8decoder/vp8Decoder/BoolDecoder.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424

2525
public class BoolDecoder {
26+
2627
/** # of bits shifted out of value, at most 7 */
2728
int bit_count;
2829

@@ -116,27 +117,27 @@ public int readLiteral(int num_bits) throws IOException {
116117
* @param p corresponding interior node probabilities
117118
*/
118119
int readTree(int[] t, int[] p) throws IOException {
119-
int i = 0; /* begin at root */
120+
int i = 0; // begin at root
120121

121-
/* Descend tree until leaf is reached */
122+
// Descend tree until leaf is reached
122123
while ((i = t[i + readBool(p[i >> 1])]) > 0) {
123124
}
124-
return -i; /* return value is negation of nonpositive index */
125125

126+
return -i; // return value is negation of nonpositive index
126127
}
127128

128129
/**
129130
* @param t tree specification
130131
* @param p corresponding interior node probabilities
131132
*/
132133
int readTreeSkip(int[] t, int[] p, int skip_branches) throws IOException {
133-
int i = skip_branches * 2; /* begin at root */
134+
int i = skip_branches * 2; // begin at root
134135

135-
/* Descend tree until leaf is reached */
136+
// Descend tree until leaf is reached
136137
while ((i = t[i + readBool(p[i >> 1])]) > 0) {
137138
}
138-
return -i; /* return value is negation of nonpositive index */
139139

140+
return -i; // return value is negation of nonpositive index
140141
}
141142

142143
public void seek() throws IOException {

src/main/java/net/sf/javavp8decoder/vp8Decoder/DeltaQ.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package net.sf.javavp8decoder.vp8Decoder;
1919

2020
public class DeltaQ {
21+
2122
public boolean update = false;
2223

2324
public int v = 0;

0 commit comments

Comments
 (0)