Re-add the WIP AAC parser
So it is considered when refactoring.
This commit is contained in:
parent
0e15c74103
commit
a5813f742e
|
@ -10,8 +10,8 @@ set(HEADER_FILES
|
|||
mp4/mp4tagfield.h
|
||||
mp4/mp4track.h
|
||||
mp4/mpeg4descriptor.h
|
||||
# aac/aaccodebook.h
|
||||
# aac/aacframe.h
|
||||
aac/aaccodebook.h
|
||||
aac/aacframe.h
|
||||
abstractattachment.h
|
||||
abstractchapter.h
|
||||
abstractcontainer.h
|
||||
|
@ -84,8 +84,8 @@ set(SRC_FILES
|
|||
mp4/mp4tagfield.cpp
|
||||
mp4/mp4track.cpp
|
||||
mp4/mpeg4descriptor.cpp
|
||||
# aac/aaccodebook.cpp
|
||||
# aac/aacframe.cpp
|
||||
aac/aaccodebook.cpp
|
||||
aac/aacframe.cpp
|
||||
abstractattachment.cpp
|
||||
abstractchapter.cpp
|
||||
abstractcontainer.cpp
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "./aaccodebook.h"
|
||||
|
||||
namespace Media {
|
||||
namespace TagParser {
|
||||
|
||||
const AacHcb *const aacHcbTable[] = {
|
||||
0, aacHcb1Step1, aacHcb2Step1, 0, aacHcb4Step1, 0, aacHcb6Step1, 0, aacHcb8Step1, 0, aacHcb10Step1, aacHcb11Step1
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#ifndef AACCODEBOOK_H
|
||||
#define AACCODEBOOK_H
|
||||
#ifndef TAG_PARSER_AACCODEBOOK_H
|
||||
#define TAG_PARSER_AACCODEBOOK_H
|
||||
|
||||
// NOTE: The AAC parser is still WIP. It does not work yet and its API/ABI may change even in patch releases.
|
||||
|
||||
#include <c++utilities/application/global.h>
|
||||
#include <c++utilities/conversion/types.h>
|
||||
|
||||
namespace Media {
|
||||
namespace TagParser {
|
||||
|
||||
struct LIB_EXPORT AacHcb
|
||||
{
|
||||
|
@ -82,4 +84,4 @@ extern const sbyte tHuffmanNoiseBal30dB[24][2];
|
|||
|
||||
}
|
||||
|
||||
#endif // AACCODEBOOK_H
|
||||
#endif // TAG_PARSER_AACCODEBOOK_H
|
||||
|
|
|
@ -21,7 +21,7 @@ using namespace IoUtilities;
|
|||
* in the rest of the library.
|
||||
*/
|
||||
|
||||
namespace Media {
|
||||
namespace TagParser {
|
||||
|
||||
/*!
|
||||
* \cond
|
||||
|
@ -1334,7 +1334,8 @@ shared_ptr<AacSbrInfo> AacFrameElementParser::makeSbrInfo(byte sbrElement, bool
|
|||
|
||||
void AacFrameElementParser::parseSbrExtensionData(byte sbrElement, uint16 count, bool crcFlag)
|
||||
{
|
||||
uint16 alignBitCount = 0;
|
||||
VAR_UNUSED(count);
|
||||
//uint16 alignBitCount = 0;
|
||||
std::shared_ptr<AacSbrInfo> &sbr = m_sbrElements[sbrElement];
|
||||
if(m_psResetFlag) {
|
||||
sbr->psResetFlag = m_psResetFlag;
|
||||
|
@ -1663,7 +1664,7 @@ void AacFrameElementParser::calculateWindowGroupingInfo(AacIcsInfo &ics)
|
|||
}
|
||||
ics.swbOffset[ics.swbCount] = ics.maxSwbOffset = m_frameLength / 8;
|
||||
for(byte i = 0; i < ics.windowCount - 1; ++i) {
|
||||
if(!ics.scaleFactorGrouping & (1 << (6 - i))) {
|
||||
if(!(ics.scaleFactorGrouping & (1 << (6 - i)))) {
|
||||
ics.windowGroupLengths[ics.windowGroupCount] = 1;
|
||||
++ics.windowGroupCount;
|
||||
} else {
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
#ifndef AACFRAME_H
|
||||
#define AACFRAME_H
|
||||
#ifndef TAG_PARSER_AACFRAME_H
|
||||
#define TAG_PARSER_AACFRAME_H
|
||||
|
||||
// NOTE: The AAC parser is still WIP. It does not work yet and its API/ABI may change even in patch releases.
|
||||
|
||||
#include <c++utilities/io/bitreader.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Media {
|
||||
namespace TagParser {
|
||||
|
||||
class AdtsFrame;
|
||||
|
||||
|
@ -513,8 +515,8 @@ private:
|
|||
AacDrcInfo m_drc;
|
||||
AacProgramConfig m_pce;
|
||||
byte m_sbrPresentFlag;
|
||||
byte m_forceUpSampling;
|
||||
byte m_downSampledSbr;
|
||||
//byte m_forceUpSampling;
|
||||
//byte m_downSampledSbr;
|
||||
std::shared_ptr<AacSbrInfo> m_sbrElements[aacMaxSyntaxElements];
|
||||
byte m_psUsed[aacMaxSyntaxElements];
|
||||
byte m_psUsedGlobal;
|
||||
|
@ -541,8 +543,8 @@ inline AacFrameElementParser::AacFrameElementParser(byte audioObjectId, byte sam
|
|||
//m_channel(0),
|
||||
//m_pairedChannel(0),
|
||||
m_sbrPresentFlag(0),
|
||||
m_forceUpSampling(0),
|
||||
m_downSampledSbr(0),
|
||||
//m_forceUpSampling(0),
|
||||
//m_downSampledSbr(0),
|
||||
m_sbrElements{0},
|
||||
m_psUsed{0},
|
||||
m_psUsedGlobal(0),
|
||||
|
@ -562,4 +564,4 @@ constexpr int16 AacFrameElementParser::huffmanCodebook(byte i)
|
|||
|
||||
}
|
||||
|
||||
#endif // AACFRAME_H
|
||||
#endif // TAG_PARSER_AACFRAME_H
|
||||
|
|
Loading…
Reference in New Issue