Skip to content

Commit b4dc412

Browse files
James Chenminggo
James Chen
authored and
minggo
committed
[android] Adds tremolo for decoding ogg, pvmp3dec for decoding mp3, these two libraries are from android source code. (#280)
* Adds tremolo for decoding ogg, pvmp3dec for decoding mp3, these two libraries are from android source code. * Moves to android-specific folder
1 parent a3fac4e commit b4dc412

File tree

113 files changed

+33709
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+33709
-0
lines changed

android-specific/pvmp3dec/Android.mk

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
LOCAL_PATH:= $(call my-dir)
2+
include $(CLEAR_VARS)
3+
4+
LOCAL_SRC_FILES := \
5+
src/pvmp3_normalize.cpp \
6+
src/pvmp3_alias_reduction.cpp \
7+
src/pvmp3_crc.cpp \
8+
src/pvmp3_decode_header.cpp \
9+
src/pvmp3_decode_huff_cw.cpp \
10+
src/pvmp3_getbits.cpp \
11+
src/pvmp3_dequantize_sample.cpp \
12+
src/pvmp3_framedecoder.cpp \
13+
src/pvmp3_get_main_data_size.cpp \
14+
src/pvmp3_get_side_info.cpp \
15+
src/pvmp3_get_scale_factors.cpp \
16+
src/pvmp3_mpeg2_get_scale_data.cpp \
17+
src/pvmp3_mpeg2_get_scale_factors.cpp \
18+
src/pvmp3_mpeg2_stereo_proc.cpp \
19+
src/pvmp3_huffman_decoding.cpp \
20+
src/pvmp3_huffman_parsing.cpp \
21+
src/pvmp3_tables.cpp \
22+
src/pvmp3_imdct_synth.cpp \
23+
src/pvmp3_mdct_6.cpp \
24+
src/pvmp3_dct_6.cpp \
25+
src/pvmp3_poly_phase_synthesis.cpp \
26+
src/pvmp3_equalizer.cpp \
27+
src/pvmp3_seek_synch.cpp \
28+
src/pvmp3_stereo_proc.cpp \
29+
src/pvmp3_reorder.cpp \
30+
31+
ifeq ($(TARGET_ARCH),arm)
32+
LOCAL_SRC_FILES += \
33+
src/asm/pvmp3_polyphase_filter_window_gcc.s \
34+
src/asm/pvmp3_mdct_18_gcc.s \
35+
src/asm/pvmp3_dct_9_gcc.s \
36+
src/asm/pvmp3_dct_16_gcc.s
37+
else
38+
LOCAL_SRC_FILES += \
39+
src/pvmp3_polyphase_filter_window.cpp \
40+
src/pvmp3_mdct_18.cpp \
41+
src/pvmp3_dct_9.cpp \
42+
src/pvmp3_dct_16.cpp
43+
endif
44+
45+
LOCAL_C_INCLUDES := \
46+
$(LOCAL_PATH)/src \
47+
$(LOCAL_PATH)/include
48+
49+
LOCAL_EXPORT_C_INCLUDES := \
50+
$(LOCAL_PATH)/src \
51+
$(LOCAL_PATH)/include
52+
53+
LOCAL_CFLAGS := \
54+
-D"OSCL_UNUSED_ARG(x)=(void)(x)"
55+
56+
LOCAL_CFLAGS += -Werror
57+
LOCAL_CLANG := true
58+
LOCAL_SANITIZE := signed-integer-overflow
59+
60+
LOCAL_MODULE := libpvmp3dec
61+
62+
LOCAL_ARM_MODE := arm
63+
64+
include $(BUILD_STATIC_LIBRARY)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/* ------------------------------------------------------------------
2+
* Copyright (C) 1998-2009 PacketVideo
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13+
* express or implied.
14+
* See the License for the specific language governing permissions
15+
* and limitations under the License.
16+
* -------------------------------------------------------------------
17+
*/
18+
/*! \file mp3_decoder_selection.h
19+
* \brief select mp3 decoder
20+
*
21+
*/
22+
23+
#ifndef MP3_DECODER_SELECTION_H
24+
#define MP3_DECODER_SELECTION_H
25+
26+
27+
#define NEW_PV_MP3_DECODER 1 // 1 == PV mp3 decoder
28+
29+
#endif
30+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/* ------------------------------------------------------------------
2+
* Copyright (C) 1998-2009 PacketVideo
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13+
* express or implied.
14+
* See the License for the specific language governing permissions
15+
* and limitations under the License.
16+
* -------------------------------------------------------------------
17+
*/
18+
/*
19+
------------------------------------------------------------------------------
20+
PacketVideo Corp.
21+
MP3 Decoder Library
22+
23+
Filename: pvmp3_audio_type_defs.h
24+
25+
Date: 09/21/2007
26+
27+
------------------------------------------------------------------------------
28+
REVISION HISTORY
29+
30+
Description:
31+
------------------------------------------------------------------------------
32+
INCLUDE DESCRIPTION
33+
34+
This file was derived from a number of standards bodies. The type
35+
definitions below were created from some of the best practices observed
36+
in the standards bodies.
37+
38+
This file is dependent on limits.h for defining the bit widths. In an
39+
ANSI C environment limits.h is expected to always be present and contain
40+
the following definitions:
41+
42+
SCHAR_MIN
43+
SCHAR_MAX
44+
UCHAR_MAX
45+
46+
INT_MAX
47+
INT_MIN
48+
UINT_MAX
49+
50+
SHRT_MIN
51+
SHRT_MAX
52+
USHRT_MAX
53+
54+
LONG_MIN
55+
LONG_MAX
56+
ULONG_MAX
57+
58+
------------------------------------------------------------------------------
59+
*/
60+
61+
#ifndef PVMP3_AUDIO_TYPE_DEFS_H
62+
#define PVMP3_AUDIO_TYPE_DEFS_H
63+
64+
#include <stdint.h>
65+
66+
typedef int8_t int8;
67+
typedef uint8_t uint8;
68+
typedef int16_t int16;
69+
typedef uint16_t uint16;
70+
typedef int32_t int32;
71+
typedef uint32_t uint32;
72+
typedef int64_t int64;
73+
typedef uint64_t uint64;
74+
75+
typedef int32_t Int32;
76+
77+
#endif /* PVMP3_AUDIO_TYPE_DEFS_H */

0 commit comments

Comments
 (0)