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
989bb7bd
Commit
989bb7bd
authored
Sep 11, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpcm: consistently use the variable name 'n' for the next input byte.
parent
04b24cf9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
dpcm.c
libavcodec/dpcm.c
+5
-7
No files found.
libavcodec/dpcm.c
View file @
989bb7bd
...
...
@@ -176,7 +176,6 @@ static int dpcm_decode_frame(AVCodecContext *avctx,
int
stereo
=
s
->
channels
-
1
;
short
*
output_samples
=
data
;
int
shift
[
2
];
unsigned
char
byte
;
short
diff
;
if
(
!
buf_size
)
...
...
@@ -266,12 +265,12 @@ static int dpcm_decode_frame(AVCodecContext *avctx,
}
while
(
in
<
buf_size
)
{
byte
=
buf
[
in
++
];
diff
=
(
byte
&
0xFC
)
<<
8
;
if
((
byte
&
0x03
)
==
3
)
uint8_t
n
=
buf
[
in
++
];
diff
=
(
n
&
0xFC
)
<<
8
;
if
((
n
&
0x03
)
==
3
)
shift
[
ch
]
++
;
else
shift
[
ch
]
-=
(
2
*
(
byte
&
3
));
shift
[
ch
]
-=
(
2
*
(
n
&
3
));
/* saturate the shifter to a lower limit of 0 */
if
(
shift
[
ch
]
<
0
)
shift
[
ch
]
=
0
;
...
...
@@ -303,8 +302,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx,
}
}
else
{
while
(
in
<
buf_size
)
{
int
n
;
n
=
buf
[
in
++
];
uint8_t
n
=
buf
[
in
++
];
if
(
n
&
0x80
)
s
->
sample
[
ch
]
-=
s
->
sol_table
[
n
&
0x7F
];
else
s
->
sample
[
ch
]
+=
s
->
sol_table
[
n
&
0x7F
];
s
->
sample
[
ch
]
=
av_clip_int16
(
s
->
sample
[
ch
]);
...
...
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