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
36151b3e
Commit
36151b3e
authored
Jun 10, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ac3enc: use function pointer to choose between AC-3 and E-AC-3 header output
functions.
parent
504811ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
ac3enc.c
libavcodec/ac3enc.c
+7
-4
ac3enc.h
libavcodec/ac3enc.h
+2
-0
No files found.
libavcodec/ac3enc.c
View file @
36151b3e
...
...
@@ -1987,10 +1987,7 @@ static void output_frame(AC3EncodeContext *s, unsigned char *frame)
init_put_bits
(
&
s
->
pb
,
frame
,
AC3_MAX_CODED_FRAME_SIZE
);
if
(
CONFIG_EAC3_ENCODER
&&
s
->
eac3
)
ff_eac3_output_frame_header
(
s
);
else
ac3_output_frame_header
(
s
);
s
->
output_frame_header
(
s
);
for
(
blk
=
0
;
blk
<
AC3_MAX_BLOCKS
;
blk
++
)
output_audio_block
(
s
,
blk
);
...
...
@@ -2732,6 +2729,12 @@ static av_cold int ac3_encode_init(AVCodecContext *avctx)
s
->
crc_inv
[
1
]
=
pow_poly
((
CRC16_POLY
>>
1
),
(
8
*
frame_size_58
)
-
16
,
CRC16_POLY
);
}
/* set function pointers */
if
(
CONFIG_EAC3_ENCODER
&&
s
->
eac3
)
s
->
output_frame_header
=
ff_eac3_output_frame_header
;
else
s
->
output_frame_header
=
ac3_output_frame_header
;
set_bandwidth
(
s
);
exponent_init
(
s
);
...
...
libavcodec/ac3enc.h
View file @
36151b3e
...
...
@@ -209,6 +209,8 @@ typedef struct AC3EncodeContext {
int
ref_bap_set
;
///< indicates if ref_bap pointers have been set
DECLARE_ALIGNED
(
32
,
SampleType
,
windowed_samples
)[
AC3_WINDOW_SIZE
];
void
(
*
output_frame_header
)(
struct
AC3EncodeContext
*
s
);
}
AC3EncodeContext
;
#endif
/* AVCODEC_AC3ENC_H */
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