3 * Copyright (c) 2007 Kamil Nowosad
5 * This file is part of FFmpeg.
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
28 * @author Kamil Nowosad
36 extern uint16_t ff_mqc_qe[2*47];
37 extern uint8_t ff_mqc_nlps[2*47];
38 extern uint8_t ff_mqc_nmps[2*47];
41 uint8_t *bp, *bpstart;
45 uint8_t cx_states[19];
50 /** initialize the encoder */
51 void ff_mqc_initenc(MqcState *mqc, uint8_t *bp);
53 /** code bit d with context cx */
54 void ff_mqc_encode(MqcState *mqc, uint8_t *cxstate, int d);
56 /** number of encoded bytes */
57 int ff_mqc_length(MqcState *mqc);
59 /** flush the encoder [returns number of bytes encoded] */
60 int ff_mqc_flush(MqcState *mqc);
64 /** initialize the decoder */
65 void ff_mqc_initdec(MqcState *mqc, uint8_t *bp);
67 /** returns decoded bit with context cx */
68 int ff_mqc_decode(MqcState *mqc, uint8_t *cxstate);
72 /** initialize the contexts */
73 void ff_mqc_init_contexts(MqcState *mqc);
75 #endif /* AVCODEC_MQC_H */