summaryrefslogtreecommitdiff
path: root/fitz/filt_predict.c
diff options
context:
space:
mode:
Diffstat (limited to 'fitz/filt_predict.c')
-rw-r--r--fitz/filt_predict.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fitz/filt_predict.c b/fitz/filt_predict.c
index e68743d3..5fbd7d1d 100644
--- a/fitz/filt_predict.c
+++ b/fitz/filt_predict.c
@@ -31,6 +31,7 @@ static inline int getcomponent(unsigned char *line, int x, int bpc)
case 2: return (line[x >> 2] >> ( ( 3 - (x & 3) ) << 1 ) ) & 3;
case 4: return (line[x >> 1] >> ( ( 1 - (x & 1) ) << 2 ) ) & 15;
case 8: return line[x];
+ case 16: return (line[x<<1]<<8)+line[(x<<1)+1];
}
return 0;
}
@@ -43,6 +44,7 @@ static inline void putcomponent(unsigned char *buf, int x, int bpc, int value)
case 2: buf[x >> 2] |= value << ((3 - (x & 3)) << 1); break;
case 4: buf[x >> 1] |= value << ((1 - (x & 1)) << 2); break;
case 8: buf[x] = value; break;
+ case 16: buf[x<<1] = value>>8; buf[(x<<1)+1] = value; break;
}
}