Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH v3 0/2] 32bps FLAC patches
@ 2022-09-02 14:20 Martijn van Beurden
  2022-09-02 14:20 ` [FFmpeg-devel] [PATCH v3 1/2] libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM Martijn van Beurden
  2022-09-02 14:20 ` [FFmpeg-devel] [PATCH v3 2/2] libavcodec/flacenc: Implement encoding " Martijn van Beurden
  0 siblings, 2 replies; 6+ messages in thread
From: Martijn van Beurden @ 2022-09-02 14:20 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Martijn van Beurden

Recently libFLAC gained the ability (not in any released version yet
though) 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. The decoding patch has been send in for review earlier,
but didn't get any feedback yet, so I'm sending it in again,
unchanged, this time with a patch for encoding too.

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

Martijn van Beurden (2):
  libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM
  libavcodec/flacenc: Implement encoding of 32 bit-per-sample PCM

 libavcodec/flac.c       |   4 +-
 libavcodec/flacdec.c    | 248 ++++++++++++++++++--
 libavcodec/flacenc.c    | 499 ++++++++++++++++++++++++++++++++--------
 libavcodec/get_bits.h   |  12 +
 libavcodec/mathops.h    |   9 +
 libavcodec/put_bits.h   |   7 +
 libavcodec/put_golomb.h |  19 +-
 7 files changed, 668 insertions(+), 130 deletions(-)

-- 
2.30.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-09-02 19:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-02 14:20 [FFmpeg-devel] [PATCH v3 0/2] 32bps FLAC patches Martijn van Beurden
2022-09-02 14:20 ` [FFmpeg-devel] [PATCH v3 1/2] libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM Martijn van Beurden
2022-09-02 14:20 ` [FFmpeg-devel] [PATCH v3 2/2] libavcodec/flacenc: Implement encoding " Martijn van Beurden
2022-09-02 15:10   ` Andreas Rheinhardt
2022-09-02 18:43     ` Martijn van Beurden
2022-09-02 19:04       ` Andreas Rheinhardt

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git