DM365 Audio Codecs Integration with DVSDK 2.10.01.18 Demos

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

The latest DM365 audio codec releases are available here.

This section outlines the steps needed to integrate the audio codecs into the DVSDK DEMOS environment. Assumption: You have downloaded and installed the DM365 DVSDK (GA version - DVSDK 2.10.01.18).


1. Copy the codecs packages into a temporary directory: ~\temp_audio and extract them

2. Copy the ittiam folder for the codec you want to run (<codecs_package>\<codec_name>_x_x_xx_production_dm365_mvl\packages-production\ittiam) to the following location: dvsdk_2_10_01_18\dm365_codecs_01_00_06\packages

3. Delete the dvsdk_2_10_01_18\dm365_codecs_01_00_06\packages\ittiam\app folder. It will not be needed.

4. Make the following configuration file changes:

algSettings = xdc.useModule('ti.sdo.ce.alg.Settings');
algSettings.useCache = true;
var AACENC = xdc.useModule('ittiam.codecs.aaclc_enc.ce.AACLC_ENC');
 
var myEngine = Engine.create("encode", [
 
    {name: "mpeg4enc", mod: MPEG4ENC, local: true, groupId: 1},
    {name: "h264enc", mod: H264ENC, local: true, groupId: 1},
    {name: "g711enc", mod: G711ENC, local: true},
    {name: "aacenc", mod: AACENC, local: true},
]);

Similar changes can be made for WMA, MP3.


5. The following changes need to be made to DMAI:

var codecInterfaces = [
    "ti.sdo.ce.speech",
    "ti.sdo.ce.speech1",
    "ti.sdo.ce.audio",
    "ti.sdo.ce.audio1"
    "ittiam.extensions.audio1", /*For AAC,MP3 and WMA */
    "ittiam.extensions.speech1", /* For G711 */
    "ittiam.extensions.common", /* For AEC */
    "ti.sdo.ce.video",
    "ti.sdo.ce.video1",
    "ti.sdo.ce.video2",
    "ti.sdo.ce.image",
    "ti.sdo.ce.image1",
];
Buffer_setNumBytesUsed(hInBuf, outArgs.numInSamples * hAe->numChannels * hAe->bytesPerSample);
Buffer_setNumBytesUsed(hInBuf, outArgs.bytesConsumed);
should be moved after the error checking, i.e. to line no:141

6. Replace file main.c in encode demo folder with the one provided in File:Dvsdk 2 10 01 18 demos update.tar.gz

7. Update codecs.c in encode demo folder as follows:

/* File extensions for AAC */
static Char *aacExtensions[] = { ".aac", NULL };
/* NULL terminated list of speech encoders in the engine to use in the demo */
static Codec audioEncoders[] = {
    {
        "aacenc",             /* String name of codec for CE to locate it */
        "AACLC Encoder",      /* The string to show on the UI for this codec */
        aacExtensions,        /* NULL terminated list of file extensions */
        NULL,                 /* Use default params */
        NULL                  /* Use default dynamic params */
    },
    { NULL }
};
/* Declaration of the production engine and encoders shipped with the DVSDK */
 
static Engine encodeEngine = {
    "encode",           /* Engine string name used by CE to find the engine */
    NULL,               /* NULL terminated list of speech decoders in engine */
    NULL,               /* NULL terminated list of audio decoders in engine */
    NULL,               /* NULL terminated list of video decoders in engine */
    speechEncoders,     /* NULL terminated list of speech encoders in engine */
    audioEncoders,      /* Audio encoders in engine */
    videoEncoders       /* NULL terminated list of video encoders in engine */
};

8. Replace file main.c in decode demo folder with the one provided in the File:Dvsdk 2 10 01 18 demos update.tar.gz .

9. Update codecs.c in decode demo folder in the same way as for the encode demo in Step 7

9. Add the audio.c and audio.h to encode demo (provided in File:Dvsdk 2 10 01 18 demos update.tar.gz)

10.Add the audio.c and audio.h to decode demo (provided in File:Dvsdk 2 10 01 18 demos update.tar.gz)

11.There is a change in loadmodules.sh as below to run the video + audio together

insmod cmemk.ko phys_start=0x85000000 phys_end=0x88000000 pools=6x4096,2x8192,1x11908,2x13184,1x2697152,6x4096,1x30720,3x81920,1x3185664,64x56,1x320,1x640,1x81920,1x6650880,2x608,1x296,1x28,2x24,23x1548288,1x154288,1x6488,2x15360 allowOverlap=1 phys_start_1=0x00001000 phys_end_1=0x00008000 pools_1=1x28672

12.Rebuild the DVSDK and run the demos as usual!

root@128.247.105.95:/opt/dvsdk/dm365# ./encode -a test.aac

Notes

E2e.jpg For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article DM365 Audio Codecs Integration with DVSDK 2.10.01.18 Demos here.
Hyperlink blue.png Links
ARM Microcontroller MCU ARM Processor Digital Media Processor Digital Signal Processing Microcontroller MCU Multi Core Processor
Ultra Low Power DSP 8 bit Microcontroller MCU 16 bit Microcontroller MCU 32 bit Microcontroller MCU

Leave a Comment

Comments

Comments on DM365 Audio Codecs Integration with DVSDK 2.10.01.18 Demos


Johnny.Ling said ...

codecInterfaces should be updated for new version audio codec.

var codecInterfaces = [

   "ti.sdo.ce.speech",
   "ti.sdo.ce.speech1",
   "ti.sdo.ce.audio",
   "ti.sdo.ce.audio1"
   "ittiam.extensions.audio1", /*For AAC,MP3 and WMA */
   "ittiam.extensions.speech1", /* For G711 */
   "ittiam.extensions.common", /* For AEC */
   "ti.sdo.ce.video",
   "ti.sdo.ce.video1",
   "ti.sdo.ce.video2",
   "ti.sdo.ce.image",
   "ti.sdo.ce.image1",

];

should be updated because the new version audio codecs downloaded from page:

http://software-dl.ti.com/dsps/dsps_public_sw/codecs/DM365/index_FDS.html

does not include extensions directory any longer except for AEC.

so it might be like below:

var codecInterfaces = [

   "ti.sdo.ce.speech",
   "ti.sdo.ce.speech1",
   "ti.sdo.ce.audio",
   "ti.sdo.ce.audio1"
   "ittiam.codecs.aaclc_enc", /*For AAC */
   "ittiam.codecs.mp3_enc",   /*For MP3 */
   "ittiam.codecs.wma_enc",   /*For WMA */
   "ittiam.extensions.common", /* For AEC */
   "ti.sdo.ce.video",
   "ti.sdo.ce.video1",
   "ti.sdo.ce.video2",
   "ti.sdo.ce.image",
   "ti.sdo.ce.image1",

];

otherwise you will encounter the following error (AAC for example):

Unable to locate alg "aacenc" (type "ittiam.extensions.audio1.IAUDENC1").


--Johnny.Ling 00:55, 11 June 2010 (CDT)

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox