summaryrefslogtreecommitdiff
path: root/libavcodec/mqc.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-22 19:41:31 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-22 20:00:54 +0200
commite2e9bee2daef9d5d5169f5360737eec8b76d7e0c (patch)
tree22ba6e50d34a036832d4ef8f903df335d3c9d63a /libavcodec/mqc.h
parentc1c2b0b3390482bba39534f2f125d97e8964d7d5 (diff)
parentf13888afcc5e528b80e4ae5bc4f0d9dadc76f6aa (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: avcodec: Bump minor for JPEG 2000 decoder JPEG 2000 decoder for DCinema The mqc code is merged, the rest is added independent of the existing jpeg2000 decoder and encoder. Conflicts: Changelog doc/general.texi libavcodec/Makefile libavcodec/allcodecs.c libavcodec/mqc.c libavcodec/mqc.h libavcodec/mqcdec.c libavcodec/version.h tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mqc.h')
-rw-r--r--libavcodec/mqc.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/libavcodec/mqc.h b/libavcodec/mqc.h
index b28c13ec48..a0112d1159 100644
--- a/libavcodec/mqc.h
+++ b/libavcodec/mqc.h
@@ -1,5 +1,5 @@
/*
- * MQ-coder
+ * MQ-coder: structures, common and decoder functions
* Copyright (c) 2007 Kamil Nowosad
*
* This file is part of FFmpeg.
@@ -28,16 +28,16 @@
* @author Kamil Nowosad
*/
-#include "avcodec.h"
+#include <stdint.h>
#define MQC_CX_UNI 17
#define MQC_CX_RL 18
-extern uint16_t ff_mqc_qe[2*47];
-extern uint8_t ff_mqc_nlps[2*47];
-extern uint8_t ff_mqc_nmps[2*47];
+extern uint16_t ff_mqc_qe[2 * 47];
+extern uint8_t ff_mqc_nlps[2 * 47];
+extern uint8_t ff_mqc_nmps[2 * 47];
-typedef struct {
+typedef struct MqcState {
uint8_t *bp, *bpstart;
unsigned int a;
unsigned int c;
@@ -61,15 +61,27 @@ int ff_mqc_flush(MqcState *mqc);
/* decoder */
-/** initialize the decoder */
+/**
+ * Initialize MQ-decoder.
+ * @param mqc MQ decoder state
+ * @param bp byte poiter
+ */
void ff_mqc_initdec(MqcState *mqc, uint8_t *bp);
-/** returns decoded bit with context cx */
+/**
+ * MQ decoder.
+ * @param mqc MQ decoder state
+ * @param cxstate Context
+ * @return Decision (0 ot 1)
+ */
int ff_mqc_decode(MqcState *mqc, uint8_t *cxstate);
/* common */
-/** initialize the contexts */
+/**
+ * MQ-coder context initialisations.
+ * @param mqc MQ-coder context
+ */
void ff_mqc_init_contexts(MqcState *mqc);
#endif /* AVCODEC_MQC_H */