Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f1efc09 authored by Andreas Huber's avatar Andreas Huber
Browse files

Initial check in of AMR (NB and WB) decoders based on PV source code.

parent c54176ad
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -55,6 +55,9 @@ ifeq ($(BUILD_WITH_FULL_STAGEFRIGHT),true)


LOCAL_STATIC_LIBRARIES := \
LOCAL_STATIC_LIBRARIES := \
        libstagefright_aacdec \
        libstagefright_aacdec \
        libstagefright_amrnbdec \
        libstagefright_amrnb_common \
        libstagefright_amrwbdec \
        libstagefright_mp3dec
        libstagefright_mp3dec


endif
endif
+6 −0
Original line number Original line Diff line number Diff line
@@ -20,6 +20,8 @@


#if BUILD_WITH_FULL_STAGEFRIGHT
#if BUILD_WITH_FULL_STAGEFRIGHT
#include "include/AACDecoder.h"
#include "include/AACDecoder.h"
#include "include/AMRNBDecoder.h"
#include "include/AMRWBDecoder.h"
#include "include/MP3Decoder.h"
#include "include/MP3Decoder.h"
#endif
#endif


@@ -292,6 +294,10 @@ sp<MediaSource> OMXCodec::Create(
#if BUILD_WITH_FULL_STAGEFRIGHT
#if BUILD_WITH_FULL_STAGEFRIGHT
    if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC)) {
    if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC)) {
        return new AACDecoder(source);
        return new AACDecoder(source);
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AMR_NB)) {
        return new AMRNBDecoder(source);
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AMR_WB)) {
        return new AMRWBDecoder(source);
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_MPEG)) {
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_MPEG)) {
        return new MP3Decoder(source);
        return new MP3Decoder(source);
    }
    }
+4 −0
Original line number Original line Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

include $(call all-makefiles-under,$(LOCAL_PATH))
+74 −0
Original line number Original line Diff line number Diff line
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES := \
	src/add.cpp \
 	src/az_lsp.cpp \
 	src/bitno_tab.cpp \
 	src/bitreorder_tab.cpp \
 	src/bits2prm.cpp \
 	src/bytesused.cpp \
 	src/c2_9pf_tab.cpp \
 	src/copy.cpp \
 	src/div_32.cpp \
 	src/div_s.cpp \
 	src/extract_h.cpp \
 	src/extract_l.cpp \
 	src/gains_tbl.cpp \
 	src/gc_pred.cpp \
 	src/gmed_n.cpp \
 	src/grid_tbl.cpp \
 	src/gray_tbl.cpp \
 	src/int_lpc.cpp \
 	src/inv_sqrt.cpp \
 	src/inv_sqrt_tbl.cpp \
 	src/l_abs.cpp \
 	src/l_deposit_h.cpp \
 	src/l_deposit_l.cpp \
 	src/l_shr_r.cpp \
 	src/log2.cpp \
 	src/log2_norm.cpp \
 	src/log2_tbl.cpp \
 	src/lsfwt.cpp \
 	src/lsp.cpp \
 	src/lsp_az.cpp \
 	src/lsp_lsf.cpp \
 	src/lsp_lsf_tbl.cpp \
 	src/lsp_tab.cpp \
 	src/mult_r.cpp \
 	src/norm_l.cpp \
 	src/norm_s.cpp \
 	src/overflow_tbl.cpp \
 	src/ph_disp_tab.cpp \
 	src/pow2.cpp \
 	src/pow2_tbl.cpp \
 	src/pred_lt.cpp \
 	src/q_plsf.cpp \
 	src/q_plsf_3.cpp \
 	src/q_plsf_3_tbl.cpp \
 	src/q_plsf_5.cpp \
 	src/q_plsf_5_tbl.cpp \
 	src/qua_gain_tbl.cpp \
 	src/reorder.cpp \
 	src/residu.cpp \
 	src/round.cpp \
 	src/set_zero.cpp \
 	src/shr.cpp \
 	src/shr_r.cpp \
 	src/sqrt_l.cpp \
 	src/sqrt_l_tbl.cpp \
 	src/sub.cpp \
 	src/syn_filt.cpp \
 	src/vad1.cpp \
 	src/weight_a.cpp \
 	src/window_tab.cpp

LOCAL_C_INCLUDES := \
        $(LOCAL_PATH)/include

LOCAL_CFLAGS := \
        -DOSCL_UNUSED_ARG= -DOSCL_IMPORT_REF= -DOSCL_EXPORT_REF=

LOCAL_MODULE := libstagefright_amrnb_common

include $(BUILD_STATIC_LIBRARY)
+113 −0
Original line number Original line Diff line number Diff line
/* ------------------------------------------------------------------
 * Copyright (C) 1998-2009 PacketVideo
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 * -------------------------------------------------------------------
 */
/****************************************************************************************
Portions of this file are derived from the following 3GPP standard:

    3GPP TS 26.073
    ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
    Available from http://www.3gpp.org

(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
Permission to distribute, modify and use this file under the standard license
terms listed above has been obtained from the copyright holder.
****************************************************************************************/
/*

 Pathname: ./gsm-amr/c/include/abs_s.h

------------------------------------------------------------------------------
 REVISION HISTORY

 Description: Created separate header file for abs_s function.

 Description: Updated template to make it build for Symbian.

 Description: Moved _cplusplus #ifdef after Include section.

 Who:                       Date:
 Description:

------------------------------------------------------------------------------
 INCLUDE DESCRIPTION

 This file contains all the constant definitions and prototype definitions
 needed by the abs_s function.

------------------------------------------------------------------------------
*/

/*----------------------------------------------------------------------------
; CONTINUE ONLY IF NOT ALREADY DEFINED
----------------------------------------------------------------------------*/
#ifndef ABS_S_H
#define ABS_S_H

/*----------------------------------------------------------------------------
; INCLUDES
----------------------------------------------------------------------------*/
#include    "basicop_malloc.h"

/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C"
{
#endif

    /*----------------------------------------------------------------------------
    ; MACROS
    ; Define module specific macros here
    ----------------------------------------------------------------------------*/

    /*----------------------------------------------------------------------------
    ; DEFINES
    ; Include all pre-processor statements here.
    ----------------------------------------------------------------------------*/

    /*----------------------------------------------------------------------------
    ; EXTERNAL VARIABLES REFERENCES
    ; Declare variables used in this module but defined elsewhere
    ----------------------------------------------------------------------------*/

    /*----------------------------------------------------------------------------
    ; SIMPLE TYPEDEF'S
    ----------------------------------------------------------------------------*/

    /*----------------------------------------------------------------------------
    ; ENUMERATED TYPEDEF'S
    ----------------------------------------------------------------------------*/

    /*----------------------------------------------------------------------------
    ; STRUCTURES TYPEDEF'S
    ----------------------------------------------------------------------------*/

    /*----------------------------------------------------------------------------
    ; GLOBAL FUNCTION DEFINITIONS
    ; Function Prototype declaration
    ----------------------------------------------------------------------------*/
    Word16 abs_s(Word16 var1);

    /*----------------------------------------------------------------------------
    ; END
    ----------------------------------------------------------------------------*/
#ifdef __cplusplus
}
#endif

#endif  /* ABS_S_H */

Loading