Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
2d509979
Commit
2d509979
authored
Jun 09, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adpcm: fix undefined signed shift
parent
ba7cec94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
modules/codec/adpcm.c
modules/codec/adpcm.c
+14
-14
No files found.
modules/codec/adpcm.c
View file @
2d509979
...
...
@@ -755,30 +755,30 @@ static void DecodeAdpcmEA( decoder_t *p_dec, int16_t *p_sample,
for
(
p_buffer
+=
chans
;
p_buffer
<
p_end
;
p_buffer
+=
chans
)
{
union
{
uint32_t
u
;
int32_t
i
;
}
spl
;
for
(
unsigned
c
=
0
;
c
<
chans
;
c
++
)
{
int32_t
spl
;
spl
=
((
p_buffer
[
c
]
&
0xf0
)
<<
0x18u
)
>>
d
[
c
];
spl
=
(
spl
+
cur
[
c
]
*
c1
[
c
]
+
prev
[
c
]
*
c2
[
c
]
+
0x80
)
>>
8
;
CLAMP
(
spl
,
-
32768
,
32767
);
spl
.
u
=
(
p_buffer
[
c
]
&
0xf0u
)
<<
24u
;
spl
.
i
>>=
d
[
c
];
spl
.
i
=
(
spl
.
i
+
cur
[
c
]
*
c1
[
c
]
+
prev
[
c
]
*
c2
[
c
]
+
0x80
)
>>
8
;
CLAMP
(
spl
.
i
,
-
32768
,
32767
);
prev
[
c
]
=
cur
[
c
];
cur
[
c
]
=
spl
;
cur
[
c
]
=
spl
.
i
;
*
(
p_sample
++
)
=
spl
;
*
(
p_sample
++
)
=
spl
.
i
;
}
for
(
unsigned
c
=
0
;
c
<
chans
;
c
++
)
{
int32_t
spl
;
spl
=
((
p_buffer
[
c
]
&
0x0f
)
<<
0x1cu
)
>>
d
[
c
];
spl
=
(
spl
+
cur
[
c
]
*
c1
[
c
]
+
prev
[
c
]
*
c2
[
c
]
+
0x80
)
>>
8
;
CLAMP
(
spl
,
-
32768
,
32767
);
spl
.
u
=
(
p_buffer
[
c
]
&
0x0fu
)
<<
28u
;
spl
.
i
>>=
d
[
c
];
spl
.
i
=
(
spl
.
i
+
cur
[
c
]
*
c1
[
c
]
+
prev
[
c
]
*
c2
[
c
]
+
0x80
)
>>
8
;
CLAMP
(
spl
.
i
,
-
32768
,
32767
);
prev
[
c
]
=
cur
[
c
];
cur
[
c
]
=
spl
;
cur
[
c
]
=
spl
.
i
;
*
(
p_sample
++
)
=
spl
;
*
(
p_sample
++
)
=
spl
.
i
;
}
}
}
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