X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fdirac_vlc.h;h=bfcfa136a110cad4e5f8c62205887452cddca393;hb=1ab74bc19354aedfb9afe71515952254753a75cc;hp=42ae41b00a7c9e3d82dfad28666634ce8d9704e9;hpb=217ad40aef9eeeff4e805dec3e980fb16aec3345;p=ffmpeg diff --git a/libavcodec/dirac_vlc.h b/libavcodec/dirac_vlc.h index 42ae41b00a7..bfcfa136a11 100644 --- a/libavcodec/dirac_vlc.h +++ b/libavcodec/dirac_vlc.h @@ -1,7 +1,4 @@ /* - * Copyright (C) 2016 Open Broadcast Systems Ltd. - * Author 2016 Rostislav Pehlivanov - * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or @@ -24,28 +21,9 @@ #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 */