aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-08-28 17:30:55 +0200
committerPaul B Mahol <onemda@gmail.com>2019-08-28 17:30:55 +0200
commit330ba8d537b493a35b8e83ae4247ea2343ab010c (patch)
tree110c32444a9a16e8120b57c3478a11eb15d11a4f
parent9606e4b6e68de8c5d9ffe0c829716f0d5dbf1215 (diff)
downloadffmpeg-330ba8d537b493a35b8e83ae4247ea2343ab010c.tar.gz
avcodec/dsd: use uint8_t instead of unsigned char
-rw-r--r--libavcodec/dsd.c10
-rw-r--r--libavcodec/dsd.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/dsd.c b/libavcodec/dsd.c
index 8a1fc21b0d..d48f87fa0f 100644
--- a/libavcodec/dsd.c
+++ b/libavcodec/dsd.c
@@ -53,12 +53,12 @@ av_cold void ff_init_dsd_data(void)
}
void ff_dsd2pcm_translate(DSDContext* s, size_t samples, int lsbf,
- const unsigned char *src, ptrdiff_t src_stride,
+ const uint8_t *src, ptrdiff_t src_stride,
float *dst, ptrdiff_t dst_stride)
{
- unsigned char buf[FIFOSIZE];
+ uint8_t buf[FIFOSIZE];
unsigned pos, i;
- unsigned char* p;
+ uint8_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++) {
- unsigned char a = buf[(pos - i) & FIFOMASK];
- unsigned char b = buf[(pos - (CTABLES*2 - 1) + i) & FIFOMASK];
+ uint8_t a = buf[(pos - i) & FIFOMASK];
+ uint8_t b = buf[(pos - (CTABLES*2 - 1) + i) & FIFOMASK];
sum += ctables[i][a] + ctables[i][b];
}
diff --git a/libavcodec/dsd.h b/libavcodec/dsd.h
index 5ca4574837..ed09cb9b12 100644
--- a/libavcodec/dsd.h
+++ b/libavcodec/dsd.h
@@ -40,13 +40,13 @@
* Per-channel buffer
*/
typedef struct DSDContext {
- unsigned char buf[FIFOSIZE];
+ uint8_t buf[FIFOSIZE];
unsigned pos;
} DSDContext;
void ff_init_dsd_data(void);
void ff_dsd2pcm_translate(DSDContext* s, size_t samples, int lsbf,
- const unsigned char *src, ptrdiff_t src_stride,
+ const uint8_t *src, ptrdiff_t src_stride,
float *dst, ptrdiff_t dst_stride);
#endif /* AVCODEC_DSD_H */