Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
9e4bca16
Commit
9e4bca16
authored
Jul 31, 2012
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dca: Move tables used outside of dcadec.c to a separate file.
parent
13a79cf8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
13 deletions
+39
-13
Makefile
libavcodec/Makefile
+3
-2
dca.c
libavcodec/dca.c
+29
-0
dca.h
libavcodec/dca.h
+4
-0
dca_parser.c
libavcodec/dca_parser.c
+1
-2
dcadata.h
libavcodec/dcadata.h
+0
-6
dcadec.c
libavcodec/dcadec.c
+1
-1
spdifenc.c
libavformat/spdifenc.c
+1
-2
No files found.
libavcodec/Makefile
View file @
9e4bca16
...
...
@@ -119,7 +119,7 @@ OBJS-$(CONFIG_CLJR_ENCODER) += cljr.o
OBJS-$(CONFIG_COOK_DECODER)
+=
cook.o
OBJS-$(CONFIG_CSCD_DECODER)
+=
cscd.o
OBJS-$(CONFIG_CYUV_DECODER)
+=
cyuv.o
OBJS-$(CONFIG_DCA_DECODER)
+=
dcadec.o
dca
dsp.o
\
OBJS-$(CONFIG_DCA_DECODER)
+=
dcadec.o
dca
.o
dcadsp.o
\
dca_parser.o
synth_filter.o
OBJS-$(CONFIG_DFA_DECODER)
+=
dfa.o
OBJS-$(CONFIG_DNXHD_DECODER)
+=
dnxhddec.o
dnxhddata.o
...
...
@@ -596,6 +596,7 @@ OBJS-$(CONFIG_OGG_DEMUXER) += xiph.o flac.o flacdata.o \
OBJS-$(CONFIG_OGG_MUXER)
+=
xiph.o
flac.o
flacdata.o
OBJS-$(CONFIG_RTP_MUXER)
+=
mpeg4audio.o
mpegvideo.o
xiph.o
OBJS-$(CONFIG_SPDIF_DEMUXER)
+=
aacadtsdec.o
mpeg4audio.o
OBJS-$(CONFIG_SPDIF_MUXER)
+=
dca.o
OBJS-$(CONFIG_WEBM_MUXER)
+=
mpeg4audio.o
mpegaudiodata.o
\
xiph.o
flac.o
flacdata.o
OBJS-$(CONFIG_WTV_DEMUXER)
+=
mpeg4audio.o
mpegaudiodata.o
...
...
@@ -641,7 +642,7 @@ OBJS-$(CONFIG_AC3_PARSER) += ac3_parser.o ac3tab.o \
OBJS-$(CONFIG_ADX_PARSER)
+=
adx_parser.o
adx.o
OBJS-$(CONFIG_CAVSVIDEO_PARSER)
+=
cavs_parser.o
OBJS-$(CONFIG_COOK_PARSER)
+=
cook_parser.o
OBJS-$(CONFIG_DCA_PARSER)
+=
dca_parser.o
OBJS-$(CONFIG_DCA_PARSER)
+=
dca_parser.o
dca.o
OBJS-$(CONFIG_DIRAC_PARSER)
+=
dirac_parser.o
OBJS-$(CONFIG_DNXHD_PARSER)
+=
dnxhd_parser.o
OBJS-$(CONFIG_DVBSUB_PARSER)
+=
dvbsub_parser.o
...
...
libavcodec/dca.c
0 → 100644
View file @
9e4bca16
/*
* DCA compatible decoder data
*
* This file is part of Libav.
*
* Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdint.h>
#include "dca.h"
const
uint32_t
ff_dca_sample_rates
[
16
]
=
{
0
,
8000
,
16000
,
32000
,
0
,
0
,
11025
,
22050
,
44100
,
0
,
0
,
12000
,
24000
,
48000
,
96000
,
192000
};
libavcodec/dca.h
View file @
9e4bca16
...
...
@@ -25,6 +25,8 @@
#ifndef AVCODEC_DCA_H
#define AVCODEC_DCA_H
#include <stdint.h>
/** DCA syncwords, also used for bitstream type detection */
#define DCA_MARKER_RAW_BE 0x7FFE8001
#define DCA_MARKER_RAW_LE 0xFE7F0180
...
...
@@ -34,4 +36,6 @@
/** DCA-HD specific block starts with this marker. */
#define DCA_HD_MARKER 0x64582025
extern
const
uint32_t
ff_dca_sample_rates
[
16
];
#endif
/* AVCODEC_DCA_H */
libavcodec/dca_parser.c
View file @
9e4bca16
...
...
@@ -24,7 +24,6 @@
#include "parser.h"
#include "dca.h"
#include "dcadata.h"
#include "dca_parser.h"
#include "get_bits.h"
#include "put_bits.h"
...
...
@@ -162,7 +161,7 @@ static int dca_parse_params(const uint8_t *buf, int buf_size, int *duration,
skip_bits
(
&
gb
,
20
);
sr_code
=
get_bits
(
&
gb
,
4
);
*
sample_rate
=
dca_sample_rates
[
sr_code
];
*
sample_rate
=
ff_
dca_sample_rates
[
sr_code
];
if
(
*
sample_rate
==
0
)
return
AVERROR_INVALIDDATA
;
...
...
libavcodec/dcadata.h
View file @
9e4bca16
...
...
@@ -28,12 +28,6 @@
/* Generic tables */
static
const
uint32_t
dca_sample_rates
[
16
]
=
{
0
,
8000
,
16000
,
32000
,
0
,
0
,
11025
,
22050
,
44100
,
0
,
0
,
12000
,
24000
,
48000
,
96000
,
192000
};
static
const
uint32_t
dca_bit_rates
[
32
]
=
{
32000
,
56000
,
64000
,
96000
,
112000
,
128000
,
...
...
libavcodec/dcadec.c
View file @
9e4bca16
...
...
@@ -561,7 +561,7 @@ static int dca_parse_frame_header(DCAContext *s)
if
(
s
->
frame_size
<
95
)
return
AVERROR_INVALIDDATA
;
s
->
amode
=
get_bits
(
&
s
->
gb
,
6
);
s
->
sample_rate
=
dca_sample_rates
[
get_bits
(
&
s
->
gb
,
4
)];
s
->
sample_rate
=
ff_
dca_sample_rates
[
get_bits
(
&
s
->
gb
,
4
)];
if
(
!
s
->
sample_rate
)
return
AVERROR_INVALIDDATA
;
s
->
bit_rate_index
=
get_bits
(
&
s
->
gb
,
5
);
...
...
libavformat/spdifenc.c
View file @
9e4bca16
...
...
@@ -49,7 +49,6 @@
#include "spdif.h"
#include "libavcodec/ac3.h"
#include "libavcodec/dca.h"
#include "libavcodec/dcadata.h"
#include "libavcodec/aacadtsdec.h"
#include "libavutil/opt.h"
...
...
@@ -253,7 +252,7 @@ static int spdif_header_dts(AVFormatContext *s, AVPacket *pkt)
case
DCA_MARKER_RAW_BE
:
blocks
=
(
AV_RB16
(
pkt
->
data
+
4
)
>>
2
)
&
0x7f
;
core_size
=
((
AV_RB24
(
pkt
->
data
+
5
)
>>
4
)
&
0x3fff
)
+
1
;
sample_rate
=
dca_sample_rates
[(
pkt
->
data
[
8
]
>>
2
)
&
0x0f
];
sample_rate
=
ff_
dca_sample_rates
[(
pkt
->
data
[
8
]
>>
2
)
&
0x0f
];
break
;
case
DCA_MARKER_RAW_LE
:
blocks
=
(
AV_RL16
(
pkt
->
data
+
4
)
>>
2
)
&
0x7f
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment