DRCData

Author:
Armin Trattnig
Version:
1.0
Includes:
"DRCAtoms.h"
<stdio.h>
<stdlib.h>
<uniDrcBitstreamDecoder_api.h>
<readonlybitbuf.h>

Introduction

Use the links in the table of contents to the left to access the documentation.

Updated:
Wednesday, September 10, 2014


Functions

initDRCData
nextUniDRCGain

initDRCData


MP4Err initDRCData (
    DRCData *drcData,
    char *inputFileStr,
    int sampleRate,
    int channels,
    int framesize);  
Parameters
drcData

Pointer to a allocated DRCdata structure *

inputFileStr

Path to the drc bitstream file *

sampleRate

Samplerate of the audio data *

channels

Number of channels in audio data *

framesize

Number of samples in an audio frame *

Return Value

An MP4Err, which is defined libisomediafile.a; MP4NoErr if nothing fails

Discussion

Initializes DRC Data from a file, containing a DRC bitstream. The first LoudnessInfoSet and UniDrcConfig will be read. *


nextUniDRCGain


MP4Err nextUniDRCGain (
    DRCData *drcData,
    MP4Handle dataH);  
Parameters
drcData

Pointer to a initialized DRCdata structure *

dataH

MP4 handle, which will hold the byte aligned UniDrcGain *

Return Value

An MP4Err, which is defined libisomediafile.a; MP4NoErr if nothing fails

Discussion

Will read the next UniDrcGain from the drc bitstream. The data will be byte aligned in order to put it into a MP4 track as a sample. *


Typedefs

DRCData

Contains instream DRC Data and handles and variables to read a DRC bitstream using MPEG-D reference software's uniDrcBitstreamDecoder. *


DRCData


Contains instream DRC Data and handles and variables to read a DRC bitstream using MPEG-D reference software's uniDrcBitstreamDecoder. *

typedef struct DRCData { 
    HANDLE_UNI_DRC_BS_DEC_STRUCT hUniDrcBsDecStruct; 
    HANDLE_UNI_DRC_CONFIG hUniDrcConfig; 
    HANDLE_LOUDNESS_INFO_SET hLoudnessInfoSet; 
    HANDLE_UNI_DRC_GAIN hUniDrcGain; 
    int bufferOffset; 
    int bufferIndex; 
    int bufferBytesRemaining; 
    unsigned char *bitstreamBuffer; 
    int gainCount; 
    robitbufHandle bitstream; 
} DRCData;  
Fields
hUniDrcBsDecStruct

Handle for uniDrcBitstreamDecoder *

hUniDrcConfig

Contains instream data of a uniDrcConfig *

hLoudnessInfoSet

Contains instream data of a LoudnessInfoSet *

hUniDrcGain

Contains instream data of a UniDrcGain *

bufferOffset

Number of bits, which need to be skipped to get to the correct position on bitlevel *

bufferIndex

Current position in the bitstreamBuffer *

bufferBytesRemaining

Bytes not yet processed from the DRC bitstream *

bitstreamBuffer

Buffer, which will contain the whole DRC bitstream *

gainCount

Number of uniDrcGains read from the DRC bitstream *

bitstream

Buffer, that can operate on bit level