aboutsummaryrefslogtreecommitdiffstats
path: root/libMpegTPEnc/src/tpenc_asc.cpp
diff options
context:
space:
mode:
authorDave Burke <daveburke@google.com>2012-05-12 13:17:25 -0700
committerDave Burke <daveburke@google.com>2012-05-12 13:47:46 -0700
commit698b536f3b34a7cfc41a80e1034cc359456bdd66 (patch)
treefa3dfa75d535b188725f1b84316cb4b06db79771 /libMpegTPEnc/src/tpenc_asc.cpp
parent9bf37cc9712506b2483650c82d3c41152337ef7e (diff)
downloadfdk-aac-dabplus-698b536f3b34a7cfc41a80e1034cc359456bdd66.tar.gz
fdk-aac-dabplus-698b536f3b34a7cfc41a80e1034cc359456bdd66.tar.bz2
fdk-aac-dabplus-698b536f3b34a7cfc41a80e1034cc359456bdd66.zip
Update to 2012_05_11 version.
Fixes: - Don't throw error for invalid bitrate but limit to functional value - More robust ASC parsing - More robust handling of corrupt bitstreams - Handle multiple raw access units Change-Id: Ib49fe2545ff4185fe924126da702fe84ac5c2d87
Diffstat (limited to 'libMpegTPEnc/src/tpenc_asc.cpp')
-rw-r--r--libMpegTPEnc/src/tpenc_asc.cpp33
1 files changed, 10 insertions, 23 deletions
diff --git a/libMpegTPEnc/src/tpenc_asc.cpp b/libMpegTPEnc/src/tpenc_asc.cpp
index 674ffe2..8b7f804 100644
--- a/libMpegTPEnc/src/tpenc_asc.cpp
+++ b/libMpegTPEnc/src/tpenc_asc.cpp
@@ -33,15 +33,6 @@
#include "FDK_bitstream.h"
#include "genericStds.h"
-#define ASC_FLAG_EXT 0x0001
-#define ASC_FLAG_SBR 0x0002
-#define ASC_FLAG_SBRCRC 0x0004
-#define ASC_FLAG_VCB11 0x0010
-#define ASC_FLAG_RVLC 0x0020
-#define ASC_FLAG_HCR 0x0040
-#define ASC_FLAG_HCR 0x0040
-
-
#define PCE_MAX_ELEMENTS 8
/**
@@ -353,7 +344,6 @@ int transportEnc_writeELDSpecificConfig(
HANDLE_FDK_BITSTREAM hBs,
CODER_CONFIG *config,
int epConfig,
- int flags,
CSTpCallBacks *cb
)
{
@@ -363,14 +353,14 @@ int transportEnc_writeELDSpecificConfig(
}
FDKwriteBits(hBs, (config->samplesPerFrame == 480) ? 1 : 0, 1);
- FDKwriteBits(hBs, (flags & ASC_FLAG_VCB11) ? 1:0, 1);
- FDKwriteBits(hBs, (flags & ASC_FLAG_RVLC ) ? 1:0, 1);
- FDKwriteBits(hBs, (flags & ASC_FLAG_HCR ) ? 1:0, 1);
+ FDKwriteBits(hBs, (config->flags & CC_VCB11 ) ? 1:0, 1);
+ FDKwriteBits(hBs, (config->flags & CC_RVLC ) ? 1:0, 1);
+ FDKwriteBits(hBs, (config->flags & CC_HCR ) ? 1:0, 1);
- FDKwriteBits(hBs, (flags & ASC_FLAG_SBR) ? 1:0, 1); /* SBR header flag */
- if ( (flags & ASC_FLAG_SBR) ) {
+ FDKwriteBits(hBs, (config->flags & CC_SBR) ? 1:0, 1); /* SBR header flag */
+ if ( (config->flags & CC_SBR) ) {
FDKwriteBits(hBs, (config->samplingRate == config->extSamplingRate) ? 0:1, 1); /* Samplerate Flag */
- FDKwriteBits(hBs, (flags &ASC_FLAG_SBRCRC) ? 1:0, 1); /* SBR CRC flag*/
+ FDKwriteBits(hBs, (config->flags & CC_SBRCRC) ? 1:0, 1); /* SBR CRC flag*/
if (cb->cbSbr != NULL) {
const PCE_CONFIGURATION *pPce;
@@ -399,7 +389,7 @@ int transportEnc_writeASC (
CSTpCallBacks *cb
)
{
- UINT flags = 0;
+ UINT extFlag = 0;
int err;
int epConfig = 0;
@@ -416,14 +406,11 @@ int transportEnc_writeASC (
case AOT_ER_AAC_LD:
case AOT_ER_AAC_ELD:
case AOT_USAC:
- flags |= ASC_FLAG_EXT;
+ extFlag = 1;
break;
default:
break;
}
- if (config->flags & CC_SBR) {
- flags |= ASC_FLAG_SBR;
- }
if (config->extAOT == AOT_SBR || config->extAOT == AOT_PS)
writeAot(asc, config->extAOT);
@@ -462,14 +449,14 @@ int transportEnc_writeASC (
case AOT_ER_TWIN_VQ:
case AOT_ER_BSAC:
case AOT_ER_AAC_LD:
- err = transportEnc_writeGASpecificConfig(asc, config, (flags & ASC_FLAG_EXT) ? 1:0, alignAnchor);
+ err = transportEnc_writeGASpecificConfig(asc, config, extFlag, alignAnchor);
if (err)
return err;
break;
#endif /* TP_GA_ENABLE */
#ifdef TP_ELD_ENABLE
case AOT_ER_AAC_ELD:
- err = transportEnc_writeELDSpecificConfig(asc, config, epConfig, flags, cb);
+ err = transportEnc_writeELDSpecificConfig(asc, config, epConfig, cb);
if (err)
return err;
break;