/*
- * Copyright (C) 2016 Open Broadcast Systems Ltd.
- * Author 2016 Rostislav Pehlivanov <rpehlivanov@obe.tv>
- *
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
#include "libavutil/avutil.h"
-/* Can be 32 bits wide for some performance gain on some machines, but it will
- * incorrectly decode very long coefficients (usually only 1 or 2 per frame) */
-typedef uint64_t residual;
-
-#define LUT_BITS 8
-
-/* Exactly 64 bytes */
-typedef struct DiracGolombLUT {
- residual preamble, leftover;
- int32_t ready[LUT_BITS];
- int32_t preamble_bits, leftover_bits, ready_num;
- int8_t need_s, sign;
-} DiracGolombLUT;
-
-av_cold int ff_dirac_golomb_reader_init(DiracGolombLUT **lut_ctx);
-
-int ff_dirac_golomb_read_32bit(DiracGolombLUT *lut_ctx, const uint8_t *buf,
- int bytes, uint8_t *dst, int coeffs);
-
-int ff_dirac_golomb_read_16bit(DiracGolombLUT *lut_ctx, const uint8_t *buf,
- int bytes, uint8_t *_dst, int coeffs);
-
-av_cold void ff_dirac_golomb_reader_end(DiracGolombLUT **lut_ctx);
+int ff_dirac_golomb_read_16bit(const uint8_t *buf, int bytes,
+ uint8_t *_dst, int coeffs);
+int ff_dirac_golomb_read_32bit(const uint8_t *buf, int bytes,
+ uint8_t *_dst, int coeffs);
#endif /* AVCODEC_DIRAC_VLC_H */