* [FFmpeg-devel] [PATCH 2/4] mpeg4audio: explicitly define each AOT
2024-06-05 3:08 [FFmpeg-devel] [PATCH 1/4] mpeg4audio: rename AOT_USAC_NOSBR to AOT_USAC Lynne via ffmpeg-devel
@ 2024-06-05 3:08 ` Lynne via ffmpeg-devel
2024-06-05 16:16 ` James Almer
2024-06-05 3:08 ` [FFmpeg-devel] [PATCH 3/4] aac: define a new profile for USAC Lynne via ffmpeg-devel
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Lynne via ffmpeg-devel @ 2024-06-05 3:08 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Lynne
This makes it far easier to figure out which AOT belongs to which
profile.
Also, explicitly highlight the holes.
---
libavcodec/mpeg4audio.h | 82 +++++++++++++++++++++--------------------
1 file changed, 42 insertions(+), 40 deletions(-)
diff --git a/libavcodec/mpeg4audio.h b/libavcodec/mpeg4audio.h
index 5daba7824b..0819e48a42 100644
--- a/libavcodec/mpeg4audio.h
+++ b/libavcodec/mpeg4audio.h
@@ -68,49 +68,51 @@ int avpriv_mpeg4audio_get_config2(MPEG4AudioConfig *c, const uint8_t *buf,
int size, int sync_extension, void *logctx);
enum AudioObjectType {
- AOT_NULL,
+ AOT_NULL = 0,
// Support? Name
- AOT_AAC_MAIN, ///< Y Main
- AOT_AAC_LC, ///< Y Low Complexity
- AOT_AAC_SSR, ///< N (code in SoC repo) Scalable Sample Rate
- AOT_AAC_LTP, ///< Y Long Term Prediction
- AOT_SBR, ///< Y Spectral Band Replication
- AOT_AAC_SCALABLE, ///< N Scalable
- AOT_TWINVQ, ///< N Twin Vector Quantizer
- AOT_CELP, ///< N Code Excited Linear Prediction
- AOT_HVXC, ///< N Harmonic Vector eXcitation Coding
+ AOT_AAC_MAIN = 1, ///< Y Main
+ AOT_AAC_LC = 2, ///< Y Low Complexity
+ AOT_AAC_SSR = 3, ///< N (code in SoC repo) Scalable Sample Rate
+ AOT_AAC_LTP = 4, ///< Y Long Term Prediction
+ AOT_SBR = 5, ///< Y Spectral Band Replication
+ AOT_AAC_SCALABLE = 6, ///< N Scalable
+ AOT_TWINVQ = 7, ///< N Twin Vector Quantizer
+ AOT_CELP = 8, ///< N Code Excited Linear Prediction
+ AOT_HVXC = 9, ///< N Harmonic Vector eXcitation Coding
+
AOT_TTSI = 12, ///< N Text-To-Speech Interface
- AOT_MAINSYNTH, ///< N Main Synthesis
- AOT_WAVESYNTH, ///< N Wavetable Synthesis
- AOT_MIDI, ///< N General MIDI
- AOT_SAFX, ///< N Algorithmic Synthesis and Audio Effects
- AOT_ER_AAC_LC, ///< N Error Resilient Low Complexity
+ AOT_MAINSYNTH = 13, ///< N Main Synthesis
+ AOT_WAVESYNTH = 14, ///< N Wavetable Synthesis
+ AOT_MIDI = 15, ///< N General MIDI
+ AOT_SAFX = 16, ///< N Algorithmic Synthesis and Audio Effects
+ AOT_ER_AAC_LC = 17, ///< N Error Resilient Low Complexity
+
AOT_ER_AAC_LTP = 19, ///< N Error Resilient Long Term Prediction
- AOT_ER_AAC_SCALABLE, ///< N Error Resilient Scalable
- AOT_ER_TWINVQ, ///< N Error Resilient Twin Vector Quantizer
- AOT_ER_BSAC, ///< N Error Resilient Bit-Sliced Arithmetic Coding
- AOT_ER_AAC_LD, ///< N Error Resilient Low Delay
- AOT_ER_CELP, ///< N Error Resilient Code Excited Linear Prediction
- AOT_ER_HVXC, ///< N Error Resilient Harmonic Vector eXcitation Coding
- AOT_ER_HILN, ///< N Error Resilient Harmonic and Individual Lines plus Noise
- AOT_ER_PARAM, ///< N Error Resilient Parametric
- AOT_SSC, ///< N SinuSoidal Coding
- AOT_PS, ///< N Parametric Stereo
- AOT_SURROUND, ///< N MPEG Surround
- AOT_ESCAPE, ///< Y Escape Value
- AOT_L1, ///< Y Layer 1
- AOT_L2, ///< Y Layer 2
- AOT_L3, ///< Y Layer 3
- AOT_DST, ///< N Direct Stream Transfer
- AOT_ALS, ///< Y Audio LosslesS
- AOT_SLS, ///< N Scalable LosslesS
- AOT_SLS_NON_CORE, ///< N Scalable LosslesS (non core)
- AOT_ER_AAC_ELD, ///< N Error Resilient Enhanced Low Delay
- AOT_SMR_SIMPLE, ///< N Symbolic Music Representation Simple
- AOT_SMR_MAIN, ///< N Symbolic Music Representation Main
- AOT_USAC, ///< Y Unified Speech and Audio Coding
- AOT_SAOC, ///< N Spatial Audio Object Coding
- AOT_LD_SURROUND, ///< N Low Delay MPEG Surround
+ AOT_ER_AAC_SCALABLE = 20, ///< N Error Resilient Scalable
+ AOT_ER_TWINVQ = 21, ///< N Error Resilient Twin Vector Quantizer
+ AOT_ER_BSAC = 22, ///< N Error Resilient Bit-Sliced Arithmetic Coding
+ AOT_ER_AAC_LD = 23, ///< N Error Resilient Low Delay
+ AOT_ER_CELP = 24, ///< N Error Resilient Code Excited Linear Prediction
+ AOT_ER_HVXC = 25, ///< N Error Resilient Harmonic Vector eXcitation Coding
+ AOT_ER_HILN = 26, ///< N Error Resilient Harmonic and Individual Lines plus Noise
+ AOT_ER_PARAM = 27, ///< N Error Resilient Parametric
+ AOT_SSC = 28, ///< N SinuSoidal Coding
+ AOT_PS = 29, ///< N Parametric Stereo
+ AOT_SURROUND = 30, ///< N MPEG Surround
+ AOT_ESCAPE = 31, ///< Y Escape Value
+ AOT_L1 = 32, ///< Y Layer 1
+ AOT_L2 = 33, ///< Y Layer 2
+ AOT_L3 = 34, ///< Y Layer 3
+ AOT_DST = 35, ///< N Direct Stream Transfer
+ AOT_ALS = 36, ///< Y Audio LosslesS
+ AOT_SLS = 37, ///< N Scalable LosslesS
+ AOT_SLS_NON_CORE = 38, ///< N Scalable LosslesS (non core)
+ AOT_ER_AAC_ELD = 39, ///< N Error Resilient Enhanced Low Delay
+ AOT_SMR_SIMPLE = 40, ///< N Symbolic Music Representation Simple
+ AOT_SMR_MAIN = 41, ///< N Symbolic Music Representation Main
+ AOT_USAC = 42, ///< Y Unified Speech and Audio Coding
+ AOT_SAOC = 43, ///< N Spatial Audio Object Coding
+ AOT_LD_SURROUND = 44, ///< N Low Delay MPEG Surround
};
#define MAX_PCE_SIZE 320 ///<Maximum size of a PCE including the 3-bit ID_PCE
--
2.43.0.381.gb435a96ce8
_______________________________________________
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] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/4] mpeg4audio: explicitly define each AOT
2024-06-05 3:08 ` [FFmpeg-devel] [PATCH 2/4] mpeg4audio: explicitly define each AOT Lynne via ffmpeg-devel
@ 2024-06-05 16:16 ` James Almer
0 siblings, 0 replies; 10+ messages in thread
From: James Almer @ 2024-06-05 16:16 UTC (permalink / raw)
To: ffmpeg-devel
On 6/5/2024 12:08 AM, Lynne via ffmpeg-devel wrote:
> This makes it far easier to figure out which AOT belongs to which
> profile.
> Also, explicitly highlight the holes.
> ---
> libavcodec/mpeg4audio.h | 82 +++++++++++++++++++++--------------------
> 1 file changed, 42 insertions(+), 40 deletions(-)
>
> diff --git a/libavcodec/mpeg4audio.h b/libavcodec/mpeg4audio.h
> index 5daba7824b..0819e48a42 100644
> --- a/libavcodec/mpeg4audio.h
> +++ b/libavcodec/mpeg4audio.h
> @@ -68,49 +68,51 @@ int avpriv_mpeg4audio_get_config2(MPEG4AudioConfig *c, const uint8_t *buf,
> int size, int sync_extension, void *logctx);
>
> enum AudioObjectType {
> - AOT_NULL,
> + AOT_NULL = 0,
> // Support? Name
> - AOT_AAC_MAIN, ///< Y Main
> - AOT_AAC_LC, ///< Y Low Complexity
> - AOT_AAC_SSR, ///< N (code in SoC repo) Scalable Sample Rate
> - AOT_AAC_LTP, ///< Y Long Term Prediction
> - AOT_SBR, ///< Y Spectral Band Replication
> - AOT_AAC_SCALABLE, ///< N Scalable
> - AOT_TWINVQ, ///< N Twin Vector Quantizer
> - AOT_CELP, ///< N Code Excited Linear Prediction
> - AOT_HVXC, ///< N Harmonic Vector eXcitation Coding
> + AOT_AAC_MAIN = 1, ///< Y Main
> + AOT_AAC_LC = 2, ///< Y Low Complexity
> + AOT_AAC_SSR = 3, ///< N (code in SoC repo) Scalable Sample Rate
> + AOT_AAC_LTP = 4, ///< Y Long Term Prediction
> + AOT_SBR = 5, ///< Y Spectral Band Replication
> + AOT_AAC_SCALABLE = 6, ///< N Scalable
> + AOT_TWINVQ = 7, ///< N Twin Vector Quantizer
> + AOT_CELP = 8, ///< N Code Excited Linear Prediction
> + AOT_HVXC = 9, ///< N Harmonic Vector eXcitation Coding
> +
> AOT_TTSI = 12, ///< N Text-To-Speech Interface
> - AOT_MAINSYNTH, ///< N Main Synthesis
> - AOT_WAVESYNTH, ///< N Wavetable Synthesis
> - AOT_MIDI, ///< N General MIDI
> - AOT_SAFX, ///< N Algorithmic Synthesis and Audio Effects
> - AOT_ER_AAC_LC, ///< N Error Resilient Low Complexity
> + AOT_MAINSYNTH = 13, ///< N Main Synthesis
> + AOT_WAVESYNTH = 14, ///< N Wavetable Synthesis
> + AOT_MIDI = 15, ///< N General MIDI
> + AOT_SAFX = 16, ///< N Algorithmic Synthesis and Audio Effects
> + AOT_ER_AAC_LC = 17, ///< N Error Resilient Low Complexity
> +
> AOT_ER_AAC_LTP = 19, ///< N Error Resilient Long Term Prediction
> - AOT_ER_AAC_SCALABLE, ///< N Error Resilient Scalable
> - AOT_ER_TWINVQ, ///< N Error Resilient Twin Vector Quantizer
> - AOT_ER_BSAC, ///< N Error Resilient Bit-Sliced Arithmetic Coding
> - AOT_ER_AAC_LD, ///< N Error Resilient Low Delay
> - AOT_ER_CELP, ///< N Error Resilient Code Excited Linear Prediction
> - AOT_ER_HVXC, ///< N Error Resilient Harmonic Vector eXcitation Coding
> - AOT_ER_HILN, ///< N Error Resilient Harmonic and Individual Lines plus Noise
> - AOT_ER_PARAM, ///< N Error Resilient Parametric
> - AOT_SSC, ///< N SinuSoidal Coding
> - AOT_PS, ///< N Parametric Stereo
> - AOT_SURROUND, ///< N MPEG Surround
> - AOT_ESCAPE, ///< Y Escape Value
> - AOT_L1, ///< Y Layer 1
> - AOT_L2, ///< Y Layer 2
> - AOT_L3, ///< Y Layer 3
> - AOT_DST, ///< N Direct Stream Transfer
> - AOT_ALS, ///< Y Audio LosslesS
> - AOT_SLS, ///< N Scalable LosslesS
> - AOT_SLS_NON_CORE, ///< N Scalable LosslesS (non core)
> - AOT_ER_AAC_ELD, ///< N Error Resilient Enhanced Low Delay
> - AOT_SMR_SIMPLE, ///< N Symbolic Music Representation Simple
> - AOT_SMR_MAIN, ///< N Symbolic Music Representation Main
> - AOT_USAC, ///< Y Unified Speech and Audio Coding
> - AOT_SAOC, ///< N Spatial Audio Object Coding
> - AOT_LD_SURROUND, ///< N Low Delay MPEG Surround
> + AOT_ER_AAC_SCALABLE = 20, ///< N Error Resilient Scalable
> + AOT_ER_TWINVQ = 21, ///< N Error Resilient Twin Vector Quantizer
> + AOT_ER_BSAC = 22, ///< N Error Resilient Bit-Sliced Arithmetic Coding
> + AOT_ER_AAC_LD = 23, ///< N Error Resilient Low Delay
> + AOT_ER_CELP = 24, ///< N Error Resilient Code Excited Linear Prediction
> + AOT_ER_HVXC = 25, ///< N Error Resilient Harmonic Vector eXcitation Coding
> + AOT_ER_HILN = 26, ///< N Error Resilient Harmonic and Individual Lines plus Noise
> + AOT_ER_PARAM = 27, ///< N Error Resilient Parametric
> + AOT_SSC = 28, ///< N SinuSoidal Coding
> + AOT_PS = 29, ///< N Parametric Stereo
> + AOT_SURROUND = 30, ///< N MPEG Surround
> + AOT_ESCAPE = 31, ///< Y Escape Value
> + AOT_L1 = 32, ///< Y Layer 1
> + AOT_L2 = 33, ///< Y Layer 2
> + AOT_L3 = 34, ///< Y Layer 3
> + AOT_DST = 35, ///< N Direct Stream Transfer
> + AOT_ALS = 36, ///< Y Audio LosslesS
> + AOT_SLS = 37, ///< N Scalable LosslesS
> + AOT_SLS_NON_CORE = 38, ///< N Scalable LosslesS (non core)
> + AOT_ER_AAC_ELD = 39, ///< N Error Resilient Enhanced Low Delay
> + AOT_SMR_SIMPLE = 40, ///< N Symbolic Music Representation Simple
> + AOT_SMR_MAIN = 41, ///< N Symbolic Music Representation Main
> + AOT_USAC = 42, ///< Y Unified Speech and Audio Coding
> + AOT_SAOC = 43, ///< N Spatial Audio Object Coding
> + AOT_LD_SURROUND = 44, ///< N Low Delay MPEG Surround
> };
>
> #define MAX_PCE_SIZE 320 ///<Maximum size of a PCE including the 3-bit ID_PCE
Should be ok.
_______________________________________________
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] 10+ messages in thread
* [FFmpeg-devel] [PATCH 3/4] aac: define a new profile for USAC
2024-06-05 3:08 [FFmpeg-devel] [PATCH 1/4] mpeg4audio: rename AOT_USAC_NOSBR to AOT_USAC Lynne via ffmpeg-devel
2024-06-05 3:08 ` [FFmpeg-devel] [PATCH 2/4] mpeg4audio: explicitly define each AOT Lynne via ffmpeg-devel
@ 2024-06-05 3:08 ` Lynne via ffmpeg-devel
2024-06-05 5:33 ` Andreas Rheinhardt
2024-06-05 16:18 ` James Almer
2024-06-05 3:08 ` [FFmpeg-devel] [PATCH 4/4] lavc: bump minor and add APIchanges entry for new USAC profile Lynne via ffmpeg-devel
2024-06-05 16:15 ` [FFmpeg-devel] [PATCH 1/4] mpeg4audio: rename AOT_USAC_NOSBR to AOT_USAC James Almer
3 siblings, 2 replies; 10+ messages in thread
From: Lynne via ffmpeg-devel @ 2024-06-05 3:08 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Lynne
This allows users to determine whether a stream is USAC or not.
---
libavcodec/aac/aacdec_usac.c | 4 ++++
libavcodec/avcodec.h | 1 +
libavcodec/defs.h | 1 +
libavcodec/profiles.c | 1 +
libavcodec/profiles.h | 1 +
5 files changed, 8 insertions(+)
diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
index 7b36b49d63..5c3bb8d4ac 100644
--- a/libavcodec/aac/aacdec_usac.c
+++ b/libavcodec/aac/aacdec_usac.c
@@ -494,6 +494,8 @@ int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx,
}
}
+ ac->avctx->profile = AV_PROFILE_AAC_USAC;
+
ret = ff_aac_usac_reset_state(ac, oc);
if (ret < 0)
return ret;
@@ -1533,6 +1535,8 @@ int ff_aac_usac_decode_frame(AVCodecContext *avctx, AACDecContext *ac,
ff_aac_output_configure(ac, ac->oc[1].layout_map, ac->oc[1].layout_map_tags,
ac->oc[1].status, 0);
+ ac->avctx->profile = AV_PROFILE_AAC_USAC;
+
indep_flag = get_bits1(gb);
nb_ch_el = 0;
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 2da63c87ea..257e04fe2d 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1652,6 +1652,7 @@ typedef struct AVCodecContext {
#define FF_PROFILE_AAC_HE_V2 28
#define FF_PROFILE_AAC_LD 22
#define FF_PROFILE_AAC_ELD 38
+#define FF_PROFILE_AAC_USAC 41
#define FF_PROFILE_MPEG2_AAC_LOW 128
#define FF_PROFILE_MPEG2_AAC_HE 131
diff --git a/libavcodec/defs.h b/libavcodec/defs.h
index 00d840ec19..7ddfdcad0b 100644
--- a/libavcodec/defs.h
+++ b/libavcodec/defs.h
@@ -73,6 +73,7 @@
#define AV_PROFILE_AAC_HE_V2 28
#define AV_PROFILE_AAC_LD 22
#define AV_PROFILE_AAC_ELD 38
+#define AV_PROFILE_AAC_USAC 41
#define AV_PROFILE_MPEG2_AAC_LOW 128
#define AV_PROFILE_MPEG2_AAC_HE 131
diff --git a/libavcodec/profiles.c b/libavcodec/profiles.c
index 052b77926e..44bdf6f85b 100644
--- a/libavcodec/profiles.c
+++ b/libavcodec/profiles.c
@@ -33,6 +33,7 @@ const AVProfile ff_aac_profiles[] = {
{ AV_PROFILE_AAC_MAIN, "Main" },
{ AV_PROFILE_AAC_SSR, "SSR" },
{ AV_PROFILE_AAC_LTP, "LTP" },
+ { AV_PROFILE_AAC_USAC, "xHE-AAC" },
{ AV_PROFILE_UNKNOWN },
};
diff --git a/libavcodec/profiles.h b/libavcodec/profiles.h
index 842201718b..33b7ffc17a 100644
--- a/libavcodec/profiles.h
+++ b/libavcodec/profiles.h
@@ -35,6 +35,7 @@
FF_AVCTX_PROFILE_OPTION("aac_he_v2", NULL, AUDIO, AV_PROFILE_AAC_HE_V2)\
FF_AVCTX_PROFILE_OPTION("aac_ld", NULL, AUDIO, AV_PROFILE_AAC_LD)\
FF_AVCTX_PROFILE_OPTION("aac_eld", NULL, AUDIO, AV_PROFILE_AAC_ELD)\
+ FF_AVCTX_PROFILE_OPTION("aac_xhe", NULL, AUDIO, AV_PROFILE_AAC_USAC)\
FF_AVCTX_PROFILE_OPTION("mpeg2_aac_low", NULL, AUDIO, AV_PROFILE_MPEG2_AAC_LOW)\
FF_AVCTX_PROFILE_OPTION("mpeg2_aac_he", NULL, AUDIO, AV_PROFILE_MPEG2_AAC_HE)\
--
2.43.0.381.gb435a96ce8
_______________________________________________
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] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/4] aac: define a new profile for USAC
2024-06-05 3:08 ` [FFmpeg-devel] [PATCH 3/4] aac: define a new profile for USAC Lynne via ffmpeg-devel
@ 2024-06-05 5:33 ` Andreas Rheinhardt
2024-06-05 13:08 ` Lynne via ffmpeg-devel
2024-06-05 16:18 ` James Almer
1 sibling, 1 reply; 10+ messages in thread
From: Andreas Rheinhardt @ 2024-06-05 5:33 UTC (permalink / raw)
To: ffmpeg-devel
Lynne via ffmpeg-devel:
> This allows users to determine whether a stream is USAC or not.
> ---
> libavcodec/aac/aacdec_usac.c | 4 ++++
> libavcodec/avcodec.h | 1 +
> libavcodec/defs.h | 1 +
> libavcodec/profiles.c | 1 +
> libavcodec/profiles.h | 1 +
> 5 files changed, 8 insertions(+)
>
> diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
> index 7b36b49d63..5c3bb8d4ac 100644
> --- a/libavcodec/aac/aacdec_usac.c
> +++ b/libavcodec/aac/aacdec_usac.c
> @@ -494,6 +494,8 @@ int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx,
> }
> }
>
> + ac->avctx->profile = AV_PROFILE_AAC_USAC;
> +
> ret = ff_aac_usac_reset_state(ac, oc);
> if (ret < 0)
> return ret;
> @@ -1533,6 +1535,8 @@ int ff_aac_usac_decode_frame(AVCodecContext *avctx, AACDecContext *ac,
> ff_aac_output_configure(ac, ac->oc[1].layout_map, ac->oc[1].layout_map_tags,
> ac->oc[1].status, 0);
>
> + ac->avctx->profile = AV_PROFILE_AAC_USAC;
> +
> indep_flag = get_bits1(gb);
>
> nb_ch_el = 0;
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 2da63c87ea..257e04fe2d 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -1652,6 +1652,7 @@ typedef struct AVCodecContext {
> #define FF_PROFILE_AAC_HE_V2 28
> #define FF_PROFILE_AAC_LD 22
> #define FF_PROFILE_AAC_ELD 38
> +#define FF_PROFILE_AAC_USAC 41
Don't add new deprecated defines.
> #define FF_PROFILE_MPEG2_AAC_LOW 128
> #define FF_PROFILE_MPEG2_AAC_HE 131
>
> diff --git a/libavcodec/defs.h b/libavcodec/defs.h
> index 00d840ec19..7ddfdcad0b 100644
> --- a/libavcodec/defs.h
> +++ b/libavcodec/defs.h
> @@ -73,6 +73,7 @@
> #define AV_PROFILE_AAC_HE_V2 28
> #define AV_PROFILE_AAC_LD 22
> #define AV_PROFILE_AAC_ELD 38
> +#define AV_PROFILE_AAC_USAC 41
> #define AV_PROFILE_MPEG2_AAC_LOW 128
> #define AV_PROFILE_MPEG2_AAC_HE 131
>
> diff --git a/libavcodec/profiles.c b/libavcodec/profiles.c
> index 052b77926e..44bdf6f85b 100644
> --- a/libavcodec/profiles.c
> +++ b/libavcodec/profiles.c
> @@ -33,6 +33,7 @@ const AVProfile ff_aac_profiles[] = {
> { AV_PROFILE_AAC_MAIN, "Main" },
> { AV_PROFILE_AAC_SSR, "SSR" },
> { AV_PROFILE_AAC_LTP, "LTP" },
> + { AV_PROFILE_AAC_USAC, "xHE-AAC" },
> { AV_PROFILE_UNKNOWN },
> };
>
> diff --git a/libavcodec/profiles.h b/libavcodec/profiles.h
> index 842201718b..33b7ffc17a 100644
> --- a/libavcodec/profiles.h
> +++ b/libavcodec/profiles.h
> @@ -35,6 +35,7 @@
> FF_AVCTX_PROFILE_OPTION("aac_he_v2", NULL, AUDIO, AV_PROFILE_AAC_HE_V2)\
> FF_AVCTX_PROFILE_OPTION("aac_ld", NULL, AUDIO, AV_PROFILE_AAC_LD)\
> FF_AVCTX_PROFILE_OPTION("aac_eld", NULL, AUDIO, AV_PROFILE_AAC_ELD)\
> + FF_AVCTX_PROFILE_OPTION("aac_xhe", NULL, AUDIO, AV_PROFILE_AAC_USAC)\
> FF_AVCTX_PROFILE_OPTION("mpeg2_aac_low", NULL, AUDIO, AV_PROFILE_MPEG2_AAC_LOW)\
> FF_AVCTX_PROFILE_OPTION("mpeg2_aac_he", NULL, AUDIO, AV_PROFILE_MPEG2_AAC_HE)\
>
_______________________________________________
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] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/4] aac: define a new profile for USAC
2024-06-05 5:33 ` Andreas Rheinhardt
@ 2024-06-05 13:08 ` Lynne via ffmpeg-devel
0 siblings, 0 replies; 10+ messages in thread
From: Lynne via ffmpeg-devel @ 2024-06-05 13:08 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Lynne
[-- Attachment #1.1.1.1: Type: text/plain, Size: 1703 bytes --]
On 05/06/2024 07:33, Andreas Rheinhardt wrote:
> Lynne via ffmpeg-devel:
>> This allows users to determine whether a stream is USAC or not.
>> ---
>> libavcodec/aac/aacdec_usac.c | 4 ++++
>> libavcodec/avcodec.h | 1 +
>> libavcodec/defs.h | 1 +
>> libavcodec/profiles.c | 1 +
>> libavcodec/profiles.h | 1 +
>> 5 files changed, 8 insertions(+)
>>
>> diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
>> index 7b36b49d63..5c3bb8d4ac 100644
>> --- a/libavcodec/aac/aacdec_usac.c
>> +++ b/libavcodec/aac/aacdec_usac.c
>> @@ -494,6 +494,8 @@ int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx,
>> }
>> }
>>
>> + ac->avctx->profile = AV_PROFILE_AAC_USAC;
>> +
>> ret = ff_aac_usac_reset_state(ac, oc);
>> if (ret < 0)
>> return ret;
>> @@ -1533,6 +1535,8 @@ int ff_aac_usac_decode_frame(AVCodecContext *avctx, AACDecContext *ac,
>> ff_aac_output_configure(ac, ac->oc[1].layout_map, ac->oc[1].layout_map_tags,
>> ac->oc[1].status, 0);
>>
>> + ac->avctx->profile = AV_PROFILE_AAC_USAC;
>> +
>> indep_flag = get_bits1(gb);
>>
>> nb_ch_el = 0;
>> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
>> index 2da63c87ea..257e04fe2d 100644
>> --- a/libavcodec/avcodec.h
>> +++ b/libavcodec/avcodec.h
>> @@ -1652,6 +1652,7 @@ typedef struct AVCodecContext {
>> #define FF_PROFILE_AAC_HE_V2 28
>> #define FF_PROFILE_AAC_LD 22
>> #define FF_PROFILE_AAC_ELD 38
>> +#define FF_PROFILE_AAC_USAC 41
>
> Don't add new deprecated defines.
Didn't notice. Removed locally.
[-- Attachment #1.1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 637 bytes --]
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/4] aac: define a new profile for USAC
2024-06-05 3:08 ` [FFmpeg-devel] [PATCH 3/4] aac: define a new profile for USAC Lynne via ffmpeg-devel
2024-06-05 5:33 ` Andreas Rheinhardt
@ 2024-06-05 16:18 ` James Almer
1 sibling, 0 replies; 10+ messages in thread
From: James Almer @ 2024-06-05 16:18 UTC (permalink / raw)
To: ffmpeg-devel
On 6/5/2024 12:08 AM, Lynne via ffmpeg-devel wrote:
> This allows users to determine whether a stream is USAC or not.
> ---
> libavcodec/aac/aacdec_usac.c | 4 ++++
> libavcodec/avcodec.h | 1 +
> libavcodec/defs.h | 1 +
> libavcodec/profiles.c | 1 +
> libavcodec/profiles.h | 1 +
> 5 files changed, 8 insertions(+)
>
> diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
> index 7b36b49d63..5c3bb8d4ac 100644
> --- a/libavcodec/aac/aacdec_usac.c
> +++ b/libavcodec/aac/aacdec_usac.c
> @@ -494,6 +494,8 @@ int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx,
> }
> }
>
> + ac->avctx->profile = AV_PROFILE_AAC_USAC;
> +
> ret = ff_aac_usac_reset_state(ac, oc);
> if (ret < 0)
> return ret;
> @@ -1533,6 +1535,8 @@ int ff_aac_usac_decode_frame(AVCodecContext *avctx, AACDecContext *ac,
> ff_aac_output_configure(ac, ac->oc[1].layout_map, ac->oc[1].layout_map_tags,
> ac->oc[1].status, 0);
>
> + ac->avctx->profile = AV_PROFILE_AAC_USAC;
> +
> indep_flag = get_bits1(gb);
>
> nb_ch_el = 0;
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 2da63c87ea..257e04fe2d 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -1652,6 +1652,7 @@ typedef struct AVCodecContext {
> #define FF_PROFILE_AAC_HE_V2 28
> #define FF_PROFILE_AAC_LD 22
> #define FF_PROFILE_AAC_ELD 38
> +#define FF_PROFILE_AAC_USAC 41
> #define FF_PROFILE_MPEG2_AAC_LOW 128
> #define FF_PROFILE_MPEG2_AAC_HE 131
>
> diff --git a/libavcodec/defs.h b/libavcodec/defs.h
> index 00d840ec19..7ddfdcad0b 100644
> --- a/libavcodec/defs.h
> +++ b/libavcodec/defs.h
> @@ -73,6 +73,7 @@
> #define AV_PROFILE_AAC_HE_V2 28
> #define AV_PROFILE_AAC_LD 22
> #define AV_PROFILE_AAC_ELD 38
> +#define AV_PROFILE_AAC_USAC 41
> #define AV_PROFILE_MPEG2_AAC_LOW 128
> #define AV_PROFILE_MPEG2_AAC_HE 131
>
> diff --git a/libavcodec/profiles.c b/libavcodec/profiles.c
> index 052b77926e..44bdf6f85b 100644
> --- a/libavcodec/profiles.c
> +++ b/libavcodec/profiles.c
> @@ -33,6 +33,7 @@ const AVProfile ff_aac_profiles[] = {
> { AV_PROFILE_AAC_MAIN, "Main" },
> { AV_PROFILE_AAC_SSR, "SSR" },
> { AV_PROFILE_AAC_LTP, "LTP" },
> + { AV_PROFILE_AAC_USAC, "xHE-AAC" },
> { AV_PROFILE_UNKNOWN },
> };
>
> diff --git a/libavcodec/profiles.h b/libavcodec/profiles.h
> index 842201718b..33b7ffc17a 100644
> --- a/libavcodec/profiles.h
> +++ b/libavcodec/profiles.h
> @@ -35,6 +35,7 @@
> FF_AVCTX_PROFILE_OPTION("aac_he_v2", NULL, AUDIO, AV_PROFILE_AAC_HE_V2)\
> FF_AVCTX_PROFILE_OPTION("aac_ld", NULL, AUDIO, AV_PROFILE_AAC_LD)\
> FF_AVCTX_PROFILE_OPTION("aac_eld", NULL, AUDIO, AV_PROFILE_AAC_ELD)\
> + FF_AVCTX_PROFILE_OPTION("aac_xhe", NULL, AUDIO, AV_PROFILE_AAC_USAC)\
> FF_AVCTX_PROFILE_OPTION("mpeg2_aac_low", NULL, AUDIO, AV_PROFILE_MPEG2_AAC_LOW)\
> FF_AVCTX_PROFILE_OPTION("mpeg2_aac_he", NULL, AUDIO, AV_PROFILE_MPEG2_AAC_HE)\
Should be ok without FF_PROFILE_AAC_USAC.
_______________________________________________
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] 10+ messages in thread
* [FFmpeg-devel] [PATCH 4/4] lavc: bump minor and add APIchanges entry for new USAC profile
2024-06-05 3:08 [FFmpeg-devel] [PATCH 1/4] mpeg4audio: rename AOT_USAC_NOSBR to AOT_USAC Lynne via ffmpeg-devel
2024-06-05 3:08 ` [FFmpeg-devel] [PATCH 2/4] mpeg4audio: explicitly define each AOT Lynne via ffmpeg-devel
2024-06-05 3:08 ` [FFmpeg-devel] [PATCH 3/4] aac: define a new profile for USAC Lynne via ffmpeg-devel
@ 2024-06-05 3:08 ` Lynne via ffmpeg-devel
2024-06-05 16:17 ` James Almer
2024-06-05 16:15 ` [FFmpeg-devel] [PATCH 1/4] mpeg4audio: rename AOT_USAC_NOSBR to AOT_USAC James Almer
3 siblings, 1 reply; 10+ messages in thread
From: Lynne via ffmpeg-devel @ 2024-06-05 3:08 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Lynne
---
doc/APIchanges | 3 +++
libavcodec/version.h | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index e36a01336c..d9bec790a3 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07
API changes, most recent first:
+2024-06-05 - xxxxxxxxxx - lavc 61.7.100 - avcodec.h, defs.h
+ Add FF_PROFILE_AAC_USAC and AV_PROFILE_AAC_USAC.
+
2024-06-02 - xxxxxxxxxx - lavu 59.21.100 - channel_layout.h
Add AV_CHAN_SIDE_SURROUND_RIGHT and AV_CH_SIDE_SURROUND_LEFT.
Add AV_CHAN_SIDE_SURROUND_RIGHT and AV_CH_SIDE_SURROUND_RIGHT.
diff --git a/libavcodec/version.h b/libavcodec/version.h
index da54f87887..7acb261bb3 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
#include "version_major.h"
-#define LIBAVCODEC_VERSION_MINOR 6
+#define LIBAVCODEC_VERSION_MINOR 7
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
--
2.43.0.381.gb435a96ce8
_______________________________________________
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] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 4/4] lavc: bump minor and add APIchanges entry for new USAC profile
2024-06-05 3:08 ` [FFmpeg-devel] [PATCH 4/4] lavc: bump minor and add APIchanges entry for new USAC profile Lynne via ffmpeg-devel
@ 2024-06-05 16:17 ` James Almer
0 siblings, 0 replies; 10+ messages in thread
From: James Almer @ 2024-06-05 16:17 UTC (permalink / raw)
To: ffmpeg-devel
On 6/5/2024 12:08 AM, Lynne via ffmpeg-devel wrote:
> ---
> doc/APIchanges | 3 +++
> libavcodec/version.h | 2 +-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/doc/APIchanges b/doc/APIchanges
> index e36a01336c..d9bec790a3 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07
>
> API changes, most recent first:
>
> +2024-06-05 - xxxxxxxxxx - lavc 61.7.100 - avcodec.h, defs.h
> + Add FF_PROFILE_AAC_USAC and AV_PROFILE_AAC_USAC.
Don't forget to remove FF_PROFILE_AAC_USAC here as well (the the
reference to its header).
LGTM aside from that.
> +
> 2024-06-02 - xxxxxxxxxx - lavu 59.21.100 - channel_layout.h
> Add AV_CHAN_SIDE_SURROUND_RIGHT and AV_CH_SIDE_SURROUND_LEFT.
> Add AV_CHAN_SIDE_SURROUND_RIGHT and AV_CH_SIDE_SURROUND_RIGHT.
> diff --git a/libavcodec/version.h b/libavcodec/version.h
> index da54f87887..7acb261bb3 100644
> --- a/libavcodec/version.h
> +++ b/libavcodec/version.h
> @@ -29,7 +29,7 @@
>
> #include "version_major.h"
>
> -#define LIBAVCODEC_VERSION_MINOR 6
> +#define LIBAVCODEC_VERSION_MINOR 7
> #define LIBAVCODEC_VERSION_MICRO 100
>
> #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
_______________________________________________
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] 10+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/4] mpeg4audio: rename AOT_USAC_NOSBR to AOT_USAC
2024-06-05 3:08 [FFmpeg-devel] [PATCH 1/4] mpeg4audio: rename AOT_USAC_NOSBR to AOT_USAC Lynne via ffmpeg-devel
` (2 preceding siblings ...)
2024-06-05 3:08 ` [FFmpeg-devel] [PATCH 4/4] lavc: bump minor and add APIchanges entry for new USAC profile Lynne via ffmpeg-devel
@ 2024-06-05 16:15 ` James Almer
3 siblings, 0 replies; 10+ messages in thread
From: James Almer @ 2024-06-05 16:15 UTC (permalink / raw)
To: ffmpeg-devel
On 6/5/2024 12:08 AM, Lynne via ffmpeg-devel wrote:
> The issue is that AOT 45 isn't defined anywhere, and looking at the git
> blame, it seems to have sprung up through a reordering of the enum,
> and adding a hole.
>
> The spec does not define an explicit AOT for SBR and no SBR, and only
> uses AOT 42 (previously AOT_USAC_NOSBR), so just rename AOT_USAC to
> it and replace its use everywhere.
> ---
> libavcodec/aac/aacdec.c | 7 ++-----
> libavcodec/mpeg4audio.h | 3 +--
> 2 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c
> index 2b8322fc68..24d2bdde4c 100644
> --- a/libavcodec/aac/aacdec.c
> +++ b/libavcodec/aac/aacdec.c
> @@ -1046,7 +1046,6 @@ static int decode_audio_specific_config_gb(AACDecContext *ac,
> return ret;
> break;
> #if CONFIG_AAC_DECODER
> - case AOT_USAC_NOSBR: /* fallthrough */
> case AOT_USAC:
> if ((ret = ff_aac_usac_config_decode(ac, avctx, gb,
> oc, m4ac->chan_config)) < 0)
> @@ -1571,8 +1570,7 @@ int ff_aac_decode_tns(AACDecContext *ac, TemporalNoiseShaping *tns,
> GetBitContext *gb, const IndividualChannelStream *ics)
> {
> int tns_max_order = INT32_MAX;
> - const int is_usac = ac->oc[1].m4ac.object_type == AOT_USAC ||
> - ac->oc[1].m4ac.object_type == AOT_USAC_NOSBR;
> + const int is_usac = ac->oc[1].m4ac.object_type == AOT_USAC;
> int w, filt, i, coef_len, coef_res, coef_compress;
> const int is8 = ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE;
>
> @@ -2421,8 +2419,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame,
>
> ac->tags_mapped = 0;
>
> - if ((ac->oc[1].m4ac.object_type == AOT_USAC) ||
> - (ac->oc[1].m4ac.object_type == AOT_USAC_NOSBR)) {
> + if (ac->oc[1].m4ac.object_type == AOT_USAC) {
> if (ac->is_fixed) {
> avpriv_report_missing_feature(ac->avctx,
> "AAC USAC fixed-point decoding");
> diff --git a/libavcodec/mpeg4audio.h b/libavcodec/mpeg4audio.h
> index 56615ef321..5daba7824b 100644
> --- a/libavcodec/mpeg4audio.h
> +++ b/libavcodec/mpeg4audio.h
> @@ -108,10 +108,9 @@ enum AudioObjectType {
> AOT_ER_AAC_ELD, ///< N Error Resilient Enhanced Low Delay
> AOT_SMR_SIMPLE, ///< N Symbolic Music Representation Simple
> AOT_SMR_MAIN, ///< N Symbolic Music Representation Main
> - AOT_USAC_NOSBR, ///< N Unified Speech and Audio Coding (no SBR)
> + AOT_USAC, ///< Y Unified Speech and Audio Coding
> AOT_SAOC, ///< N Spatial Audio Object Coding
> AOT_LD_SURROUND, ///< N Low Delay MPEG Surround
> - AOT_USAC, ///< N Unified Speech and Audio Coding
> };
>
> #define MAX_PCE_SIZE 320 ///<Maximum size of a PCE including the 3-bit ID_PCE
Should be ok.
_______________________________________________
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] 10+ messages in thread