#include "golomb.h"
#include "idctdsp.h"
#include "thread.h"
-#include "unary.h"
+#include "unary_legacy.h"
#define AIC_HDR_SIZE 24
#define AIC_BAND_COEFFS (64 + 32 + 192 + 96)
#include "get_bits.h"
#include "bytestream.h"
#include "internal.h"
-#include "unary.h"
#include "mathops.h"
+#include "unary_legacy.h"
#include "alac_data.h"
#define ALAC_EXTRADATA_SIZE 36
#include "avcodec.h"
#include "get_bits.h"
-#include "unary.h"
#include "mpeg4audio.h"
#include "bytestream.h"
#include "bgmc.h"
#include "bswapdsp.h"
#include "internal.h"
+#include "unary_legacy.h"
+
#include "libavutil/samplefmt.h"
#include "libavutil/crc.h"
#include "bytestream.h"
#include "internal.h"
#include "get_bits.h"
-#include "unary.h"
+#include "unary_legacy.h"
/**
* @file
#include "dca.h"
#include "dcadata.h"
#include "get_bits.h"
-#include "unary.h"
+#include "unary_legacy.h"
/* Sign as bit 0 */
static inline int get_bits_sm(GetBitContext *s, unsigned n)
#include "bytestream.h"
#include "get_bits.h"
#include "internal.h"
-#include "unary.h"
+#include "unary_legacy.h"
static int dxtory_decode_v1_rgb(AVCodecContext *avctx, AVFrame *pic,
const uint8_t *src, int src_size,
#include "internal.h"
#include "mathops.h"
#include "mpegutils.h"
-#include "unary.h"
+#include "unary_legacy.h"
#include "flv.h"
#include "rv10.h"
#include "mpeg4video.h"
#include "get_bits.h"
#include "internal.h"
#include "mss34dsp.h"
-#include "unary.h"
+#include "unary_legacy.h"
#define HEADER_SIZE 8
#include "get_bits.h"
#include "golomb.h"
#include "internal.h"
-#include "unary.h"
+#include "unary_legacy.h"
#include "ralfdata.h"
#define FILTER_NONE 0
#include "audiodsp.h"
#include "avcodec.h"
#include "internal.h"
-#include "unary.h"
+#include "unary_legacy.h"
#include "tak.h"
#define MAX_SUBFRAMES 8 // max number of subframes per channel
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
-#include "unary.h"
+#include "unary_legacy.h"
#define FORMAT_SIMPLE 1
#define FORMAT_ENCRYPTED 2
#ifndef AVCODEC_UNARY_H
#define AVCODEC_UNARY_H
-#include "get_bits.h"
+#include "bitstream.h"
/**
* Get unary code of limited length
- * @param gb GetBitContext
+ * @param bc BitstreamContext
* @param[in] stop The bitstop value (unary code of 1's or 0's)
* @param[in] len Maximum length
* @return Unary length/index
*/
-static inline int get_unary(GetBitContext *gb, int stop, int len)
+static inline int get_unary(BitstreamContext *bc, int stop, int len)
{
int i;
- for(i = 0; i < len && get_bits1(gb) != stop; i++);
+ for (i = 0; i < len && bitstream_read_bit(bc) != stop; i++)
+ ;
return i;
}
/**
* Get unary code terminated by a 0 with a maximum length of 33
- * @param gb GetBitContext
+ * @param bc BitstreamContext
* @return Unary length/index
*/
-static inline int get_unary_0_33(GetBitContext *gb)
+static inline int get_unary_0_33(BitstreamContext *bc)
{
- return get_unary(gb, 0, 33);
+ return get_unary(bc, 0, 33);
}
-static inline int get_unary_0_9(GetBitContext *gb)
+static inline int get_unary_0_9(BitstreamContext *bc)
{
- return get_unary(gb, 0, 9);
+ return get_unary(bc, 0, 9);
}
#endif /* AVCODEC_UNARY_H */
--- /dev/null
+/*
+ * copyright (c) 2004 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_UNARY_H
+#define AVCODEC_UNARY_H
+
+#include "get_bits.h"
+
+/**
+ * Get unary code of limited length
+ * @param gb GetBitContext
+ * @param[in] stop The bitstop value (unary code of 1's or 0's)
+ * @param[in] len Maximum length
+ * @return Unary length/index
+ */
+static inline int get_unary(GetBitContext *gb, int stop, int len)
+{
+ int i;
+
+ for(i = 0; i < len && get_bits1(gb) != stop; i++);
+ return i;
+}
+
+/**
+ * Get unary code terminated by a 0 with a maximum length of 33
+ * @param gb GetBitContext
+ * @return Unary length/index
+ */
+static inline int get_unary_0_33(GetBitContext *gb)
+{
+ return get_unary(gb, 0, 33);
+}
+
+static inline int get_unary_0_9(GetBitContext *gb)
+{
+ return get_unary(gb, 0, 9);
+}
+
+#endif /* AVCODEC_UNARY_H */
#include "internal.h"
#include "avcodec.h"
#include "mpegvideo.h"
+#include "unary_legacy.h"
#include "vc1.h"
#include "vc1data.h"
#include "wmv2data.h"
-#include "unary.h"
#include "simple_idct.h"
/***********************************************************************/
#include "mpegutils.h"
#include "mpegvideo.h"
#include "msmpeg4data.h"
-#include "unary.h"
+#include "unary_legacy.h"
#include "vc1.h"
#include "vc1_pred.h"
#include "vc1acdata.h"
#include "bytestream.h"
#include "get_bits.h"
#include "internal.h"
-#include "unary.h"
+#include "unary_legacy.h"
/**
* @file
*/
#include "libavcodec/get_bits.h"
-#include "libavcodec/unary.h"
+#include "libavcodec/unary_legacy.h"
+
#include "apetag.h"
#include "avformat.h"
#include "internal.h"