File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff 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, "
You can’t perform that action at this time.
0 commit comments