summaryrefslogtreecommitdiff
path: root/libavcodec/mjpeg.h
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2007-05-17 16:29:11 +0000
committerAurelien Jacobs <aurel@gnuage.org>2007-05-17 16:29:11 +0000
commit4922a5b0ee9108e406b8b14356f19851702604d1 (patch)
tree6d0928a7c22b7f6ac714ac7a2a08fe5a77c02f0b /libavcodec/mjpeg.h
parent88bcb6c23f6d873b3cda84275dea0ab9e3b449b6 (diff)
downloadffmpeg-4922a5b0ee9108e406b8b14356f19851702604d1.tar.gz
split mjpeg.c into an encoder and a decoder file
Originally committed as revision 9048 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mjpeg.h')
-rw-r--r--libavcodec/mjpeg.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/libavcodec/mjpeg.h b/libavcodec/mjpeg.h
index ab546edd18..7030b1784c 100644
--- a/libavcodec/mjpeg.h
+++ b/libavcodec/mjpeg.h
@@ -192,4 +192,31 @@ typedef struct MJpegDecodeContext {
int cur_scan; /* current scan, used by JPEG-LS */
} MJpegDecodeContext;
+#define PREDICT(ret, topleft, top, left, predictor)\
+ switch(predictor){\
+ case 1: ret= left; break;\
+ case 2: ret= top; break;\
+ case 3: ret= topleft; break;\
+ case 4: ret= left + top - topleft; break;\
+ case 5: ret= left + ((top - topleft)>>1); break;\
+ case 6: ret= top + ((left - topleft)>>1); break;\
+ default:\
+ case 7: ret= (left + top)>>1; break;\
+ }
+
+extern const uint8_t bits_dc_luminance[];
+extern const uint8_t val_dc_luminance[];
+
+extern const uint8_t bits_dc_chrominance[];
+extern const uint8_t val_dc_chrominance[];
+
+extern const uint8_t bits_ac_luminance[];
+extern const uint8_t val_ac_luminance[];
+
+extern const uint8_t bits_ac_chrominance[];
+extern const uint8_t val_ac_chrominance[];
+
+void build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code,
+ const uint8_t *bits_table, const uint8_t *val_table);
+
#endif /* MJPEG_H */