Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
3596aa6f
Commit
3596aa6f
authored
16 years ago
by
Justin Ruggles
Browse files
Options
Downloads
Patches
Plain Diff
get substreamid from ac3 parser
Originally committed as revision 13689 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
6730e9f3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
libavcodec/ac3.h
+1
-0
1 addition, 0 deletions
libavcodec/ac3.h
libavcodec/ac3_parser.c
+2
-1
2 additions, 1 deletion
libavcodec/ac3_parser.c
libavcodec/ac3dec.c
+2
-0
2 additions, 0 deletions
libavcodec/ac3dec.c
with
5 additions
and
1 deletion
libavcodec/ac3.h
+
1
−
0
View file @
3596aa6f
...
@@ -85,6 +85,7 @@ typedef struct {
...
@@ -85,6 +85,7 @@ typedef struct {
uint8_t
channel_mode
;
uint8_t
channel_mode
;
uint8_t
lfe_on
;
uint8_t
lfe_on
;
uint8_t
frame_type
;
uint8_t
frame_type
;
int
substreamid
;
///< substream identification
int
center_mix_level
;
///< Center mix level index
int
center_mix_level
;
///< Center mix level index
int
surround_mix_level
;
///< Surround mix level index
int
surround_mix_level
;
///< Surround mix level index
uint16_t
channel_map
;
uint16_t
channel_map
;
...
...
This diff is collapsed.
Click to expand it.
libavcodec/ac3_parser.c
+
2
−
1
View file @
3596aa6f
...
@@ -99,6 +99,7 @@ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
...
@@ -99,6 +99,7 @@ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
hdr
->
channels
=
ff_ac3_channels_tab
[
hdr
->
channel_mode
]
+
hdr
->
lfe_on
;
hdr
->
channels
=
ff_ac3_channels_tab
[
hdr
->
channel_mode
]
+
hdr
->
lfe_on
;
hdr
->
frame_size
=
ff_ac3_frame_size_tab
[
frame_size_code
][
hdr
->
sr_code
]
*
2
;
hdr
->
frame_size
=
ff_ac3_frame_size_tab
[
frame_size_code
][
hdr
->
sr_code
]
*
2
;
hdr
->
frame_type
=
EAC3_FRAME_TYPE_AC3_CONVERT
;
//EAC3_FRAME_TYPE_INDEPENDENT;
hdr
->
frame_type
=
EAC3_FRAME_TYPE_AC3_CONVERT
;
//EAC3_FRAME_TYPE_INDEPENDENT;
hdr
->
substreamid
=
0
;
}
else
{
}
else
{
/* Enhanced AC-3 */
/* Enhanced AC-3 */
hdr
->
crc1
=
0
;
hdr
->
crc1
=
0
;
...
@@ -106,7 +107,7 @@ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
...
@@ -106,7 +107,7 @@ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
if
(
hdr
->
frame_type
==
EAC3_FRAME_TYPE_RESERVED
)
if
(
hdr
->
frame_type
==
EAC3_FRAME_TYPE_RESERVED
)
return
AC3_PARSE_ERROR_FRAME_TYPE
;
return
AC3_PARSE_ERROR_FRAME_TYPE
;
skip_bits
(
gbc
,
3
);
// skip substream id
hdr
->
substreamid
=
get_bits
(
gbc
,
3
);
hdr
->
frame_size
=
(
get_bits
(
gbc
,
11
)
+
1
)
<<
1
;
hdr
->
frame_size
=
(
get_bits
(
gbc
,
11
)
+
1
)
<<
1
;
if
(
hdr
->
frame_size
<
AC3_HEADER_SIZE
)
if
(
hdr
->
frame_size
<
AC3_HEADER_SIZE
)
...
...
This diff is collapsed.
Click to expand it.
libavcodec/ac3dec.c
+
2
−
0
View file @
3596aa6f
...
@@ -134,6 +134,7 @@ typedef struct {
...
@@ -134,6 +134,7 @@ typedef struct {
int
sample_rate
;
///< sample frequency, in Hz
int
sample_rate
;
///< sample frequency, in Hz
int
bit_rate
;
///< stream bit rate, in bits-per-second
int
bit_rate
;
///< stream bit rate, in bits-per-second
int
substreamid
;
///< substream identification
int
frame_size
;
///< current frame size, in bytes
int
frame_size
;
///< current frame size, in bytes
int
channels
;
///< number of total channels
int
channels
;
///< number of total channels
...
@@ -326,6 +327,7 @@ static int ac3_parse_header(AC3DecodeContext *s)
...
@@ -326,6 +327,7 @@ static int ac3_parse_header(AC3DecodeContext *s)
s
->
center_mix_level
=
hdr
.
center_mix_level
;
s
->
center_mix_level
=
hdr
.
center_mix_level
;
s
->
surround_mix_level
=
hdr
.
surround_mix_level
;
s
->
surround_mix_level
=
hdr
.
surround_mix_level
;
s
->
num_blocks
=
hdr
.
num_blocks
;
s
->
num_blocks
=
hdr
.
num_blocks
;
s
->
substreamid
=
hdr
.
substreamid
;
if
(
s
->
lfe_on
)
{
if
(
s
->
lfe_on
)
{
s
->
start_freq
[
s
->
lfe_ch
]
=
0
;
s
->
start_freq
[
s
->
lfe_ch
]
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment