History

mpeg4audio: rename AOT_USAC_NOSBR to AOT_USAC

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.

Lynne committed 2 years ago

Commit 8a2fe8a1 parent 840f2bc2 files · +3 −7Browse files

Showing the changes to libavcodec (2 of 2 files). Show all

Unified · Split

2 files
  1. libavcodec/aac/aacdec.c +2 −5
  2. libavcodec/mpeg4audio.h +1 −2
libavcodec/aac/aacdec.c+2−5
@@ -1046,7 +1046,6 @@ static int decode_audio_specific_config_gb(AACDecContext *ac, · 1045 unmodified lines
1046 return ret;1046 return ret;
1047 break;1047 break;
1048#if CONFIG_AAC_DECODER1048#if CONFIG_AAC_DECODER
1049 case AOT_USAC_NOSBR: /* fallthrough */
1050 case AOT_USAC:1049 case AOT_USAC:
1051 if ((ret = ff_aac_usac_config_decode(ac, avctx, gb,1050 if ((ret = ff_aac_usac_config_decode(ac, avctx, gb,
1052 oc, m4ac->chan_config)) < 0)1051 oc, m4ac->chan_config)) < 0)
@@ -1571,8 +1570,7 @@ int ff_aac_decode_tns(AACDecContext *ac, TemporalNoiseShaping *tns, · 518 unmodified lines
1571 GetBitContext *gb, const IndividualChannelStream *ics)1570 GetBitContext *gb, const IndividualChannelStream *ics)
1572{1571{
1573 int tns_max_order = INT32_MAX;1572 int tns_max_order = INT32_MAX;
1574 const int is_usac = ac->oc[1].m4ac.object_type == AOT_USAC ||1573 const int is_usac = ac->oc[1].m4ac.object_type == AOT_USAC;
1575 ac->oc[1].m4ac.object_type == AOT_USAC_NOSBR;
1576 int w, filt, i, coef_len, coef_res, coef_compress;1574 int w, filt, i, coef_len, coef_res, coef_compress;
1577 const int is8 = ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE;1575 const int is8 = ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE;
1578 1576
@@ -2421,8 +2419,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame, · 842 unmodified lines
2421 2419
2422 ac->tags_mapped = 0;2420 ac->tags_mapped = 0;
2423 2421
2424 if ((ac->oc[1].m4ac.object_type == AOT_USAC) ||2422 if (ac->oc[1].m4ac.object_type == AOT_USAC) {
2425 (ac->oc[1].m4ac.object_type == AOT_USAC_NOSBR)) {
2426 if (ac->is_fixed) {2423 if (ac->is_fixed) {
2427 avpriv_report_missing_feature(ac->avctx,2424 avpriv_report_missing_feature(ac->avctx,
2428 "AAC USAC fixed-point decoding");2425 "AAC USAC fixed-point decoding");
libavcodec/mpeg4audio.h+1−2
@@ -108,10 +108,9 @@ enum AudioObjectType { · 107 unmodified lines
108 AOT_ER_AAC_ELD, ///< N Error Resilient Enhanced Low Delay108 AOT_ER_AAC_ELD, ///< N Error Resilient Enhanced Low Delay
109 AOT_SMR_SIMPLE, ///< N Symbolic Music Representation Simple109 AOT_SMR_SIMPLE, ///< N Symbolic Music Representation Simple
110 AOT_SMR_MAIN, ///< N Symbolic Music Representation Main110 AOT_SMR_MAIN, ///< N Symbolic Music Representation Main
111 AOT_USAC_NOSBR, ///< N Unified Speech and Audio Coding (no SBR)111 AOT_USAC, ///< Y Unified Speech and Audio Coding
112 AOT_SAOC, ///< N Spatial Audio Object Coding112 AOT_SAOC, ///< N Spatial Audio Object Coding
113 AOT_LD_SURROUND, ///< N Low Delay MPEG Surround113 AOT_LD_SURROUND, ///< N Low Delay MPEG Surround
114 AOT_USAC, ///< N Unified Speech and Audio Coding
115};114};
116 115
117#define MAX_PCE_SIZE 320 ///<Maximum size of a PCE including the 3-bit ID_PCE116#define MAX_PCE_SIZE 320 ///<Maximum size of a PCE including the 3-bit ID_PCE

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t