File tree 1 file changed +6
-9
lines changed
1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -121,17 +121,14 @@ void RafDecoder::decodeRawInternal() {
121
121
122
122
assert (!isCompressed ());
123
123
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)) {
125
126
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)) {
127
129
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)) {
135
132
bps = 12 ;
136
133
} else {
137
134
ThrowRDE (" Can not detect bitdepth. StripByteCounts = %u, width = %u, "
You can’t perform that action at this time.
0 commit comments