Skip to content

Commit 2949e7e

Browse files
committed
fix repeated branches
1 parent d998bb4 commit 2949e7e

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/librawspeed/decoders/RafDecoder.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,14 @@ void RafDecoder::decodeRawInternal() {
121121

122122
assert(!isCompressed());
123123

124-
if (8UL * counts->getU32() >= 2UL * 16UL * width * height) {
124+
if ((8UL * counts->getU32() >= 2UL * 16UL * width * height)
125+
|| (8UL * counts->getU32() >= 16UL * width * height)) {
125126
bps = 16;
126-
} else if (8UL * counts->getU32() >= 2UL * 14UL * width * height) {
127+
} else if ((8UL * counts->getU32() >= 2UL * 14UL * width * height)
128+
|| (8UL * counts->getU32() >= 14UL * width * height)) {
127129
bps = 14;
128-
} else if (8UL * counts->getU32() >= 2UL * 12UL * width * height) {
129-
bps = 12;
130-
} else if (8UL * counts->getU32() >= 16UL * width * height) {
131-
bps = 16;
132-
} else if (8UL * counts->getU32() >= 14UL * width * height) {
133-
bps = 14;
134-
} else if (8UL * counts->getU32() >= 12UL * width * height) {
130+
} else if ((8UL * counts->getU32() >= 2UL * 12UL * width * height)
131+
|| (8UL * counts->getU32() >= 12UL * width * height)) {
135132
bps = 12;
136133
} else {
137134
ThrowRDE("Can not detect bitdepth. StripByteCounts = %u, width = %u, "

0 commit comments

Comments
 (0)