summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/mqc.h
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
committerTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
commitf7813a5324be39d13ab536c245d15dfc602a7849 (patch)
treefad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavcodec/mqc.h
parentb7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff)
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/mqc.h')
-rw-r--r--ffmpeg/libavcodec/mqc.h35
1 files changed, 26 insertions, 9 deletions
diff --git a/ffmpeg/libavcodec/mqc.h b/ffmpeg/libavcodec/mqc.h
index b28c13e..c0827bd 100644
--- a/ffmpeg/libavcodec/mqc.h
+++ b/ffmpeg/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,32 @@ 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 Initialize context tables (QE, NLPS, NMPS)
+ */
+void ff_mqc_init_context_tables(void);
+
+/**
+ * MQ-coder context initialisations.
+ * @param mqc MQ-coder context
+ */
void ff_mqc_init_contexts(MqcState *mqc);
#endif /* AVCODEC_MQC_H */