Message ID | 20221011172437.36211-1-mvanb1@gmail.com |
---|---|
Headers | show |
Series | 32bps FLAC patches | expand |
Op di 11 okt. 2022 om 19:24 schreef Martijn van Beurden <mvanb1@gmail.com>: > > Recently libFLAC gained the ability (first released in FLAC 1.4.0) > to create FLAC files containing 32-bit int PCM samples. To > keep complexity reasonable, the choice was made to limit residuals > to 32-bit integers, which the encoder must make sure of. In case > the encoder cannot find any predictor of which the residuals fit > this limit, it must default to using a verbatim subframe. Tests have > shown that this does not happen often (<0.1% of subframes on a > music corpus of various styles). See also discussion here: > https://github.com/ietf-wg-cellar/flac-specification/pull/148 > > These two patches implement decoding and encoding following this > format. > > Changes since v1: > fix copy-paste error in encoder, several invocations of > lpc_encode_choose_datapath used wrong parameters, making FATE fail as > compression was less than it should be > > Changes since v2: > Rebased decoder part as it didn't apply anymore > > Changes since v3: > Moved put_golomb part to flacenc.c (as it is now quite specific to FLAC) > and renamed put_sbits64 to put_sbits63 (and changed assert accordingly) > > Changes since v4: > Fix check of decoded_buffer_33bps malloc. Fix reading of wasted bits > for 33bps subframe. Add fate test > > Changes since v5: > Slimmed down 32 bps fate flac test from 2 to 1 input file. Replaced > -strict -2 with -strict experimental in fate and encoder warning. > > Changes since v6: > Deduplicated function bodies with preprocessor macros in both > encoder and decoder, declared variables in loop body where possible > and changed ff_ctz to ff_ctzll where necessary > > Martijn van Beurden (3): > libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM > libavcodec/flacenc: Implement encoding of 32 bit-per-sample PCM > fate/flac: Add test of 32 bps encoding/decoding > > libavcodec/flac.c | 4 +- > libavcodec/flacdec.c | 218 ++++++++++++++++-- > libavcodec/flacenc.c | 480 +++++++++++++++++++++++++++++++--------- > libavcodec/get_bits.h | 12 + > libavcodec/mathops.h | 9 + > libavcodec/put_bits.h | 7 + > libavcodec/put_golomb.h | 14 -- > tests/fate/flac.mak | 4 + > 8 files changed, 602 insertions(+), 146 deletions(-) > Hi all, With this email, I would like to renew the attention of the mailing list for these patches. Kind regards, Martijn van Beurden
Op vr 28 okt. 2022 om 22:13 schreef Martijn van Beurden <mvanb1@gmail.com>: > > Op di 11 okt. 2022 om 19:24 schreef Martijn van Beurden <mvanb1@gmail.com>: > > > > Recently libFLAC gained the ability (first released in FLAC 1.4.0) > > to create FLAC files containing 32-bit int PCM samples. To > > keep complexity reasonable, the choice was made to limit residuals > > to 32-bit integers, which the encoder must make sure of. In case > > the encoder cannot find any predictor of which the residuals fit > > this limit, it must default to using a verbatim subframe. Tests have > > shown that this does not happen often (<0.1% of subframes on a > > music corpus of various styles). See also discussion here: > > https://github.com/ietf-wg-cellar/flac-specification/pull/148 > > > > These two patches implement decoding and encoding following this > > format. > > > > Changes since v1: > > fix copy-paste error in encoder, several invocations of > > lpc_encode_choose_datapath used wrong parameters, making FATE fail as > > compression was less than it should be > > > > Changes since v2: > > Rebased decoder part as it didn't apply anymore > > > > Changes since v3: > > Moved put_golomb part to flacenc.c (as it is now quite specific to FLAC) > > and renamed put_sbits64 to put_sbits63 (and changed assert accordingly) > > > > Changes since v4: > > Fix check of decoded_buffer_33bps malloc. Fix reading of wasted bits > > for 33bps subframe. Add fate test > > > > Changes since v5: > > Slimmed down 32 bps fate flac test from 2 to 1 input file. Replaced > > -strict -2 with -strict experimental in fate and encoder warning. > > > > Changes since v6: > > Deduplicated function bodies with preprocessor macros in both > > encoder and decoder, declared variables in loop body where possible > > and changed ff_ctz to ff_ctzll where necessary > > > > Martijn van Beurden (3): > > libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM > > libavcodec/flacenc: Implement encoding of 32 bit-per-sample PCM > > fate/flac: Add test of 32 bps encoding/decoding > > > > libavcodec/flac.c | 4 +- > > libavcodec/flacdec.c | 218 ++++++++++++++++-- > > libavcodec/flacenc.c | 480 +++++++++++++++++++++++++++++++--------- > > libavcodec/get_bits.h | 12 + > > libavcodec/mathops.h | 9 + > > libavcodec/put_bits.h | 7 + > > libavcodec/put_golomb.h | 14 -- > > tests/fate/flac.mak | 4 + > > 8 files changed, 602 insertions(+), 146 deletions(-) > > > > Hi all, > > With this email, I would like to renew the attention of the mailing > list for these patches. > > Kind regards, Martijn van Beurden Ping
Op vr 11 nov. 2022 om 22:11 schreef Martijn van Beurden <mvanb1@gmail.com>: > > Op vr 28 okt. 2022 om 22:13 schreef Martijn van Beurden <mvanb1@gmail.com>: > > > > Op di 11 okt. 2022 om 19:24 schreef Martijn van Beurden <mvanb1@gmail.com>: > > > > > > Recently libFLAC gained the ability (first released in FLAC 1.4.0) > > > to create FLAC files containing 32-bit int PCM samples. To > > > keep complexity reasonable, the choice was made to limit residuals > > > to 32-bit integers, which the encoder must make sure of. In case > > > the encoder cannot find any predictor of which the residuals fit > > > this limit, it must default to using a verbatim subframe. Tests have > > > shown that this does not happen often (<0.1% of subframes on a > > > music corpus of various styles). See also discussion here: > > > https://github.com/ietf-wg-cellar/flac-specification/pull/148 > > > > > > These two patches implement decoding and encoding following this > > > format. > > > > > > Changes since v1: > > > fix copy-paste error in encoder, several invocations of > > > lpc_encode_choose_datapath used wrong parameters, making FATE fail as > > > compression was less than it should be > > > > > > Changes since v2: > > > Rebased decoder part as it didn't apply anymore > > > > > > Changes since v3: > > > Moved put_golomb part to flacenc.c (as it is now quite specific to FLAC) > > > and renamed put_sbits64 to put_sbits63 (and changed assert accordingly) > > > > > > Changes since v4: > > > Fix check of decoded_buffer_33bps malloc. Fix reading of wasted bits > > > for 33bps subframe. Add fate test > > > > > > Changes since v5: > > > Slimmed down 32 bps fate flac test from 2 to 1 input file. Replaced > > > -strict -2 with -strict experimental in fate and encoder warning. > > > > > > Changes since v6: > > > Deduplicated function bodies with preprocessor macros in both > > > encoder and decoder, declared variables in loop body where possible > > > and changed ff_ctz to ff_ctzll where necessary > > > > > > Martijn van Beurden (3): > > > libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM > > > libavcodec/flacenc: Implement encoding of 32 bit-per-sample PCM > > > fate/flac: Add test of 32 bps encoding/decoding > > > > > > libavcodec/flac.c | 4 +- > > > libavcodec/flacdec.c | 218 ++++++++++++++++-- > > > libavcodec/flacenc.c | 480 +++++++++++++++++++++++++++++++--------- > > > libavcodec/get_bits.h | 12 + > > > libavcodec/mathops.h | 9 + > > > libavcodec/put_bits.h | 7 + > > > libavcodec/put_golomb.h | 14 -- > > > tests/fate/flac.mak | 4 + > > > 8 files changed, 602 insertions(+), 146 deletions(-) > > > > > > > Hi all, > > > > With this email, I would like to renew the attention of the mailing > > list for these patches. > > > > Kind regards, Martijn van Beurden > > Ping Ping
On 10/11/22, Martijn van Beurden <mvanb1@gmail.com> wrote: > Recently libFLAC gained the ability (first released in FLAC 1.4.0) > to create FLAC files containing 32-bit int PCM samples. To > keep complexity reasonable, the choice was made to limit residuals > to 32-bit integers, which the encoder must make sure of. In case > the encoder cannot find any predictor of which the residuals fit > this limit, it must default to using a verbatim subframe. Tests have > shown that this does not happen often (<0.1% of subframes on a > music corpus of various styles). See also discussion here: > https://github.com/ietf-wg-cellar/flac-specification/pull/148 > > These two patches implement decoding and encoding following this > format. > > Changes since v1: > fix copy-paste error in encoder, several invocations of > lpc_encode_choose_datapath used wrong parameters, making FATE fail as > compression was less than it should be > > Changes since v2: > Rebased decoder part as it didn't apply anymore > > Changes since v3: > Moved put_golomb part to flacenc.c (as it is now quite specific to FLAC) > and renamed put_sbits64 to put_sbits63 (and changed assert accordingly) > > Changes since v4: > Fix check of decoded_buffer_33bps malloc. Fix reading of wasted bits > for 33bps subframe. Add fate test > > Changes since v5: > Slimmed down 32 bps fate flac test from 2 to 1 input file. Replaced > -strict -2 with -strict experimental in fate and encoder warning. > > Changes since v6: > Deduplicated function bodies with preprocessor macros in both > encoder and decoder, declared variables in loop body where possible > and changed ff_ctz to ff_ctzll where necessary > > Martijn van Beurden (3): > libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM > libavcodec/flacenc: Implement encoding of 32 bit-per-sample PCM > fate/flac: Add test of 32 bps encoding/decoding > > libavcodec/flac.c | 4 +- > libavcodec/flacdec.c | 218 ++++++++++++++++-- > libavcodec/flacenc.c | 480 +++++++++++++++++++++++++++++++--------- > libavcodec/get_bits.h | 12 + > libavcodec/mathops.h | 9 + > libavcodec/put_bits.h | 7 + > libavcodec/put_golomb.h | 14 -- > tests/fate/flac.mak | 4 + > 8 files changed, 602 insertions(+), 146 deletions(-) > > -- > 2.30.2 > If this is OK, will apply soon.
On 11/25/22, Paul B Mahol <onemda@gmail.com> wrote: > On 10/11/22, Martijn van Beurden <mvanb1@gmail.com> wrote: >> Recently libFLAC gained the ability (first released in FLAC 1.4.0) >> to create FLAC files containing 32-bit int PCM samples. To >> keep complexity reasonable, the choice was made to limit residuals >> to 32-bit integers, which the encoder must make sure of. In case >> the encoder cannot find any predictor of which the residuals fit >> this limit, it must default to using a verbatim subframe. Tests have >> shown that this does not happen often (<0.1% of subframes on a >> music corpus of various styles). See also discussion here: >> https://github.com/ietf-wg-cellar/flac-specification/pull/148 >> >> These two patches implement decoding and encoding following this >> format. >> >> Changes since v1: >> fix copy-paste error in encoder, several invocations of >> lpc_encode_choose_datapath used wrong parameters, making FATE fail as >> compression was less than it should be >> >> Changes since v2: >> Rebased decoder part as it didn't apply anymore >> >> Changes since v3: >> Moved put_golomb part to flacenc.c (as it is now quite specific to FLAC) >> and renamed put_sbits64 to put_sbits63 (and changed assert accordingly) >> >> Changes since v4: >> Fix check of decoded_buffer_33bps malloc. Fix reading of wasted bits >> for 33bps subframe. Add fate test >> >> Changes since v5: >> Slimmed down 32 bps fate flac test from 2 to 1 input file. Replaced >> -strict -2 with -strict experimental in fate and encoder warning. >> >> Changes since v6: >> Deduplicated function bodies with preprocessor macros in both >> encoder and decoder, declared variables in loop body where possible >> and changed ff_ctz to ff_ctzll where necessary >> >> Martijn van Beurden (3): >> libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM >> libavcodec/flacenc: Implement encoding of 32 bit-per-sample PCM >> fate/flac: Add test of 32 bps encoding/decoding >> >> libavcodec/flac.c | 4 +- >> libavcodec/flacdec.c | 218 ++++++++++++++++-- >> libavcodec/flacenc.c | 480 +++++++++++++++++++++++++++++++--------- >> libavcodec/get_bits.h | 12 + >> libavcodec/mathops.h | 9 + >> libavcodec/put_bits.h | 7 + >> libavcodec/put_golomb.h | 14 -- >> tests/fate/flac.mak | 4 + >> 8 files changed, 602 insertions(+), 146 deletions(-) >> >> -- >> 2.30.2 >> > > > > If this is OK, will apply soon. Last time to say no to this patchset.
Op do 1 dec. 2022 om 13:31 schreef Paul B Mahol <onemda@gmail.com>: > > On 11/25/22, Paul B Mahol <onemda@gmail.com> wrote: > > On 10/11/22, Martijn van Beurden <mvanb1@gmail.com> wrote: > >> Recently libFLAC gained the ability (first released in FLAC 1.4.0) > >> to create FLAC files containing 32-bit int PCM samples. To > >> keep complexity reasonable, the choice was made to limit residuals > >> to 32-bit integers, which the encoder must make sure of. In case > >> the encoder cannot find any predictor of which the residuals fit > >> this limit, it must default to using a verbatim subframe. Tests have > >> shown that this does not happen often (<0.1% of subframes on a > >> music corpus of various styles). See also discussion here: > >> https://github.com/ietf-wg-cellar/flac-specification/pull/148 > >> > >> These two patches implement decoding and encoding following this > >> format. > >> > >> Changes since v1: > >> fix copy-paste error in encoder, several invocations of > >> lpc_encode_choose_datapath used wrong parameters, making FATE fail as > >> compression was less than it should be > >> > >> Changes since v2: > >> Rebased decoder part as it didn't apply anymore > >> > >> Changes since v3: > >> Moved put_golomb part to flacenc.c (as it is now quite specific to FLAC) > >> and renamed put_sbits64 to put_sbits63 (and changed assert accordingly) > >> > >> Changes since v4: > >> Fix check of decoded_buffer_33bps malloc. Fix reading of wasted bits > >> for 33bps subframe. Add fate test > >> > >> Changes since v5: > >> Slimmed down 32 bps fate flac test from 2 to 1 input file. Replaced > >> -strict -2 with -strict experimental in fate and encoder warning. > >> > >> Changes since v6: > >> Deduplicated function bodies with preprocessor macros in both > >> encoder and decoder, declared variables in loop body where possible > >> and changed ff_ctz to ff_ctzll where necessary > >> > >> Martijn van Beurden (3): > >> libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM > >> libavcodec/flacenc: Implement encoding of 32 bit-per-sample PCM > >> fate/flac: Add test of 32 bps encoding/decoding > >> > >> libavcodec/flac.c | 4 +- > >> libavcodec/flacdec.c | 218 ++++++++++++++++-- > >> libavcodec/flacenc.c | 480 +++++++++++++++++++++++++++++++--------- > >> libavcodec/get_bits.h | 12 + > >> libavcodec/mathops.h | 9 + > >> libavcodec/put_bits.h | 7 + > >> libavcodec/put_golomb.h | 14 -- > >> tests/fate/flac.mak | 4 + > >> 8 files changed, 602 insertions(+), 146 deletions(-) > >> > >> -- > >> 2.30.2 > >> > > > > > > > > If this is OK, will apply soon. > > > Last time to say no to this patchset. I haven't had any comments the last few weeks, it still applies against current git and passed FATE. If you could apply it I would be much obliged. Kind regards, Martijn van Beurden
On 12/11/22, Martijn van Beurden <mvanb1@gmail.com> wrote: > Op do 1 dec. 2022 om 13:31 schreef Paul B Mahol <onemda@gmail.com>: >> >> On 11/25/22, Paul B Mahol <onemda@gmail.com> wrote: >> > On 10/11/22, Martijn van Beurden <mvanb1@gmail.com> wrote: >> >> Recently libFLAC gained the ability (first released in FLAC 1.4.0) >> >> to create FLAC files containing 32-bit int PCM samples. To >> >> keep complexity reasonable, the choice was made to limit residuals >> >> to 32-bit integers, which the encoder must make sure of. In case >> >> the encoder cannot find any predictor of which the residuals fit >> >> this limit, it must default to using a verbatim subframe. Tests have >> >> shown that this does not happen often (<0.1% of subframes on a >> >> music corpus of various styles). See also discussion here: >> >> https://github.com/ietf-wg-cellar/flac-specification/pull/148 >> >> >> >> These two patches implement decoding and encoding following this >> >> format. >> >> >> >> Changes since v1: >> >> fix copy-paste error in encoder, several invocations of >> >> lpc_encode_choose_datapath used wrong parameters, making FATE fail as >> >> compression was less than it should be >> >> >> >> Changes since v2: >> >> Rebased decoder part as it didn't apply anymore >> >> >> >> Changes since v3: >> >> Moved put_golomb part to flacenc.c (as it is now quite specific to >> >> FLAC) >> >> and renamed put_sbits64 to put_sbits63 (and changed assert >> >> accordingly) >> >> >> >> Changes since v4: >> >> Fix check of decoded_buffer_33bps malloc. Fix reading of wasted bits >> >> for 33bps subframe. Add fate test >> >> >> >> Changes since v5: >> >> Slimmed down 32 bps fate flac test from 2 to 1 input file. Replaced >> >> -strict -2 with -strict experimental in fate and encoder warning. >> >> >> >> Changes since v6: >> >> Deduplicated function bodies with preprocessor macros in both >> >> encoder and decoder, declared variables in loop body where possible >> >> and changed ff_ctz to ff_ctzll where necessary >> >> >> >> Martijn van Beurden (3): >> >> libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM >> >> libavcodec/flacenc: Implement encoding of 32 bit-per-sample PCM >> >> fate/flac: Add test of 32 bps encoding/decoding >> >> >> >> libavcodec/flac.c | 4 +- >> >> libavcodec/flacdec.c | 218 ++++++++++++++++-- >> >> libavcodec/flacenc.c | 480 >> >> +++++++++++++++++++++++++++++++--------- >> >> libavcodec/get_bits.h | 12 + >> >> libavcodec/mathops.h | 9 + >> >> libavcodec/put_bits.h | 7 + >> >> libavcodec/put_golomb.h | 14 -- >> >> tests/fate/flac.mak | 4 + >> >> 8 files changed, 602 insertions(+), 146 deletions(-) >> >> >> >> -- >> >> 2.30.2 >> >> >> > >> > >> > >> > If this is OK, will apply soon. >> >> >> Last time to say no to this patchset. > > I haven't had any comments the last few weeks, it still applies > against current git and passed FATE. If you could apply it I would be > much obliged. > > Kind regards, > > Martijn van Beurden > Hi, if this still pastes FATE and compiles and applies I gonna apply it in next 48h.
On 12/19/22, Paul B Mahol <onemda@gmail.com> wrote: > On 12/11/22, Martijn van Beurden <mvanb1@gmail.com> wrote: >> Op do 1 dec. 2022 om 13:31 schreef Paul B Mahol <onemda@gmail.com>: >>> >>> On 11/25/22, Paul B Mahol <onemda@gmail.com> wrote: >>> > On 10/11/22, Martijn van Beurden <mvanb1@gmail.com> wrote: >>> >> Recently libFLAC gained the ability (first released in FLAC 1.4.0) >>> >> to create FLAC files containing 32-bit int PCM samples. To >>> >> keep complexity reasonable, the choice was made to limit residuals >>> >> to 32-bit integers, which the encoder must make sure of. In case >>> >> the encoder cannot find any predictor of which the residuals fit >>> >> this limit, it must default to using a verbatim subframe. Tests have >>> >> shown that this does not happen often (<0.1% of subframes on a >>> >> music corpus of various styles). See also discussion here: >>> >> https://github.com/ietf-wg-cellar/flac-specification/pull/148 >>> >> >>> >> These two patches implement decoding and encoding following this >>> >> format. >>> >> >>> >> Changes since v1: >>> >> fix copy-paste error in encoder, several invocations of >>> >> lpc_encode_choose_datapath used wrong parameters, making FATE fail as >>> >> compression was less than it should be >>> >> >>> >> Changes since v2: >>> >> Rebased decoder part as it didn't apply anymore >>> >> >>> >> Changes since v3: >>> >> Moved put_golomb part to flacenc.c (as it is now quite specific to >>> >> FLAC) >>> >> and renamed put_sbits64 to put_sbits63 (and changed assert >>> >> accordingly) >>> >> >>> >> Changes since v4: >>> >> Fix check of decoded_buffer_33bps malloc. Fix reading of wasted bits >>> >> for 33bps subframe. Add fate test >>> >> >>> >> Changes since v5: >>> >> Slimmed down 32 bps fate flac test from 2 to 1 input file. Replaced >>> >> -strict -2 with -strict experimental in fate and encoder warning. >>> >> >>> >> Changes since v6: >>> >> Deduplicated function bodies with preprocessor macros in both >>> >> encoder and decoder, declared variables in loop body where possible >>> >> and changed ff_ctz to ff_ctzll where necessary >>> >> >>> >> Martijn van Beurden (3): >>> >> libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM >>> >> libavcodec/flacenc: Implement encoding of 32 bit-per-sample PCM >>> >> fate/flac: Add test of 32 bps encoding/decoding >>> >> >>> >> libavcodec/flac.c | 4 +- >>> >> libavcodec/flacdec.c | 218 ++++++++++++++++-- >>> >> libavcodec/flacenc.c | 480 >>> >> +++++++++++++++++++++++++++++++--------- >>> >> libavcodec/get_bits.h | 12 + >>> >> libavcodec/mathops.h | 9 + >>> >> libavcodec/put_bits.h | 7 + >>> >> libavcodec/put_golomb.h | 14 -- >>> >> tests/fate/flac.mak | 4 + >>> >> 8 files changed, 602 insertions(+), 146 deletions(-) >>> >> >>> >> -- >>> >> 2.30.2 >>> >> >>> > >>> > >>> > >>> > If this is OK, will apply soon. >>> >>> >>> Last time to say no to this patchset. >> >> I haven't had any comments the last few weeks, it still applies >> against current git and passed FATE. If you could apply it I would be >> much obliged. >> >> Kind regards, >> >> Martijn van Beurden >> > > Hi, if this still pastes FATE and compiles and applies I gonna apply > it in next 48h. > Pushed. Next time do not put tabs in non Makefile parts in patch or I will reject pushing it.
Op ma 26 dec. 2022 21:14 schreef Paul B Mahol <onemda@gmail.com>: > Pushed. > > Next time do not put tabs in non Makefile parts in patch or I will > reject pushing it. > Thanks. Sorry about the tabs, I forgot to check, I will try to be more careful next time. >