diff options
author | Martijn van Beurden <mvanb1@gmail.com> | 2022-10-11 19:24:36 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2022-12-26 21:15:36 +0100 |
commit | d8f1404c50dfc3e3792b823e97abf56b5c5e9ee2 (patch) | |
tree | f2aeab99afebad2588db0b64e713f7dda9d43894 /libavcodec/put_bits.h | |
parent | 909cfdc2059a53ffb55af3b9e0aadcaacae4a339 (diff) | |
download | ffmpeg-d8f1404c50dfc3e3792b823e97abf56b5c5e9ee2.tar.gz |
libavcodec/flacenc: Implement encoding of 32 bit-per-sample PCM
Add encoding of 32 bit-per-sample PCM to FLAC files to libavcodec.
Coding to this format is at this point considered experimental and
-strict experimental is needed to get ffmpeg to encode such files.
Diffstat (limited to 'libavcodec/put_bits.h')
-rw-r--r-- | libavcodec/put_bits.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h index 4b4f977ad5..4561dc131a 100644 --- a/libavcodec/put_bits.h +++ b/libavcodec/put_bits.h @@ -363,6 +363,13 @@ static inline void put_bits64(PutBitContext *s, int n, uint64_t value) } } +static inline void put_sbits63(PutBitContext *pb, int n, int64_t value) +{ + av_assert2(n >= 0 && n < 64); + + put_bits64(pb, n, (uint64_t)(value) & (~(UINT64_MAX << n))); +} + /** * Return the pointer to the byte where the bitstream writer will put * the next bit. |