Repository navigation
Conversation
…abilities Advertise SND_AUDIOCODEC_ALAC playback when CONFIG_FFMPEG_DEC_ALAC is enabled, and SND_AUDIOCODEC_FLAC / SND_AUDIOCODEC_ALAC compress capture when CONFIG_FFMPEG_ENC_FLAC / CONFIG_FFMPEG_ENC_ALAC are enabled. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add Phase 1 lossless compress playback and capture codecs to ffmpeg_dec using native fixed-point libavcodec implementations: - ALAC decoder (CONFIG_FFMPEG_DEC_ALAC, SND_AUDIOCODEC_ALAC): - Apple CAF container parser (kuki chunk 36-byte ALAC magic cookie extraction and data chunk framing) and inline 36-byte QuickTime 'alac' atom header support. - Self-delimiting unparsed frame consumption tracking via GetBitContext and partial-frame reassembly across LL period boundaries. - FLAC encoder (CONFIG_FFMPEG_ENC_FLAC, SND_AUDIOCODEC_FLAC): - Native libavcodec flac encoder configured with fixed integer LPC predictors (FF_LPC_TYPE_FIXED, compression_level 1) for deterministic low-MCPS DSP encoding. - Prepends the 42-byte 'fLaC' + STREAMINFO metadata block from avctx->extradata to produce a self-contained .flac stream. - Bounds FlacEncodeContext dimensions on a build-tree copy of flacenc.c (FLAC_MAX_BLOCKSIZE=4096, MAX_PARTITIONS=16, FLAC_MAX_CHANNELS=2), reducing context allocation 122x from 7.35 MiB to 43.5 KiB. - ALAC encoder (CONFIG_FFMPEG_ENC_ALAC, SND_AUDIOCODEC_ALAC): - Native libavcodec alac encoder configured with fixed LPC prediction (compression_level 1) and planar S16 input conversion. - Prepends the 36-byte QuickTime 'alac' magic cookie from avctx->extradata. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add development topology targets for ALAC compress playback (sof-hda-generic-ffmpeg-alac-compr) and FLAC/ALAC compress capture (sof-hda-generic-ffmpeg-flac-enc-compr, sof-hda-generic-ffmpeg-alac-enc-compr). Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Phase 1 lossless compress playback and capture codecs to
ffmpeg_decusing native fixed-pointlibavcodecimplementations:CONFIG_FFMPEG_DEC_ALAC,SND_AUDIOCODEC_ALAC):.cafcontainer parser (kukichunk 36-byte ALAC magic cookie extraction anddatachunk framing) and inline 36-byte QuickTime'alac'atom header support.GetBitContextand partial-frame reassembly across LL period boundaries.CONFIG_FFMPEG_ENC_FLAC,SND_AUDIOCODEC_FLAC):libavcodecflacencoder configured with fixed integer LPC predictors (FF_LPC_TYPE_FIXED,compression_level = 1) for deterministic low-MCPS DSP encoding."fLaC"+STREAMINFOmetadata block fromavctx->extradatato produce a self-contained.flacstream.FlacEncodeContextdimensions on a build-tree copy offlacenc.c(FLAC_MAX_BLOCKSIZE=1152,rc_sums[1],FLAC_MAX_CHANNELS=2), reducing context allocation 122x from 7.35 MiB to 43.5 KiB.CONFIG_FFMPEG_ENC_ALAC,SND_AUDIOCODEC_ALAC):libavcodecalacencoder configured with fixed LPC prediction (compression_level = 1) and planar S16 input conversion.'alac'magic cookie fromavctx->extradata.SND_AUDIOCODEC_ALACplayback andSND_AUDIOCODEC_FLAC/SND_AUDIOCODEC_ALACcapture inIPC4_SOF_CODEC_INFO.sof-hda-generic-ffmpeg-alac-compr,sof-hda-generic-ffmpeg-flac-enc-compr, andsof-hda-generic-ffmpeg-alac-enc-comprdevelopment topology targets.Hardware Verification (Aphid PTL ACE 3.0 & Spider TGL CAVS 2.5)
Verified end-to-end on both Aphid (
ptl) and Spider (tgl):.cafplayback (comprC0D50,codec_id=15)comprC0D51,codec_id=10) + round-trip playback (comprC0D50)comprC0D51,codec_id=15) + round-trip playback (comprC0D50)