Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
330ba8d5
Commit
330ba8d5
authored
Aug 28, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/dsd: use uint8_t instead of unsigned char
parent
9606e4b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
dsd.c
libavcodec/dsd.c
+5
-5
dsd.h
libavcodec/dsd.h
+2
-2
No files found.
libavcodec/dsd.c
View file @
330ba8d5
...
...
@@ -53,12 +53,12 @@ av_cold void ff_init_dsd_data(void)
}
void
ff_dsd2pcm_translate
(
DSDContext
*
s
,
size_t
samples
,
int
lsbf
,
const
u
nsigned
char
*
src
,
ptrdiff_t
src_stride
,
const
u
int8_t
*
src
,
ptrdiff_t
src_stride
,
float
*
dst
,
ptrdiff_t
dst_stride
)
{
u
nsigned
char
buf
[
FIFOSIZE
];
u
int8_t
buf
[
FIFOSIZE
];
unsigned
pos
,
i
;
u
nsigned
char
*
p
;
u
int8_t
*
p
;
double
sum
;
pos
=
s
->
pos
;
...
...
@@ -74,8 +74,8 @@ void ff_dsd2pcm_translate(DSDContext* s, size_t samples, int lsbf,
sum
=
0
.
0
;
for
(
i
=
0
;
i
<
CTABLES
;
i
++
)
{
u
nsigned
char
a
=
buf
[(
pos
-
i
)
&
FIFOMASK
];
u
nsigned
char
b
=
buf
[(
pos
-
(
CTABLES
*
2
-
1
)
+
i
)
&
FIFOMASK
];
u
int8_t
a
=
buf
[(
pos
-
i
)
&
FIFOMASK
];
u
int8_t
b
=
buf
[(
pos
-
(
CTABLES
*
2
-
1
)
+
i
)
&
FIFOMASK
];
sum
+=
ctables
[
i
][
a
]
+
ctables
[
i
][
b
];
}
...
...
libavcodec/dsd.h
View file @
330ba8d5
...
...
@@ -40,13 +40,13 @@
* Per-channel buffer
*/
typedef
struct
DSDContext
{
u
nsigned
char
buf
[
FIFOSIZE
];
u
int8_t
buf
[
FIFOSIZE
];
unsigned
pos
;
}
DSDContext
;
void
ff_init_dsd_data
(
void
);
void
ff_dsd2pcm_translate
(
DSDContext
*
s
,
size_t
samples
,
int
lsbf
,
const
u
nsigned
char
*
src
,
ptrdiff_t
src_stride
,
const
u
int8_t
*
src
,
ptrdiff_t
src_stride
,
float
*
dst
,
ptrdiff_t
dst_stride
);
#endif
/* AVCODEC_DSD_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