diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2025-05-03 22:07:17 +0200 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2025-05-03 22:07:17 +0200 |
commit | 98338613d8821f592682928c1096550596cb2550 (patch) | |
tree | abc2318c96ee2a14f06ba1028fb8663f6a6ee35a /src/lib/bs_encode/encode.h | |
parent | 177622ee9513784a21d9f10ab0c1e9774c0ddc71 (diff) | |
download | atracdenc-98338613d8821f592682928c1096550596cb2550.tar.gz |
[AT3P] Adjust number of quant units during encoding.
Diffstat (limited to 'src/lib/bs_encode/encode.h')
-rw-r--r-- | src/lib/bs_encode/encode.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/bs_encode/encode.h b/src/lib/bs_encode/encode.h index 9671e10..3302d10 100644 --- a/src/lib/bs_encode/encode.h +++ b/src/lib/bs_encode/encode.h @@ -34,6 +34,9 @@ public: float Continue() noexcept; bool Check(size_t gitBits) const noexcept; void Submit(size_t gotBits) noexcept; + + // Returns consumption of all previous encoded parts (except part from this method called) + uint32_t GetCurGlobalConsumption() const noexcept; }; class IBitStreamPartEncoder { @@ -47,7 +50,8 @@ public: virtual ~IBitStreamPartEncoder() = default; virtual EStatus Encode(void* frameData, TBitAllocHandler& ba) = 0; virtual void Dump(NBitStream::TBitStream& bs) = 0; - + virtual void Reset() noexcept {}; + virtual uint32_t GetConsumption() const noexcept = 0; }; class TBitStreamEncoder { |