首页 > 代码库 > DM8168添加DSP音频编解码算法--集成现有voice或audio codec
DM8168添加DSP音频编解码算法--集成现有voice或audio codec
本文根据“How to integrate audio/voice in RPE in EZSDK.pdf”整理,建议读者直接下载,参考原文件。原文件下载链接:
http://download.csdn.net/detail/guo8113/8122945
ps:本文只是参考文档进行定制补充,但目前笔者没有完成移植,仅供参考。转载请注明:http://blog.csdn.net/guo8113/article/details/40820897
DVR_RDK RPE添加其他音频编码
DM8168中音频算法(DVR-RDK中已经集成了aac的enc、dec)采用RPE(远程程序调用)的机制,该机制的介绍可以参考ti_tools/rpe中的文档,或者参考笔者的博客与论文。
1.更新构建环境变量
/remote-processor-execute/makerules/env.mk
L42:
#####################################################
# Codecs Paths
#####################################################
# AACDEC - AAC Decoder
aaclcdec_PATH =$(EXTERNAL_SW_ROOT)/c674x-aaclcdec_01_41_00_00_elf
aaclcdec_INCLUDE =$(aaclcdec_PATH)/packages
# AACENC - AAC Encoder
aaclcenc_PATH =$(EXTERNAL_SW_ROOT)/c674x_aaclcenc_01_00_01_00_elf
aaclcenc_INCLUDE =$(aaclcenc_PATH)/packages
#
# <Integrator>: Add more codec pathshere.
#
2.添加codec到编译列表:
ti_tools/rpe/remote-processor-execute/src/config/codecs.mk
INCLUDE_CODEC_INTERFACES = aaclcdecaaclcenc
3.更新client配置文件
ti_tools/rpe/remote-processor-execute/src/config/client_config.c
/* Get structure definitions for AACLCAudio Decoder Interface */
#include<ti/sdo/codecs/aaclcdec/iaacdec.h>
#include<ti/sdo/codecs/aaclcenc/imp4aacenc.h>
由于已经集成AAC enc和dec所以使用XDM接口的类已经定义了各一个,如果要同时运行其他codec,可能还需要进行添加。
4.更新server配置文件
ti_tools/rpe/remote-processor-execute/src/config/server_config_c67x.c
(1)模仿const XdmServer_ServerConfig TI_AACDEC_serverConfig{}编写自己的classconfigratiion
(2)更新:
const Rpe_ServerConfig*Rpe_serverConfigArray[] =
{
(const Rpe_ServerConfig *) & TI_AACDEC_serverConfig,
(const Rpe_ServerConfig *) & TI_AACENC_serverConfig,
& Rpe_endServerConfig
};
当然也要包含必要的头文件。
5.修改/dvr_rdk/rules.make
L101行:
# Audio framework (RPE) and Codecs
rpe_PATH :=$(TI_SW_ROOT)/rpe/remote-processor-execute
aaclcdec_PATH :=$(TI_SW_ROOT)/codecs/c674x_aaclcdec_01_41_00_00_elf
aaclcenc_PATH :=$(TI_SW_ROOT)/codecs/c674x_aaclcenc_01_00_01_00_elf_patched
L301:
RPE_BUILD_VARS =ipc_PATH="${ipc_PATH}" \
bios_PATH="${bios_PATH}"\
xdc_PATH="${xdc_PATH}"\
xdais_PATH="${xdais_PATH}"\
syslink_PATH="${syslink_PATH}"\
kernel_PATH="${KERNELDIR}"\
CODESOURCERY_PATH="${CODEGEN_PATH_A8}"\
CGT_ARM_PREFIX="${CSTOOL_PREFIX}"\
CODEGEN_PATH_DSP="${CODEGEN_PATH_DSP}"\
CODEGEN_PATH_DSPELF="${CODEGEN_PATH_DSP}"\
ROOTDIR="${rpe_PATH}"\
aaclcdec_PATH="${aaclcdec_PATH}"\
aaclcenc_PATH="${aaclcenc_PATH}"
L373:
export aaclcdec_PATH
export aaclcenc_PATH
6.添加库
dvr_rdk/makerules/rules_c674.mk
L192:
LIB_PATHS += $(RTSLIB_PATH) \
$(aaclcdec_PATH)/packages/ti/sdo/codecs/aaclcdec/lib/aacdec_tii_lc_elf.l64P\
$(aaclcenc_PATH)/packages/ti/sdo/codecs/aaclcenc/lib/mp4aacenc_tij_lc_elf.l67
添加包含目录:dvr_rdk/makerules/env.mk
aaclcdec_INCLUDE =$(aaclcdec_PATH)/packages
aaclcenc_INCLUDE =$(aaclcenc_PATH)/packages
7.在ARM侧指定RPE的编译包含路径
dvr_rdk/makerules/includes_a8.mk
L18:
RPE_INC=-I$(rpe_PATH)/include-I$(rpe_PATH)/src/include -I$(aaclcdec_PATH)/packages-I$(aaclcenc_PATH)/packages -I$(xdais_PATH)/packages
8. DVRRDK_03.00.00.00/dvr_rdk/mcfw/src_bios6/BIOS_c6xdsp.cfg不确定
Program.sectMap["aacEncProgram"] = "DSP_CODE_MEM";
DM8168添加DSP音频编解码算法--集成现有voice或audio codec