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
f1be41c6
Commit
f1be41c6
authored
Dec 19, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adxenc: use a loop to encode each channel
parent
6c117bd8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
adxenc.c
libavcodec/adxenc.c
+4
-7
No files found.
libavcodec/adxenc.c
View file @
f1be41c6
...
@@ -128,6 +128,7 @@ static int adx_encode_frame(AVCodecContext *avctx, uint8_t *frame,
...
@@ -128,6 +128,7 @@ static int adx_encode_frame(AVCodecContext *avctx, uint8_t *frame,
ADXContext
*
c
=
avctx
->
priv_data
;
ADXContext
*
c
=
avctx
->
priv_data
;
const
int16_t
*
samples
=
data
;
const
int16_t
*
samples
=
data
;
uint8_t
*
dst
=
frame
;
uint8_t
*
dst
=
frame
;
int
ch
;
if
(
!
c
->
header_parsed
)
{
if
(
!
c
->
header_parsed
)
{
int
hdrsize
=
adx_encode_header
(
avctx
,
dst
,
buf_size
);
int
hdrsize
=
adx_encode_header
(
avctx
,
dst
,
buf_size
);
...
@@ -135,13 +136,9 @@ static int adx_encode_frame(AVCodecContext *avctx, uint8_t *frame,
...
@@ -135,13 +136,9 @@ static int adx_encode_frame(AVCodecContext *avctx, uint8_t *frame,
c
->
header_parsed
=
1
;
c
->
header_parsed
=
1
;
}
}
if
(
avctx
->
channels
==
1
)
{
for
(
ch
=
0
;
ch
<
avctx
->
channels
;
ch
++
)
{
adx_encode
(
c
,
dst
,
samples
,
c
->
prev
,
avctx
->
channels
);
adx_encode
(
c
,
dst
,
samples
+
ch
,
&
c
->
prev
[
ch
],
avctx
->
channels
);
dst
+=
18
;
dst
+=
18
;
}
else
{
adx_encode
(
c
,
dst
,
samples
,
c
->
prev
,
avctx
->
channels
);
adx_encode
(
c
,
dst
+
18
,
samples
+
1
,
c
->
prev
+
1
,
avctx
->
channels
);
dst
+=
18
*
2
;
}
}
return
dst
-
frame
;
return
dst
-
frame
;
}
}
...
...
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